[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.cdt] Re: Linker cannot find lib file

This is a GNU FAQ:

If your library is called "libmysqlclient.a" you specify -lmysqlclient to the linker (it automatically adds "lib" prefix and ".a" (or ".so") suffix.

You can see what it is doing by adding -verbose to the -Xlinker settings.

On 13/08/2009 20:33, Jan Millar wrote:
Hi,

I have defined the library to link and the linker library path every way
I can think of but I get the following error:

make all Building target: CgiGetD
Invoking: GCC C++ Linker
g++ -o"CgiGetD" ./src/CgiGetD.o
-l/home/fred/workspace/CgiGetD/libmysqlclient.a
/usr/bin/ld: cannot find -l/home/fred/workspace/CgiGetD/libmysqlclient.a
collect2: ld returned 1 exit status
make: *** [CgiGetD] Error 1

The file is there in /home/fred/workspace/CgiGetD .

The permissions are:

-rw-r--r-- 1 fred fred 6665868 2009-07-14 02:39 libmysqlclient.a .

I am logged in as fred. The directories are owned by fred.

I defined the library in:

Properties>C/C++ Build>Settings>Tool Settings>GCC C++ Linker>Libraries.

Eclipse version 3.4.2 (Mandriva Platform). O/S Mandriva 2009 One.

Any clues anyone?

TIA

Jan




--
Derek