I have mixed C++ / Java project in Eclipse. I've setup a build.mk file and Eclipse builds project successfully when all files in editor are closed. When I open a .h or a .cpp file Eclipse finds a lot of undefined symbols in them. I have references to 3rd party API and all the problems seem to be related to symbols from that API. Strangely, some types are considered defined in Eclipse, and some are considered undefined even though in some cases they are defined in the same .h file.
My colleague is not experiencing any of these problems, but we are clueless where to start solving this problem. We already made sure that our Eclipse include directories are the same. Is there some way to compare eclipse project settings?
Update: .cproject files and .project files and files in .settings directory know differ only by some paths. Did not help to solve my problem though.
"cannot be resolved to a type" means that the compiler has decided that, according to the syntax of the language, what it found at this place in the code has to be type, which means either a class, an interface, or a primitive tpye, but cannot find the definition of any type with that name.
In Visual Studio, right-click on the file to be excluded from build, choose Properties, Configuration Properties -> General -> Excluded From Build -> Yes -> OK. In Eclipse, right-click on the file to be excluded from build, choose Properties, C/C++ Build -> Excluded from build -> OK.
I had the same problem. It could be resolved by flushing the Eclipse indexer.
I used the projects context menu and selected Index->Rebuild
and Index->Freshen All Files
. The last removed the error messages.
Turns out I needed to change Code Analysis settings that are on Launching tab, and I simply did not see that tab.
I had the same problem. It take place when in included file I'd used
namespace std
without using it in main file or vice versa. Do check using namespace equally.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With