Hi,

it has nothing to do with the namespace. It is just a link problem. You have 
to link the library with this soci::postgresql symbol in it. Is there maybe 
something like -lsoci-postgresql? I have heard of soci but never tried it 
really, since I prefer my own tntdb library.

Tommi

Am Samstag, Januar 29, 2011, 22:37:36 schrieb Jean-Michel Caricand:
> Hello,
> 
> I have a problem with namespaces. I use soci library to access database.
> soci is in soci namespace. So in my component, I write :
> 
> // global.ecpp
> 
> <%pre>
> #include "soci.h"
> #include "soci-postgresql.h"
> </%pre>
> 
> <%session>
> std::string user;
> </%session>
> 
> <%thread>
> soci::session sql(soci::postgresql, "dbname=xxxx user=xxxx password=xxxx
> host=xxxx
> </%thread>
> 
> When I compile my app, I get that :
> 
> publications.o: In function `(anonymous
> namespace)::_component_publications::operator()(tnt::HttpRequest&,
> tnt::HttpReply&, tnt::QueryParams&)':
> publications.cpp:(.text+0x7fa): undefined reference to `soci::postgresql'
> 
> I didn't forget to link my app with soci libraries.
> 
> Thank,
> 
> Jean-Michel


------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to