|Eclipse Juno with CDT 8.1.0 compiler bug? [message #900229]
||Sun, 05 August 2012 16:11
| Ted Jackson
Registered: August 2012
I've just started using Eclipse Juno with CDT 8.1.0 downloaded from:
A sample of the compiler output looks like:
15:24:54 **** Incremental Build of configuration Release for project LoadImgDemo ****
Info: Internal Builder is used for build
g++ "-II:\\Android\\OpenCV242\\include\\opencv" "-II:\\Android\\OpenCV242\\opencv\\build\\include" -O3 -Wall -c -fmessage-length=0 -o "src\\LoadImg.o" "..\\src\\LoadImg.cpp"
g++ "-LI:\\Android\\OpenCV242\\build\\x86\\mingw\\lib" -o LoadImgDemo.exe "src\\LoadImg.o"
src\LoadImg.o:LoadImg.cpp:(.text$_ZN2cv3MatD1Ev[cv::Mat::~Mat()]+0x74): undefined reference to `cv::Mat::deallocate()'
Notice that the -I and -L compiler directives are placed within the quotes that also contain the value strings. This appears to be a bug that is causing the errors. Has anyone else seen this behavior? If so, is there any work-around? Or have I possibly mis-configured something? Curiously, the -o directive is NOT treated this way. Thanks, Ted.
[Updated on: Sun, 05 August 2012 20:15]
Report message to a moderator
|Re: Eclipse Juno with CDT 8.1.0 compiler bug? [message #900681 is a reply to message #900630]
||Wed, 08 August 2012 03:22
| Axel Mueller
Registered: July 2009
Ted Jackson wrote on Tue, 07 August 2012 22:46|
The quotes are necessary because one of the paths could contain spaces.
I know that. My question was - do the compiler directives belong within the quotes as well. Or will that cause the link error. It doesn't appear to have prevented a successful compile. Just a bad link.
Your problem is the missing linkage to the cv library.
A missing linkage which could be caused by the directives being inside the quotes? Or are you suggesting that I failed to do something else? Also, when one is getting 'undefined reference' errors, how does one determine what library a given CV function resides within?
The linker error is not caused by the quotes. You are using functions from an external library. The compiler is happy with the included headers but the linker needs the actual library to link your application against it.
Here http://wiki.eclipse.org/CDT/User/FAQ#How_do_I_add_an_external_library_to_my_C.2B.2B_project.3F are instructions how to add a library in Eclipse.
Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
Powered by FUDForum
. Page generated in 0.08253 seconds