Home » U++ Library support » U++ SQL » postgresql mingw ( (): lld-link: error: C:\Ultimate++\upp\bin/pgsql/x86/bin\libpq.dll: bad file type. Did you specify a DLL instead of an import library?)
Re: postgresql mingw [message #51772 is a reply to message #51771] |
Thu, 23 May 2019 02:53   |
|
Hi all-
After getting knocked out by a late night with insomnia (lost a day) I am back at it.
It took forever to figure out where ws2_32.dll is hiding. I copied it from windows system 32.
I have this for build methods under mingw64:
-Wl,--stack,20000000 -L. ws2_32.dll -lpqxx -lpq
I get this error msg on linking with U++:
(): lld-link: error: ws2_32.dll: bad file type. Did you specify a DLL instead of an import library?
Hey- this worked on the command line:
$ x86_64-w64-mingw32-g++.exe -I. -Ic:/pgsql/include -L. -Lc:/pgsql/lib -Lc:/msys64/mingw64/lib ws2_32.dll pgtest.cpp -lpqxx -lpq -o wott.exe
I am not sure if I am missing anything but that is all you need to do in mingw64 in shell for mingw.
If anyone that reads this wants to use msys2 shell for running the postgres server you need conemu with the mingw environment option.
There is a bug they never fixed that won't let you use psql command with the regular mintty.
Sorry I couldn't get back sooner.
Have cool night,
roboloki
|
|
|
Goto Forum:
Current Time: Mon Jun 23 20:42:41 CEST 2025
Total time taken to generate the page: 0.07108 seconds
|