libpq won't connect when client is built with MinGW
От
Stefan T. Peters
Тема
libpq won't connect when client is built with MinGW
Дата
Msg-id
43594384.8040501@electroniczombie.com
Список
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
В списке pgsql-interfaces по дате отправления