libpqxx windows 7 mingw

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
guzzi_jones
Experienced Solver
Experienced Solver
Posts: 81
Joined: Sun Dec 08, 2013 3:50 am

libpqxx windows 7 mingw

Post by guzzi_jones » Sun Apr 20, 2014 3:18 am

Does anyone have a tutorial on how to get libpqxx compiled oonwindows. I am sort of newb. I got it to compile using vc2008. That doesnt seem to work with mingw in code blocks. I get an error that t1 is not defined. Can I compile libpqxx with vc2008 and use with mingw?

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2674
Joined: Sun Jan 03, 2010 5:45 pm

Re: libpqxx windows 7 mingw

Post by PB » Sun Apr 20, 2014 8:32 pm

I have never used PostgreSQL so I don't know much of it, I don't even know if that library is your best choice when it comes to the C++interface it PostgreSQL.
guzzi_jones wrote:Can I compile libpqxx with vc2008 and use with mingw?
No, that is pretty much impossible. Even the first answer in [https://pqxx.org/development/libpqxx/wiki/FaqBuilding]the libpqxx building FAQ[/url] says no. The same FAQ confirms that you can build it with GCC. The very same FAQ mentions you can build it with MinGW.

I don't see why you would need to build the library with C:B, just compile it with command line mingw make and only tell C:B where the include, source and lib files are.

Assuming you have followed the instructions found in win32/install.txt and you still failed, it would be for best to ask on the libpqxx forum, it has nothing to do with wxWidgets and people there should be more knowledgeable about the issue.

guzzi_jones
Experienced Solver
Experienced Solver
Posts: 81
Joined: Sun Dec 08, 2013 3:50 am

Re: libpqxx windows 7 mingw

Post by guzzi_jones » Mon Apr 21, 2014 1:06 am

redacted
Last edited by guzzi_jones on Mon Apr 28, 2014 1:35 am, edited 1 time in total.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 2674
Joined: Sun Jan 03, 2010 5:45 pm

Re: libpqxx windows 7 mingw

Post by PB » Mon Apr 21, 2014 6:55 am

Sorry, as I said I have no experience with PostgreSQL.

On the other hand, I have a brief experience with MinGW. Based on this, I know I can't have MSYS in the path because it prevents me from compiling pretty much anything. Once I remove it and leave only MinGW\bin there, everything works for me. But as I believe I told you that before, I guess you have a reason for doing that. I am no GCC/MinGW expert so it is very likely I am missing something here.

guzzi_jones
Experienced Solver
Experienced Solver
Posts: 81
Joined: Sun Dec 08, 2013 3:50 am

Re: libpqxx windows 7 mingw

Post by guzzi_jones » Mon Apr 28, 2014 1:32 am

just fyi here. i was able to compile libpqxx with mingw
changing this line in common file: LIBPQPATH=$(PGSQLSRC)\interfaces\libpq LIBPQDLL=libpq.dll LIBPQLIB=libpqdll.lib

continue to follow other instructions in install.txt as normal

postgresql is a great database, but man is it tough to get going.

Post Reply