managed-make problem with a library [message #114631] |
Sat, 07 August 2004 09:17  |
Eclipse User |
|
|
|
Originally posted by: eyalunderdream.hotmail.com
Hi,
I'm a newbie to CDT.
I'm using a managed make project on an XP with cygwin, and i'm trying
to link a library (which I created in another project). I've manually
added the library directories to the compiler include path and to the
linker library path and library list. This is the console output:
make -k all
Building target: CPP_tmp2.exe
g++ -L"D:\eclipse\workspace\CPP_lib2\Debug" -oCPP_tmp2.exe main.o
-lCPP_lib2.dll
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cy gwin/bin/ld:
cannot find -lCPP_lib2.dll
collect2: ld returned 1 exit status
make: *** [CPP_tmp2.exe] Error 1
make: Target `all' not remade because of errors.
Build complete for project CPP_tmp2
P.S: Is there any other more elegant way of including the library without
manually changing the complier/linker settings?
|
|
|
|
Re: managed-make problem with a library [message #115205 is a reply to message #114759] |
Thu, 12 August 2004 02:41   |
Eclipse User |
|
|
|
Originally posted by: eyalunderdream.hotmail.com
Thanks a zillion, it worked!!
By more elegant, I mean that when you specify in your project references
project A, it will automatically add A's path to the
include paths, library paths (-L), and its library name to the library
list (-l).
Sean Evoy wrote:
> Well Eyal,
> I'm open to suggestions on a more elegant way to tell the compiler to
> link in an external library. It looks from your output as though you
> have specified the extension of the dll in the UI. Typically, you only
> specify the name of the library to the -l flag and the linker wrapper
> adds the prefix and extension silently (i.e. you specify -lfoo and the
> linker will search for libfoo.a). Try that and see if it helps.
> Sean
> Eyal wrote:
> > Hi,
> >
> > I'm a newbie to CDT.
> > I'm using a managed make project on an XP with cygwin, and i'm trying
> > to link a library (which I created in another project). I've manually
> > added the library directories to the compiler include path and to the
> > linker library path and library list. This is the console output:
> >
> > make -k all
> > Building target: CPP_tmp2.exe
> > g++ -L"D:eclipseworkspaceCPP_lib2Debug" -oCPP_tmp2.exe main.o
> > -lCPP_lib2.dll
> > /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cy gwin/bin/ld:
> > cannot find -lCPP_lib2.dll
> > collect2: ld returned 1 exit status
> > make: *** [CPP_tmp2.exe] Error 1
> > make: Target `all' not remade because of errors.
> > Build complete for project CPP_tmp2
> >
> > P.S: Is there any other more elegant way of including the library without
> > manually changing the complier/linker settings?
> >
|
|
|
Re: managed-make problem with a library [message #115231 is a reply to message #115205] |
Thu, 12 August 2004 08:49  |
Eclipse User |
|
|
|
Eyal,
Agreed. It's on my list of usability enhancements.
Sean
Eyal wrote:
> Thanks a zillion, it worked!!
> By more elegant, I mean that when you specify in your project references
> project A, it will automatically add A's path to the
> include paths, library paths (-L), and its library name to the library
> list (-l).
>
> Sean Evoy wrote:
>
>
>>Well Eyal,
>>I'm open to suggestions on a more elegant way to tell the compiler to
>>link in an external library. It looks from your output as though you
>>have specified the extension of the dll in the UI. Typically, you only
>>specify the name of the library to the -l flag and the linker wrapper
>>adds the prefix and extension silently (i.e. you specify -lfoo and the
>>linker will search for libfoo.a). Try that and see if it helps.
>
>
>>Sean
>
>
>>Eyal wrote:
>>
>>>Hi,
>>>
>>>I'm a newbie to CDT.
>>>I'm using a managed make project on an XP with cygwin, and i'm trying
>>>to link a library (which I created in another project). I've manually
>>>added the library directories to the compiler include path and to the
>>>linker library path and library list. This is the console output:
>>>
>>>make -k all
>>>Building target: CPP_tmp2.exe
>>>g++ -L"D:eclipseworkspaceCPP_lib2Debug" -oCPP_tmp2.exe main.o
>>>-lCPP_lib2.dll
>>> /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cy gwin/bin/ld:
>>>cannot find -lCPP_lib2.dll
>>>collect2: ld returned 1 exit status
>>>make: *** [CPP_tmp2.exe] Error 1
>>>make: Target `all' not remade because of errors.
>>>Build complete for project CPP_tmp2
>>>
>>>P.S: Is there any other more elegant way of including the library without
>>>manually changing the complier/linker settings?
>>>
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.08221 seconds