postgresql - Link error with libpq using C++ -


I am trying to use libpq to connect to my PostgreSQL database and once I do it I intend to call the pre-defined function. Now I have the entry string, and test the connection. Finally I know how to add different code directories and library paths (Windows 7, NetBIn 6.9.1 on the MinGW compiler), I get this error:

G ++ . Exe -c - I / C / Program \ Files / PostgreSQL / 9.0 / include- mmd -mp-mf build / debug / minjw / windows / main.ode -o build / debug / minjw-windows / main.o main CPP < / P>

mkdir -p dist / debug / minGW-Windows

G ++ Exe -o dist / debug / minGW-Windows / Device box connect / debug / minizie-windows / main.o-l / c / program / files / postgresql / 9.0 / lib-lpk

: / Program file / PostGrace SQL / 9.0 / lib / libpac DLL: File not recognized: file format is not recognized
Collection 2: LD1 returned exit status

I have searched many topics for this reason why it is not recognized But people have suggested to others that they are running 64-bit, and they will need to rebuild DLL. I do not think my PostgreSQL came to compile these with the installed Macfills, and assumed they would be good to use because they were. Is there any other reason that my linker will not like my library library / some other types of fixes?

Just like this issue was with LibPak.

From discussion that follows the answer, here is a link so that you can rebuild it according to your needs. Different versions are available, so make sure you download what you want.

I just hate you to hate the hell of dependence. "Your reliance does not work? Download the source and recompile yourself!" - But unfortunately, this time for postgres Is the only option.

Comments