From: | "Matthew Nuzum" <matt(at)followers(dot)net> |
---|---|
To: | <pgsql-general(at)postgresql(dot)org> |
Subject: | compile libpq prog with mingw32 |
Date: | 2003-02-02 20:17:16 |
Message-ID: | 001601c2caf8$14d8ae00$6900a8c0@mattspc |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Sorry in advance for such a lame question. I really don't work with
windows programming.
I've got a simple client program working on linux, but I need to compile
it on windows as well and I'd prefer to use the dev-cpp programming
environment with mingw to compile it. (because my other client libraries
I need give good examples using this environment)
I was wondering if anyone here has set up a similar environment and if
so, what they did.
I'm starting with Bruce's sample client program at
http://www.ca.postgresql.org/docs/aw_pgsql_book/node147.html as my test
case.
I've done a default install of dev-cpp (www.bloodshed.net) using the
dev-c++ 5.0 beta 7 and Mingw/gcc 2.95.3.
I've tried copying (from the 7.2.3 source tarball) src/include/* to
C:\dev-cpp\include and I changed the include in my c file to #include
"libpq/libpq-fe.h" which allows the program to compile but I get linker
errors like:
[Linker error] undefined reference to `PQconnectdb'
[Linker error] undefined reference to `PQstatus'
[Linker error] undefined reference to `PQerrorMessage'
[Linker error] undefined reference to `PQexec'
[Linker error] undefined reference to `PQresultStatus'
... and more.
I'm sorry to say that I'm used to this stuff all being in the right
place and just typing:
cc file.c -o file -lpg
and having it work.
Any help or suggestions greatly appreciated.
--
Matthew Nuzum
www.bearfruit.org
cobalt(at)bearfruit(dot)org
From | Date | Subject | |
---|---|---|---|
Next Message | Matthew Nuzum | 2003-02-02 20:20:27 | compile libpq prog with mingw32 |
Previous Message | Amir Hardon | 2003-02-02 20:14:56 | sorting RTL languages. |