Unable to find Library file [message #114807] |
Tue, 10 August 2004 08:00 |
Eclipse User |
|
|
|
Originally posted by: alanbocutt.ntlworld.com
I am sure that I am doing something stupid here so some help would be
appreciated if possible.
I have two projects in my workspace one to create a library file and one
which uses this library for inclusion of some functions..
The library file compiles correctly but the executable fails saying that
it cant find the library archive.
I have the library file complete pathed in the linker section of the
executable project but the only error I get is that the library cannot be
found
|
|
|
|
Re: Unable to find Library file [message #114860 is a reply to message #114848] |
Tue, 10 August 2004 14:20 |
Eclipse User |
|
|
|
Originally posted by: alanbocutt.ntlworld.com
Sean
this is the output that I get from the Linker
**** Incremental build of configuration Debug for project chprn_parser ****
make -k all
Building target: chprn_parser
gcc -static -ochprn_parser chprn_fun_parser.o
-l/home/bocutta/workspace/library/Release/liblibrary.a
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc -linux-gnu/bin/ld:
cannot find -l/home/bocutta/workspace/library/Release/liblibrary.a
collect2: ld returned 1 exit status
make: *** [chprn_parser] Error 1
make: Target `all' not remade because of errors.
Build complete for project chprn_parser
and this is the library location
/home/bocutta/workspace/library/Release
bocutta@jaguar Release $ ls -l
total 96
-rw-r--r-- 1 bocutta users 767 Aug 10 08:43 chprn_fun_asc2int_s.d
-rw-r--r-- 1 bocutta users 2152 Aug 10 08:43 chprn_fun_asc2int_s.o
-rw-r--r-- 1 bocutta users 1265 Aug 10 08:43 chprn_fun_asc2ip4_s.d
-rw-r--r-- 1 bocutta users 2196 Aug 10 08:43 chprn_fun_asc2ip4_s.o
-rw-r--r-- 1 bocutta users 1265 Aug 10 08:43 chprn_fun_asc2ip6_s.d
-rw-r--r-- 1 bocutta users 2524 Aug 10 08:43 chprn_fun_asc2ip6_s.o
-rw-r--r-- 1 bocutta users 767 Aug 10 08:43 chprn_fun_asc2num_s.d
-rw-r--r-- 1 bocutta users 2168 Aug 10 08:43 chprn_fun_asc2num_s.o
-rw-r--r-- 1 bocutta users 503 Aug 10 08:43 chprn_fun_instr.d
-rw-r--r-- 1 bocutta users 1008 Aug 10 08:43 chprn_fun_instr.o
-rw-r--r-- 1 bocutta users 1172 Aug 10 08:43 chprn_fun_parser_stack.d
-rw-r--r-- 1 bocutta users 5528 Aug 10 08:43 chprn_fun_parser_stack.o
-rw-r--r-- 1 bocutta users 635 Aug 10 08:43 chprn_fun_strings.d
-rw-r--r-- 1 bocutta users 1172 Aug 10 08:43 chprn_fun_strings.o
-rw-r--r-- 1 bocutta users 17706 Aug 10 08:43 liblibrary.a
-rw-r--r-- 1 bocutta users 704 Aug 10 08:43 makefile
-rw-r--r-- 1 bocutta users 663 Aug 10 08:43 objects.mk
-rw-r--r-- 1 bocutta users 383 Aug 10 08:43 sources.mk
-rw-r--r-- 1 bocutta users 1169 Aug 10 08:43 subdir.mk
bocutta@jaguar Release $
Thanks for your help
Alan
Sean Evoy wrote:
> Alan,
> Copy the linker output in your reply to the group. It might help us
> diagnose the problem. Usually, it's something easy like a bad path, but
> it could be the actual library you are telling the linker to link
> against. Either way, it's easier to help with a real error output to
> look at.
> Sean
> Alan Bocutt wrote:
> > I am sure that I am doing something stupid here so some help would be
> > appreciated if possible.
> >
> > I have two projects in my workspace one to create a library file and one
> > which uses this library for inclusion of some functions..
> >
> > The library file compiles correctly but the executable fails saying that
> > it cant find the library archive.
> >
> > I have the library file complete pathed in the linker section of the
> > executable project but the only error I get is that the library cannot be
> > found
> >
|
|
|
Re: Unable to find Library file [message #114887 is a reply to message #114860] |
Tue, 10 August 2004 15:52 |
Sean Evoy Messages: 195 Registered: July 2009 |
Senior Member |
|
|
Alan,
Usually, you spec the name of the library with the -l flag, and the
search path with the -L flag (i.e. -library and
-L/home/bocutta/workspace/library/Release). If you want to use the full
path as the argument to -l, I think you will want to format it as
-l/home/bocutta/workspace/library/Release/library.
Assuming you are using the managed build system, this is a problem that
is caused by the UI not stripping off the path and extension when you
browse to a library file. There's an open bug on it, 70274.
Alan Bocutt wrote:
> Sean
>
> this is the output that I get from the Linker
>
> **** Incremental build of configuration Debug for project chprn_parser ****
>
> make -k all
> Building target: chprn_parser
> gcc -static -ochprn_parser chprn_fun_parser.o
> -l/home/bocutta/workspace/library/Release/liblibrary.a
> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc -linux-gnu/bin/ld:
> cannot find -l/home/bocutta/workspace/library/Release/liblibrary.a
> collect2: ld returned 1 exit status
> make: *** [chprn_parser] Error 1
> make: Target `all' not remade because of errors.
> Build complete for project chprn_parser
>
> and this is the library location
>
> /home/bocutta/workspace/library/Release
> bocutta@jaguar Release $ ls -l
> total 96
> -rw-r--r-- 1 bocutta users 767 Aug 10 08:43 chprn_fun_asc2int_s.d
> -rw-r--r-- 1 bocutta users 2152 Aug 10 08:43 chprn_fun_asc2int_s.o
> -rw-r--r-- 1 bocutta users 1265 Aug 10 08:43 chprn_fun_asc2ip4_s.d
> -rw-r--r-- 1 bocutta users 2196 Aug 10 08:43 chprn_fun_asc2ip4_s.o
> -rw-r--r-- 1 bocutta users 1265 Aug 10 08:43 chprn_fun_asc2ip6_s.d
> -rw-r--r-- 1 bocutta users 2524 Aug 10 08:43 chprn_fun_asc2ip6_s.o
> -rw-r--r-- 1 bocutta users 767 Aug 10 08:43 chprn_fun_asc2num_s.d
> -rw-r--r-- 1 bocutta users 2168 Aug 10 08:43 chprn_fun_asc2num_s.o
> -rw-r--r-- 1 bocutta users 503 Aug 10 08:43 chprn_fun_instr.d
> -rw-r--r-- 1 bocutta users 1008 Aug 10 08:43 chprn_fun_instr.o
> -rw-r--r-- 1 bocutta users 1172 Aug 10 08:43 chprn_fun_parser_stack.d
> -rw-r--r-- 1 bocutta users 5528 Aug 10 08:43 chprn_fun_parser_stack.o
> -rw-r--r-- 1 bocutta users 635 Aug 10 08:43 chprn_fun_strings.d
> -rw-r--r-- 1 bocutta users 1172 Aug 10 08:43 chprn_fun_strings.o
> -rw-r--r-- 1 bocutta users 17706 Aug 10 08:43 liblibrary.a
> -rw-r--r-- 1 bocutta users 704 Aug 10 08:43 makefile
> -rw-r--r-- 1 bocutta users 663 Aug 10 08:43 objects.mk
> -rw-r--r-- 1 bocutta users 383 Aug 10 08:43 sources.mk
> -rw-r--r-- 1 bocutta users 1169 Aug 10 08:43 subdir.mk
> bocutta@jaguar Release $
>
> Thanks for your help
>
> Alan
> Sean Evoy wrote:
>
>
>>Alan,
>>Copy the linker output in your reply to the group. It might help us
>>diagnose the problem. Usually, it's something easy like a bad path, but
>>it could be the actual library you are telling the linker to link
>>against. Either way, it's easier to help with a real error output to
>>look at.
>
>
>>Sean
>
>
>>Alan Bocutt wrote:
>>
>>>I am sure that I am doing something stupid here so some help would be
>>>appreciated if possible.
>>>
>>>I have two projects in my workspace one to create a library file and one
>>>which uses this library for inclusion of some functions..
>>>
>>>The library file compiles correctly but the executable fails saying that
>>>it cant find the library archive.
>>>
>>>I have the library file complete pathed in the linker section of the
>>>executable project but the only error I get is that the library cannot be
>>>found
>>>
>
>
>
|
|
|
Re: Unable to find Library file [message #114978 is a reply to message #114887] |
Wed, 11 August 2004 06:22 |
Eclipse User |
|
|
|
Originally posted by: alanbocutt.ntlworld.com
Hi Sean
Thanks for your help this has solved my problem for me now just down to
debugging my code :)
Regs
Alan
Sean Evoy wrote:
> Alan,
> Usually, you spec the name of the library with the -l flag, and the
> search path with the -L flag (i.e. -library and
> -L/home/bocutta/workspace/library/Release). If you want to use the full
> path as the argument to -l, I think you will want to format it as
> -l/home/bocutta/workspace/library/Release/library.
> Assuming you are using the managed build system, this is a problem that
> is caused by the UI not stripping off the path and extension when you
> browse to a library file. There's an open bug on it, 70274.
> Alan Bocutt wrote:
> > Sean
> >
> > this is the output that I get from the Linker
> >
> > **** Incremental build of configuration Debug for project chprn_parser ****
> >
> > make -k all
> > Building target: chprn_parser
> > gcc -static -ochprn_parser chprn_fun_parser.o
> > -l/home/bocutta/workspace/library/Release/liblibrary.a
> >
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc -linux-gnu/bin/ld:
> > cannot find -l/home/bocutta/workspace/library/Release/liblibrary.a
> > collect2: ld returned 1 exit status
> > make: *** [chprn_parser] Error 1
> > make: Target `all' not remade because of errors.
> > Build complete for project chprn_parser
> >
> > and this is the library location
> >
> > /home/bocutta/workspace/library/Release
> > bocutta@jaguar Release $ ls -l
> > total 96
> > -rw-r--r-- 1 bocutta users 767 Aug 10 08:43 chprn_fun_asc2int_s.d
> > -rw-r--r-- 1 bocutta users 2152 Aug 10 08:43 chprn_fun_asc2int_s.o
> > -rw-r--r-- 1 bocutta users 1265 Aug 10 08:43 chprn_fun_asc2ip4_s.d
> > -rw-r--r-- 1 bocutta users 2196 Aug 10 08:43 chprn_fun_asc2ip4_s.o
> > -rw-r--r-- 1 bocutta users 1265 Aug 10 08:43 chprn_fun_asc2ip6_s.d
> > -rw-r--r-- 1 bocutta users 2524 Aug 10 08:43 chprn_fun_asc2ip6_s.o
> > -rw-r--r-- 1 bocutta users 767 Aug 10 08:43 chprn_fun_asc2num_s.d
> > -rw-r--r-- 1 bocutta users 2168 Aug 10 08:43 chprn_fun_asc2num_s.o
> > -rw-r--r-- 1 bocutta users 503 Aug 10 08:43 chprn_fun_instr.d
> > -rw-r--r-- 1 bocutta users 1008 Aug 10 08:43 chprn_fun_instr.o
> > -rw-r--r-- 1 bocutta users 1172 Aug 10 08:43 chprn_fun_parser_stack.d
> > -rw-r--r-- 1 bocutta users 5528 Aug 10 08:43 chprn_fun_parser_stack.o
> > -rw-r--r-- 1 bocutta users 635 Aug 10 08:43 chprn_fun_strings.d
> > -rw-r--r-- 1 bocutta users 1172 Aug 10 08:43 chprn_fun_strings.o
> > -rw-r--r-- 1 bocutta users 17706 Aug 10 08:43 liblibrary.a
> > -rw-r--r-- 1 bocutta users 704 Aug 10 08:43 makefile
> > -rw-r--r-- 1 bocutta users 663 Aug 10 08:43 objects.mk
> > -rw-r--r-- 1 bocutta users 383 Aug 10 08:43 sources.mk
> > -rw-r--r-- 1 bocutta users 1169 Aug 10 08:43 subdir.mk
> > bocutta@jaguar Release $
> >
> > Thanks for your help
> >
> > Alan
> > Sean Evoy wrote:
> >
> >
> >>Alan,
> >>Copy the linker output in your reply to the group. It might help us
> >>diagnose the problem. Usually, it's something easy like a bad path, but
> >>it could be the actual library you are telling the linker to link
> >>against. Either way, it's easier to help with a real error output to
> >>look at.
> >
> >
> >>Sean
> >
> >
> >>Alan Bocutt wrote:
> >>
> >>>I am sure that I am doing something stupid here so some help would be
> >>>appreciated if possible.
> >>>
> >>>I have two projects in my workspace one to create a library file and one
> >>>which uses this library for inclusion of some functions..
> >>>
> >>>The library file compiles correctly but the executable fails saying that
> >>>it cant find the library archive.
> >>>
> >>>I have the library file complete pathed in the linker section of the
> >>>executable project but the only error I get is that the library cannot be
> >>>found
> >>>
> >
> >
> >
|
|
|
Re: Unable to find Library file [message #117139 is a reply to message #114887] |
Wed, 25 August 2004 10:16 |
Eclipse User |
|
|
|
Originally posted by: toereki.web.de
Sean,
any workaround available ?
Andreas
Sean Evoy wrote:
> Alan,
> Usually, you spec the name of the library with the -l flag, and the
> search path with the -L flag (i.e. -library and
> -L/home/bocutta/workspace/library/Release). If you want to use the full
> path as the argument to -l, I think you will want to format it as
> -l/home/bocutta/workspace/library/Release/library.
>
> Assuming you are using the managed build system, this is a problem that
> is caused by the UI not stripping off the path and extension when you
> browse to a library file. There's an open bug on it, 70274.
>
> Alan Bocutt wrote:
>
>> Sean
>>
>> this is the output that I get from the Linker
>> **** Incremental build of configuration Debug for project chprn_parser
>> ****
>>
>> make -k all Building target: chprn_parser
>> gcc -static -ochprn_parser chprn_fun_parser.o
>> -l/home/bocutta/workspace/library/Release/liblibrary.a
>> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.4/../../../../i686-pc -linux-gnu/bin/ld:
>>
>> cannot find -l/home/bocutta/workspace/library/Release/liblibrary.a
>> collect2: ld returned 1 exit status
>> make: *** [chprn_parser] Error 1
>> make: Target `all' not remade because of errors.
>> Build complete for project chprn_parser
>>
>> and this is the library location
>>
>> /home/bocutta/workspace/library/Release
>> bocutta@jaguar Release $ ls -l
>> total 96
>> -rw-r--r-- 1 bocutta users 767 Aug 10 08:43 chprn_fun_asc2int_s.d
>> -rw-r--r-- 1 bocutta users 2152 Aug 10 08:43 chprn_fun_asc2int_s.o
>> -rw-r--r-- 1 bocutta users 1265 Aug 10 08:43 chprn_fun_asc2ip4_s.d
>> -rw-r--r-- 1 bocutta users 2196 Aug 10 08:43 chprn_fun_asc2ip4_s.o
>> -rw-r--r-- 1 bocutta users 1265 Aug 10 08:43 chprn_fun_asc2ip6_s.d
>> -rw-r--r-- 1 bocutta users 2524 Aug 10 08:43 chprn_fun_asc2ip6_s.o
>> -rw-r--r-- 1 bocutta users 767 Aug 10 08:43 chprn_fun_asc2num_s.d
>> -rw-r--r-- 1 bocutta users 2168 Aug 10 08:43 chprn_fun_asc2num_s.o
>> -rw-r--r-- 1 bocutta users 503 Aug 10 08:43 chprn_fun_instr.d
>> -rw-r--r-- 1 bocutta users 1008 Aug 10 08:43 chprn_fun_instr.o
>> -rw-r--r-- 1 bocutta users 1172 Aug 10 08:43 chprn_fun_parser_stack.d
>> -rw-r--r-- 1 bocutta users 5528 Aug 10 08:43 chprn_fun_parser_stack.o
>> -rw-r--r-- 1 bocutta users 635 Aug 10 08:43 chprn_fun_strings.d
>> -rw-r--r-- 1 bocutta users 1172 Aug 10 08:43 chprn_fun_strings.o
>> -rw-r--r-- 1 bocutta users 17706 Aug 10 08:43 liblibrary.a
>> -rw-r--r-- 1 bocutta users 704 Aug 10 08:43 makefile
>> -rw-r--r-- 1 bocutta users 663 Aug 10 08:43 objects.mk
>> -rw-r--r-- 1 bocutta users 383 Aug 10 08:43 sources.mk
>> -rw-r--r-- 1 bocutta users 1169 Aug 10 08:43 subdir.mk
>> bocutta@jaguar Release $
>>
>> Thanks for your help
>>
>> Alan
>> Sean Evoy wrote:
>>
>>
>>> Alan,
>>> Copy the linker output in your reply to the group. It might help us
>>> diagnose the problem. Usually, it's something easy like a bad path,
>>> but it could be the actual library you are telling the linker to link
>>> against. Either way, it's easier to help with a real error output to
>>> look at.
>>
>>
>>
>>> Sean
>>
>>
>>
>>> Alan Bocutt wrote:
>>>
>>>> I am sure that I am doing something stupid here so some help would be
>>>> appreciated if possible.
>>>>
>>>> I have two projects in my workspace one to create a library file and
>>>> one
>>>> which uses this library for inclusion of some functions..
>>>>
>>>> The library file compiles correctly but the executable fails saying
>>>> that
>>>> it cant find the library archive.
>>>>
>>>> I have the library file complete pathed in the linker section of the
>>>> executable project but the only error I get is that the library
>>>> cannot be
>>>> found
>>>>
>>
>>
>>
|
|
|
Powered by
FUDForum. Page generated in 0.03598 seconds