mingw32/bin/ld.exe: cannot find -lCImg [message #840074] |
Mon, 09 April 2012 16:27 |
Daniela Ramsauer Messages: 1 Registered: April 2012 |
Junior Member |
|
|
I am trying to include an image library to eclipse... but just get following error message:
g++ -LC:\MinGW -LC:\librariesC\CImg149 -oCImgSd.exe CImgSd.o -lCImg
c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe: cannot find -lCImg
I already added the library search paths, where the 1. MinGw and 2. CImg files are, in Project properties - C/C++Build - Settings
First in GCC C++ Compiler - includes
second in GCC C Compiler - includes
third in MinGW C++ Linker - libraries
Furthermore I added the name of of the lib file 'CImg' to the second and third.
The file it should find is 'CImg.h' and it is placed in the C:\MinGW -LC:\librariesC\CImg149 folder.
Someone knows what's wrong, because I'm googling for three days right now and tried many things but nothing worked out...
edit: I am using windows7 and added C:\MinGW\bin to the path variable
Or is it maybe a mingw problem, someone knows a better C++ Compiler, which I can use easily with an image processing library?
[Updated on: Mon, 09 April 2012 17:17] Report message to a moderator
|
|
|
|
Re: mingw32/bin/ld.exe: cannot find -lCImg [message #844011 is a reply to message #840074] |
Fri, 13 April 2012 15:42 |
Henning Riedel Messages: 310 Registered: July 2009 |
Senior Member |
|
|
Hi,
If you need external headers, you need to specify the path to where the
headers can be found:
-I<path_to_includes>
If you need external libraries, you need to specify the path to where
the libraries can be found:
-L<path_to_libraries>
and, you need to specify the library using:
-l<name_of_lib>
The library should have a name like
lib<name_of_lib>.a (or .dll) in order for the -l<name_of_lib> switch to
work, otherwise, if the lib has a name like xxx.a you need to specifiy
it without the -l switch, by adding it with fullpath then.
In CDT, you can add them either in your project settings to the page
"Paths and Symbols" -> "Includes", (-I )
"Paths and Symbols" -> "Libraries", (-l )
"Paths and Symbols" -> "Library Paths". (-L )
and they will be added to the compiler/linker settings automatically
with the proper switches (as stated above in parentheses)
Am 09.04.2012 18:27, schrieb Daniela Ramsauer:
> I am trying to include an image library to eclipse... but just get
> following error message:
> g++ -LC:\MinGW -LC:\librariesC\CImg149 -oCImgSd.exe CImgSd.o -lCImg
> c:/mingw/bin/../lib/gcc/mingw32/4.6.1/../../../../mingw32/bin/ld.exe:
> cannot find -lCImg
>
> I already added the library search paths, where the 1. MinGw and 2. CImg
> files are, in Project properties - C/C++Build - Settings
>
> First in GCC C++ Compiler - includes
> second in GCC C Compiler - includes
> third in MinGW C++ Linker - libraries
>
> Furthermore I added the name of of the lib file 'CImg' to the second and
> third.
>
> The file it should find is 'CImg.h' and it is placed in the C:\MinGW
> -LC:\librariesC\CImg149 folder.
>
> Someone knows what's wrong, because I'm googling for three days right
> now and tried many things but nothing worked out...
>
> Or is it maybe a mingw problem, someone knows a better C++ Compiler,
> which I can use easily with an image processing library?
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.04797 seconds