Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2003-01

Linking problem

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Kassai Istvan

Hello!

I'm sure this isn't a big problem, but I can't compile any example programs eg. postgres and mysql related ones.

If I'm trying to compile the testpg1.pp (from examples) the linker gives this message. What does it mean, and what can I do to eliminate it? ---------------------------------------
Free Pascal Compiler version 1.0.6 [2002/05/23] for i386 Copyright (c) 1993-2002 by Florian Klaempfl
Target OS: Linux for i386
Compiling ./testpg1.pp
Assembling testpg
Linking testpg1
/usr/bin/ld: cannot find -lpq
testpg1.pp(106,7) Error: Error while linking
Closing script ppas.sh
----------------------------------------

And if I want to compile the mysql sample, the message is the next: ----------------------------------------
Assembling qtest
Linking testdb
/usr/bin/ld: cannot find -lmysqlclient
testdb.pp(84,3) Error: Error while linking
Closing script ppas.sh
-----------------------------------------

What have I set up yet????

thanks, bye
kako

Unknown author
to Kassai Istvan
Kassai Istvan wrote 30 lines
Hello! I'm sure this isn't a big problem, but I can't compile any example programs eg. postgres and mysql related ones. If I'm trying to compile the testpg1.pp (from examples) the linker gives this message. What does it mean, and what can I do to eliminate it? --------------------------------------- Free Pascal Compiler version 1.0.6 [2002/05/23] for i386 Copyright (c) 1993-2002 by Florian Klaempfl Target OS: Linux for i386 Compiling ./testpg1.pp Assembling testpg Linking testpg1 /usr/bin/ld: cannot find -lpq testpg1.pp(106,7) Error: Error while linking Closing script ppas.sh ---------------------------------------- And if I want to compile the mysql sample, the message is the next: ---------------------------------------- Assembling qtest Linking testdb /usr/bin/ld: cannot find -lmysqlclient testdb.pp(84,3) Error: Error while linking Closing script ppas.sh ----------------------------------------- What have I set up yet????

You should install the mysql-devel and postges-devel packages. This will create a symbolic link from the libmysqlclient.so
file to the installed libmysqlclient.so.xx.yy.zz

Also, check that libmysqlclient.so.xx.yy.zz is installed in /usr/lib, if it is not, look for it and pass the location on to the compiler using the -Fl/path/to/libmysqlclient option.

Michael.