Précédent   Forum des professionnels en informatique > Bases de données > PostgreSQL
PostgreSQL Forum PostgreSQL. Avant de poster -> F.A.Q PostGreSQL Tutoriels PostGreSQL
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 05/07/2004, 16h45   #1
Invité de passage
 
Inscription : juillet 2004
Messages : 6
Détails du profil
Informations forums :
Inscription : juillet 2004
Messages : 6
Points : 3
Points : 3
Par défaut libpq avec MS Visual C++

Je cherche à utiliser le client PostGreSQL "libpq" ou "libpxx" sous Windows depuis une application existante en MS Visual C++, donc à me linker dynamiquement avec ces librairies.
Mais il semble que les "import library" produites par MinGW ne soient pas utilisables par Visual C++ (V6 SP3).
Si c'est possible, comment faut-il les indiquer au linker de VC++ ?
zxgloster016b est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 07/07/2004, 18h16   #2
Membre du Club
 
Inscription : mars 2004
Messages : 89
Détails du profil
Informations forums :
Inscription : mars 2004
Messages : 89
Points : 59
Points : 59
Bonjour,

moi j'ai laissé tomber avec C++ builder, je ne sais pas si cela peut t'aider, c'est un fichier qui se trouve dans le dossier win32 de la librairie:


Citation:
Welcome to libpqxx, a C++ API to the PostgreSQL database management system.
Please see the regular README for general instructions on building, installing,
and using the library.

To get started quickly on a Windows system with MSVC7 use the command line.
1) Run VCVARS32.BAT to set the environment.
2) Edit win32/common to reflect the correct paths to your PostgreSQL includes
and library files.
3) Edit include/pqxx/config.h and include/pqxx/libconfig.h to fit your
compilation environment, or if you have Cygwin (or another Unix-like set of
tools), just run the "configure" script found in the main directory.
4) Modify the libpqxx.mak if necessary. See "Changing the makefile" below.
5) Now "nmake /f libpqxx.mak ALL" will compile all dynamic, static, debug and
release libraries. You will find them in the win32\lib directory.

To create the test files
5) "nmake /f test.mak ALL" will compile and link all the test files. It is
currently set to use the dll version of libpqxx.


--- Changing the makefile
There are 2 items in the makefile that may need to be changed, all have at
least a little bit of documentation. All these changes take place in the
file "common" so you shouldn't get any oddities when compiling the test
cases due to a mismatch in compiler settings.

PGSQLSRC
You will need to change this option. While we don't actually use the source
files from postgres, some of the header files are necessary. Set this option
where the src directory of postgres is located. It can handle it from there.

LIBPATH
This is where the release version of libpq is located. Refer to the postgres
documentation on building this file.

@peluche
$grm$ est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 12/07/2004, 10h56   #3
Invité de passage
 
Inscription : juillet 2004
Messages : 6
Détails du profil
Informations forums :
Inscription : juillet 2004
Messages : 6
Points : 3
Points : 3
Bonjour,

je n'arrive pas à télécharger libpqxx.
Je n'ai pas trouvé de miroirs du site gborg qui le distribue.
J'ai ouvert un autre sujet pour ce pb, car les personnes de ce site ne m'ont pas répondu.
Pour ce pb-ci, avec libpq, en fait c'est expliqué dans la doc de PostGreSQL (paragraphe 3.4) : il faut recompiler libpq avec MS VC et le mak fourni dans la distrib.
Attention dans le cas particulier de PostGreSQL 7.5devel compilée pour Windows, il faut renommer cette librairie compilée avec MS VC, car celle compilée avec MinGW est utilisée par les utilitaires de PostGreSQL (createdb, ...).
Merci en tout cas de l'info pour libpqxx. Ca servira si j'arrive à le descendre.
A+
zxgloster016b est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 11h45.


 
 
 
 
Partenaires

Hébergement Web