On Tue, November 22, 2005 12:27, Tom Bruno wrote: > 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?
I think the problem here is that libpqxx was built against libpq.dll, not libpq.a, and so libpqxx (not your own code) contains a reference to the DLL that is resolved at load time. The --disable-shared configure option disables building of the shared version of libpqxx, but it doesn't prevent linking to the shared libpq. This all happens under the hood of the autotools, so I'm not sure how to get around it. One thing you could try is to add the directory where your libpq.a (but *not* libpq.dll) resides to the LDFLAGS variable before running configure. In fact, you may need to move any libpq.dll files out of the way so the autotools simply don't find it. Another possibility is that the option "--disable-shared=libpq" might help. Jeroen _______________________________________________ Libpqxx-general mailing list [email protected] http://gborg.postgresql.org/mailman/listinfo/libpqxx-general
