Hello,
I'm still having the problems described below : error message "Failed to find
shared library for backend" at runtime.
I'm a bit surprised that I had no reply.
Maybe I made an error in my Visual Studio 2005 project configuration, and then
it wouldn't be the appropriate forum to solve it.
Still, I would appreciate to have a hint ;-)
I'm using soci 3.0.0 downloaded from sourceforge.
I use Postgresql 8.4.2 as DBMS and backend, compiled over Visual Studio 2005.
Regards,
Andrew
From: [email protected]
To: [email protected]
Date: Tue, 12 Jan 2010 16:09:41 +0100
Subject: [SOCI-users] SOCI runtime backend error : - Windows, MS Visual 2005,
PostgreSQL, Lib
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
Windows 7 : Trouvez le PC qui vous convient! Découvrez notre offre !
_________________________________________________________________
Tchattez en direct en en vidéo avec vos amis !
http://www.windowslive.fr/messenger/------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users