[Libpqxx-general] what's wrong with my basic program?

Peter Geoghegan peter.geoghegan86 at gmail.com
Wed Sep 9 10:13:19 UTC 2009


Caleb,

It's going to be more or less impossible for anyone to determine why
it isn't linking based on what you've told us. It just isn't linking
at the moment - this is a generic undefined reference linker error.
Are you building this simple program from the command line, or using
some sort of build system?

Sorry if this sounds condescending, but you are aware that linker
errors will occur even if you #include the header where the relevant
functions/classes are declared if they aren't also defined, right? The
linker looks for the functions' *definitions*, where it ought to find
them in some .cpp file (typically the .cpp file that has the same name
as the .h file), but if it can't find them, you get this,

Regards,
Peter Geoghegan


More information about the Libpqxx-general mailing list