I have 64 bit installations of db2 express and cygwin. I am trying a very simple test up and running:
gcc ex1.o -o ex1.exe ../../sqllib/lib/db2api.lib
../../sqllib/lib/db2api.lib(DB2APP64.dll.b):(.text+0x2): relocation truncated to fit: R_X86_64_32 against symbol __imp_sqlastrt' defined in .idata$5 section in ../../sqllib/lib/db2api.lib(DB2APP64.dll.b)
../../sqllib/lib/db2api.lib(DB2APP64.dll.b):(.text+0x2): relocation truncated to fit: R_X86_64_32 against symbol__imp_sqlaaloc' defined in .idata$5 section in ../../sqllib/lib/db2api.lib(DB2APP64.dll.b)
../../sqllib/lib/db2api.lib(DB2APP64.dll.b):(.text+0x2): relocation truncated to fit: R_X86_64_32 against symbol `__imp_sqlasetdata' defined in .idata$5 section in ../../sqllib/lib/db2api.lib(DB2APP64.dll.b)
etc..
I tried all -mcmodel options to no avail. Other than that I couldn't find much in the way of solutions to this problem. What do I need to do to get this to link correctly?
(same problem as prior post, but after much searching it seems that others have got something very similar to the above to work, presumably on 32 bit machines)