building dll exports table with mingw32/MSW

Teofilis Martisius smart@org.ktu.lt
Fri Oct 8 11:40:00 GMT 1999


Hello,

I hope this is the right place to send this. If no, maybe you 
could tell me who would be interested in fixing these problems.

I was using mingw32 to make a postgresql ODBC driver dll.
When compiling psqlodbc.c, it produces .o file with
symbol _DllMain@12???? instead of _DllMain@12 in its
export section (here ???? are four random 
characters, maybe garbage?). Then dlltool tries to 
make export file with this garbage and fails. Either
these 4 chars should not be there, or dlltool should
ignore them. When I change them into 00 00 00 00 with
a hex editor in .o file, everything seems to work fine.

Does it happen with anyone's else tools too? I have
commented out most of code. It shouldn't take long to try.

(.c file, makefile, gcc & dlltool results in attachment)

My gcc & dlltool versions are:

gcc version 2.95 19990728 (release)
GNU C:\C\MINGW32\BIN\DLLTOOL.EXE 2.9.4

Teofilis Martisius
smart@org.ktu.lt
psqlodbc.zip



More information about the Gcc-bugs mailing list