Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse Juno with CDT 8.1.0 compiler bug?(-I and -L compiler directives inside quotes during build)
Eclipse Juno with CDT 8.1.0 compiler bug? [message #900229] Sun, 05 August 2012 16:11 Go to next message
Eclipse UserFriend
Hi all,

I've just started using Eclipse Juno with CDT 8.1.0 downloaded from:

http://www.eclipse.org/cdt/downloads.php

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] by Moderator

Re: Eclipse Juno with CDT 8.1.0 compiler bug? [message #900479 is a reply to message #900229] Tue, 07 August 2012 05:18 Go to previous messageGo to next message
Eclipse UserFriend
The quotes are necessary because one of the paths could contain spaces.

Your problem is the missing linkage to the cv library.
Re: Eclipse Juno with CDT 8.1.0 compiler bug? [message #900630 is a reply to message #900479] Tue, 07 August 2012 16:46 Go to previous messageGo to next message
Eclipse UserFriend
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?

Thanks, Ted.
Re: Eclipse Juno with CDT 8.1.0 compiler bug? [message #900681 is a reply to message #900630] Wed, 08 August 2012 03:22 Go to previous message
Eclipse UserFriend
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?

Thanks, Ted.

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.

Previous Topic:Problem with Compiler Settings
Next Topic:CDT Custom build Option to be added in Projects Context Menu and run for Both MBS and Standard Make
Goto Forum:
  


Current Time: Mon Jun 16 00:34:37 EDT 2025

Powered by FUDForum. Page generated in 0.03020 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top