X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id C066DDA3EA for ; Fri, 21 Oct 2005 16:37:44 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 99789-08 for ; Fri, 21 Oct 2005 19:37:41 +0000 (GMT) Received: from mail2.websitesource.net (mail2.websitesource.net [64.40.144.139]) by svr1.postgresql.org (Postfix) with SMTP id 2C4D4D9BAB for ; Fri, 21 Oct 2005 16:37:39 -0300 (ADT) Received: (qmail 19425 invoked by uid 399); 21 Oct 2005 19:37:34 -0000 Received: from 00d0b7560e3d.click-network.com (HELO ?10.0.0.125?) (131.191.69.104) by mail2.websitesource.net with SMTP; 21 Oct 2005 19:37:34 -0000 Message-ID: <43594384.8040501@electroniczombie.com> Date: Fri, 21 Oct 2005 12:37:40 -0700 From: "Stefan T. Peters" User-Agent: Thunderbird 1.4 (Windows/20050908) MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: libpq won't connect when client is built with MinGW Content-Type: multipart/mixed; boundary="------------050409040503080008080405" X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0 required=5 tests=[none] X-Spam-Level: X-Archive-Number: 200510/23 X-Sequence-Number: 5785 This is a multi-part message in MIME format. --------------050409040503080008080405 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello, I've been trying to get a simple test program built on Windows XP Pro SP2 using MinGW 4.1.0 + MSYS 1.0.10. I am using the standard "postgresql-8.0.4.zip" download with the development libs selected during install. Everything builds nicely, but whenever I try to do a PQconnectdb with an IP address (hostaddr=10.0.0.23), I get the following from PQerrorMessage: -- could not create socket: The requested service provider could not be loaded or initialized. (0x0000277A/10106) -- And when I try it with a host name (host=testdb), I get the following from PQerrorMessage: -- could not translate host name "testdb2" to address: Unknown host -- BTW, the computer can resolve testdb2 to 10.0.0.23 just fine... Any ideas? Here is the output of my build script (as created by Eclipse 3.1 + CDT 3.0): -- **** Full rebuild of configuration Debug for project HelloWorld **** make -k clean all rm -rf ./main.o ./main.d HelloWorld.exe Building file: ../main.cpp Invoking: GCC C++ Compiler g++ -IC:\Program Files\PostgreSQL\8.0\include -O0 -g3 -Wall -c -fmessage-length=0 -omain.o ../main.cpp Finished building: ../main.cpp Building target: HelloWorld.exe Invoking: GCC C++ Linker g++ -LC:\Program Files\PostgreSQL\8.0\lib -oHelloWorld.exe ./main.o -lpq Finished building target: HelloWorld.exe Build complete for project HelloWorld -- Stefan T. Peters --------------050409040503080008080405 Content-Type: text/x-vcard; charset=utf-8; name="stefan.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="stefan.vcf" begin:vcard fn:Stefan T. Peters n:Peters;Stefan email;internet:stefan@electroniczombie.com tel;work:(800) 614.5375 #711 x-mozilla-html:TRUE version:2.1 end:vcard --------------050409040503080008080405--