Hello everyone,
This is my first post here, so bear with me if you have seen those errors
before :-).
I first used SOCI last year.
I compiled it successfully on MacOSX, with a PosgreSQL database.
I used it in several of my applications, and I'm quite happy with it.
I wanted to port one of the tools I wrote to a Windows platform, so I tried to
use SOCI in Visual Studio 2005 as a library (not a DLL).
That's when I ran into problems.
* Both the core and the postgreSQL backend compiled easily, using the
installation procedure (and after defining some user macro on postgreSQL).
* The postgreSQL_test module was a bit more difficult.
After doing the modifications suggested in this list by Ionut Rosoiu and others
last year, it compiled.
First anomaly there :
1) The test executable did require lots of DLL at runtime run (libpq.dll, etc).
Did I forget to set an environment variable to declare the PostgreSQL library
path at runtime ?
Anyway, as a work around, I ended up copying all the required DLL in the
executable folder.
Then, all tests passed (except those requiring boost).
Then I included both library files in my Visual Project (core and postgre
backend), and tried to compile the sources that worked on MacOS.
I found 2 oddities :
2) (Minor) on Mac, the backend soci::postgresql works.
soci::session conn(soci::postgresql, connect_string);
Not on Visual Studio.
For it to compile, I had to change to
soci::session conn("postgresql", connect_string);
3) (Major)
The project compiled in Visual Studio, but on runtime, I do receive this error
message
"Failed to find shared library for backend".
I'm quite puzzled by this error :
Looking in the source files, this error message only appears in the
backend-loader.cpp file, which means the SOCI Core library was found and used
successfully.
But the postgresql backend library, compiled and included in the same way, was
not.
In case it was an environment problem, I copied all postgreSQL libraries and
DLL in the compiled executable folder (like for the postgresql_test.exe).
I still got the same error.
I wonder if I missed a setting in Visual Studio 2005, or if it's an environment
setting problem.
Have someone ever encountered something like this before ?
And would you have any suggestion to help me solve this problem?
Cheers,
Andrew
_________________________________________________________________
Tchattez en direct en en vidéo avec vos amis !
http://www.windowslive.fr/messenger/------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users