Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 55494225df0b8698de1a4d424d8d98b3 > files > 51

UpTools-devel-8.6.3-2.fc18.i686.rpm

# Special notes for Fedora users: Change in Implicit DSO Linking

In Fedora, if you want to use class UpSqlConnPgsql (to access postgresql),
then you must explicitly add -lpq to the compile command.
In other linux distributions, it libpq is linked automatically when needed)


As is stated in Fedora Development mailing list:
"The change will force explicit declaration of links rather than implicitly
detecting links. More detailed info is here:
https://fedoraproject.org/wiki/UnderstandingDSOLinkChange"

In short you should do:
g++  -o  testUpPgsql examples/testUpPgsql.cc -lUpTools -lpq