Thanks. I did a mistake. I used the x64 libraries from postgresql. I download and use the x32 libraries (postgresql-9.2.7-1-windows-binaries.zip) and I can export the definitions of libpq.dll (x32)
But when I run the application, it fails: Says: The application was unable to start correctly (0xc000007b). Click OK to close the application. Then I remember that you says that is needed the libintl.dll. Using CFF Explorer I found that libpq.dll import libintl.dll I get the libintl.dll from the bin folder (postgresql-9.2.7-1-windows-binaries\pgsql\bin) But, when I run the compiled I get the same error message. Then with CFF Explorer I look the imports of libpq.dll and I found some dll that are present in my Windows\system32 folder, but that also are distributed in the bin folder (postgresql-9.2.7-1-windows-binaries\pgsql\bin), and I compare and it are differents. That was the case of libeay32.dll and ssleay32.dll Then I put in the same folder of my compiled test program the following dlls from the bin folder (postgresql-9.2.7-1-windows-binaries\pgsql\bin): libeay32.dll libintl.dll libpq.dll ssleay32.dll And now works. Thanks. 2014-03-02 14:17 GMT-03:00 cbdev <[email protected]>: > Hi there, > I seem to remember the libpq git had a .def file somewhere that I used, > but you might also try to use something like expdef (which does the same as > tiny_impdef, but seems a little more fault tolerant) to extract it (might > need to be edited a bit to be recognized properly by tcc). > > Heads up: You may also need libintl.dll in order to run programs linked > against libpq on Windows. > > HTH, > fjs > > > On Sun, Mar 2, 2014 at 4:33 AM, Carlos Montiers <[email protected]>wrote: > >> Hello, I want use the libpq library from postgresql. >> But I not know how link with that library. >> >> I do this in cmd but not works: >> >> C:\tcc>tiny_impdef.exe libpq.lib >> tiny_impdef: could not get exported function names. >> C:\tcc>tiny_impdef.exe libpq.dll >> tiny_impdef: could not get exported function names. >> >> Please, help. >> Carlos. >> >> _______________________________________________ >> Tinycc-devel mailing list >> [email protected] >> https://lists.nongnu.org/mailman/listinfo/tinycc-devel >> >> >
_______________________________________________ Tinycc-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/tinycc-devel
