Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 1BC6B9FA66C for ; Fri, 29 Sep 2006 09:38:54 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 45958-07 for ; Fri, 29 Sep 2006 12:38:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from bay0-omc2-s39.bay0.hotmail.com (bay0-omc2-s39.bay0.hotmail.com [65.54.246.175]) by postgresql.org (Postfix) with ESMTP id 5E27B9FA5FB for ; Fri, 29 Sep 2006 09:38:49 -0300 (ADT) Received: from hotmail.com ([65.54.174.46]) by bay0-omc2-s39.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 29 Sep 2006 05:38:48 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Fri, 29 Sep 2006 05:38:47 -0700 Message-ID: Received: from 65.54.174.200 by by103fd.bay103.hotmail.msn.com with HTTP; Fri, 29 Sep 2006 12:38:43 GMT X-Originating-IP: [189.163.176.248] X-Originating-Email: [vaxis@hotmail.com] X-Sender: vaxis@hotmail.com From: "Andreas Gidlund" To: pgsql-interfaces@postgresql.org Subject: Re: Compilations failing Date: Fri, 29 Sep 2006 14:38:43 +0200 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed X-OriginalArrivalTime: 29 Sep 2006 12:38:47.0664 (UTC) FILETIME=[3575B700:01C6E3C4] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.907 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, MSGID_FROM_MTA_HEADER, SPF_PASS X-Spam-Level: * X-Archive-Number: 200609/38 X-Sequence-Number: 6283 I am getting so frustrated here... As compiling with the command prompt failed so hard, I went over to compile with msys and mingw and actually managed to compile postgres, but it failed on compiling a dynamic library of libpxx in the next step. I have therefore left the ambitions to compile libpqxx for now. So I went on with making a project in visual studio 2005.net and the aim to use only the libpq dll I managed to compile in msys. That also failed... So I have been searching all over the internet to find out how to use libpq in VS, but with no luck at all. I am missing a short and easy to follow guide. My test program only tries to create a connection object as follows: PGconn *conn; conn = PQconnectdb("dbname = postgres"); I also have #include "libpq-fe.h" in the beginning. However, I get the following two messages when compiling: error LNK2028: unresolved token (0A00000A) "extern "C" struct pg_conn * __clrcall PQconnectdb(char const *)" (?PQconnectdb@@$$J0YMPAUpg_conn@@PBD@Z) referenced in function "public: __clrcall IDBConnection::claPostgreSQL::claPostgreSQL(char *)" (??0claPostgreSQL@IDBConnection@@$$FQAM@PAD@Z) claPostgreSQL.obj error LNK2019: unresolved external symbol "extern "C" struct pg_conn * __clrcall PQconnectdb(char const *)" (?PQconnectdb@@$$J0YMPAUpg_conn@@PBD@Z) referenced in function "public: __clrcall IDBConnection::claPostgreSQL::claPostgreSQL(char *)" (??0claPostgreSQL@IDBConnection@@$$FQAM@PAD@Z) claPostgreSQL.obj Though, it is quite obvious it is at least because there is no reference to libpq.dll. I simply don't know how to refer to that file. I also read somewhere that I have to include libpqdll.lib, is that true? Even more spoiling my attempts is that the only compiled file for libpq I get while compiling postgres through msys is the libpq.dll file. I found in the documentation of 7.4.13 that libpqdll.lib and libpq.lib also should be created, but they are not for me... The "make" call doesn't return any errors, just that postgres is ready to be installed. Has this been changed in v8 or should these files also be created there? Can someone please help me? I'm soon starting to cry for real... >From: "Jeroen T. Vermeulen" >To: "Andreas Gidlund" >CC: pgsql-interfaces@postgresql.org >Subject: Re: [INTERFACES] Compilations failing >Date: Wed, 27 Sep 2006 10:23:41 +0700 (ICT) > >On Wed, September 27, 2006 05:41, Andreas Gidlund wrote: > > I have a problem when compiling libpqxx with the tools from VS.NET 2005 > > for use on Windows XP. > >But the actual errors you run into happen while compiling postgres itself, >right? You may want to come over the the libpqxx-general mailing list >(see http://pqxx.org/ ) for help with libpqxx-specific problems. > > > > However, after downloading libpqxx, as I wanted to compile and use it, I > > ran > > into problems. First, after having creating the common file in the win32 > > folder and when I was to change the paths inside, all three paths did >not > > comply with my installation. First for the path to the source code, I > > installed by using the msi distribution and hence did not have the >source > > at hand. > From what I've heard, the Windows installer doesn't install the header >files for libpq, and those are needed for compiling libpqxx (or any other >program that uses libpq). That's why you need the postgres source >archive. The paths are a painful obstacle; there just don't seem to be >any real standards for these things on Windows. > >I guess there really ought to be a separate "development package" of >postgres for Windows like there is for other systems. The problem seems >to be that Windows lacks the necessary compiler standards--a development >package would have to be compiler-specific. :-( > >You should be able to get away with compiling just the Release version of >libpqxx if that's what you want, using the Release version of libpq, and >just "stealing" the libpq headers from the postgres source tree. But >chances are that you'll want to debug your software sometimes, if only >during development, so it's better to have both Debug and Release versions >of everything available. > > >Jeroen > > _________________________________________________________________ Börjar bilen krångla? Köp en ny http://motor.msn.se/