i installed both postgres 8.1, and libpqxx 2.5.5 via mingw on windows XP. Using the msys method of running ./configure and everything just like the docs said.

postgres 8.1 has libpq.a, libpostgres.a, and libpq.dll in the libs folder where i installed it to and all the libs seem to also located there..
and libpqxx was built with --disable-shared.

When i build my application i do it by including the .a files in the build like like so:
(the paths are just examples, but are correct in my real tries)

g++ /c/mingw/lib/libpqxx.a /c/mingw/lib/libpq.a /c/mingw/lib/libws2_32.a -o myfile.exe

The executable builds and runs fine. however if i move the exe to another machine, windows will keep bringing up an error box, "Application needs libpq.dll" and exits.
If i copy over libpq.dll, everything works fine.

On linux, when i static link like above via including the paths, i don't need libpq.so on the
system.  Same with OSX.  What is different, am I doing something wrong?

It was my understanding that all you had to do, to statically include a lib was include the .a file. I've been playing with it for many hours, and am just lost. I need a static exe, i don't want to have to deal with issues that come up with different versions of libpq.dll and distribution/installation problems from having seperate dlls at this time. The application just isn't big enough for me to
worry about installers and stuff.

Thanks for the help.
_______________________________________________
Libpqxx-general mailing list
[email protected]
http://gborg.postgresql.org/mailman/listinfo/libpqxx-general

Reply via email to