Turns out, even "c++ tmp.cpp -l mysqlpp -o prog" would suffice.
Thanks for your help. It was my lack of c++ compiler knowledge that ruined
Richard K. Szabo
Software Developer and Industrial PC-Technician
www.capax.se | rks@stripped
From: jonathan.wakely@stripped [mailto:jonathan.wakely@stripped] On Behalf
Of Jonathan Wakely
Sent: den 8 maj 2008 09:06
To: Richard K. Szabo
Subject: Re: Regarding FAQ, Install-notes and more... (ref. not OK)
2008/5/8 Richard K. Szabo:
> The reason why I was so uninformative was because I gathered you'd all
> explained this to people already, and I know this is mentioned in the FAQ
> and Install-notes, but something I am doing is not right.
but without the extra info from you, noone can tell if it's the same
"this" as has been explained to others. _you_ might know that, but
without more info from you everyone else has to guess that you mean
the same problem.
> And, will not work is will not compile, with "c++ tmp.cpp", I tried "gcc"
> well. It fails with "collect2: ld returned 1 exit status".
That's "will not link" not "will not compile".
As Warren and Mickaël said, you need to link to right the library.
You could try adapting the Makefile.simple that comes with the mysql++
sources, that does all the basics.
This is explained on the front page, http://tangentsoft.net/mysql++ -
under "It compiles, but it won't link! Why?"