Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 20:11 Go to next message
Ted Jackson is currently offline Ted JacksonFriend
Messages: 3
Registered: August 2012
Junior Member
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: Mon, 06 August 2012 00:15]

Report message to a moderator

Re: Eclipse Juno with CDT 8.1.0 compiler bug? [message #900479 is a reply to message #900229] Tue, 07 August 2012 09:18 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
The quotes are necessary because one of the paths could contain spaces.

Your problem is the missing linkage to the cv library.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Eclipse Juno with CDT 8.1.0 compiler bug? [message #900630 is a reply to message #900479] Tue, 07 August 2012 20:46 Go to previous messageGo to next message
Ted Jackson is currently offline Ted JacksonFriend
Messages: 3
Registered: August 2012
Junior Member
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 07:22 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
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.



Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
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: Fri Apr 19 22:51:57 GMT 2024

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

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

Back to the top