|
|
Re: Invalid template arguments for std::vector<std::string> [message #1835844 is a reply to message #1835813] |
Mon, 14 December 2020 20:14   |
Claude Robitaille Messages: 4 Registered: December 2020 |
Junior Member |
|
|
After playing with some settings some of the errors come and go, including the std::vector. Frankly, since I am
not using eclipse's build capability I did not spend too much time on its configuration.
But I realise that the editor depends on the build configuration to do its magic. So, my strategy is to set eclipse
to use the native compiler. (both the native compile and the cross-compiler are gcc, which, although they may
not be at the same version are more than likely sufficiently close for my purpose).
But where to set the compiler? Is it project/properties/c-c++build/Tool Chain Editor? It certainly looks like it is
the correct place. However I still have some 3rd party open source software that still have some unresolved.
Particularly POCO, which defines internal preprocessor variables, based on, I presume, on compiler related
variable. In particular, POCO, sets the POCO_OS_FAMILY_UNIX based on "linux" being defined (or a bunch
of other alternative variable). None of the POC_OS_FAMILITY_XXX is set, which tells me that somehow eclipse
does not successfully set what ever the native compiler should be setting.
I googled to try to find a comprehensive guide to set eclipse properly. But I find is cook guide, not a real documentation
site that would describe the whole thing, including concept. My question is where can I find this information? An
example of question I would like to find the answer for is about this command eclipse uses to get the compiler spec:
${COMMAND} ${FLAGS} -E -P -v -dD "${INPUTS}"
where does COMMAND (and FLAGS) get set?
Thanks
|
|
|
|
Re: Invalid template arguments for std::vector<std::string> [message #1836623 is a reply to message #1835845] |
Sat, 09 January 2021 19:21   |
Claude Robitaille Messages: 4 Registered: December 2020 |
Junior Member |
|
|
Thanks, the link did help a lot for me to set things straight. I think this is an important document that should be maintained. Being able to rely on the Indexer is, IMHO, the most important feature of CDT. The build system is not so important (well, I must admit that since I do not use it I probably have a biased view....).
Since I am not using the build system and that ultimately my cross-compiler is equivalent to the native compiler, I guess I do not have to worry about CDT finding the cross-compiler. But, if I were to need CDT to access the crosscompiler, I still do not understand where to tell CDT the location of the compiler. Is it simply by adding the crosscompiler location to the PATH environment variable? If so, I think a more explicit setting should be provided; yes, it is possible to override the compiler call in the global build setting (or the corresponding in the project settings) but it is not as clean as having a specific setting for the location of the cross-compiler).
Anyway, I pretty much resolve everything except for the autogenerated protobuf include. I did add the location of the protobuf includes in C/C++ General/Pahts and Symbols / Includes for both GNU C and GNUC++. Consequently, I can navigate to the include files via pressing F3 on the include statements (so CDT definitely finds the include files). But I get an " Method XXXX could not be resolved" for every statement where I use any of the methods defined in the protobuf classes. I fact, if after entering '.' after an instance name, the popup does not list any single method. It only lists the class object, which is weird. The declaration of the instance (so typename variablename) is Ok, no error reported here. I can press F3 on the typename and get to the correct include file and class definition. Most of the methods, if not all, are defined inline in the include files generated by protobuf. The signature of the methods only use standard types (int, std::string, etc) so I think the indexer should be happy. But apparently it is not. Any ideas?
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01501 seconds