Subject: | Got it to work and blew up in the link |
I managed to get MQSeries to compile under Strawberry 5.18 with two tweaks. One is described in https://rt.cpan.org/Ticket/Display.html?id=88555 . The other is tweak to the Makefile.PL in MQClient/MQServer (they're linked):
if ($Config{osname} =~ /win32/i
and $Config{myuname} =~ m/strawberry-perl/
and $Config{myuname} =~ m/x64/
and $Config{cc} eq 'gcc') {
$Config{ccflags} .= ' -D_int64=__int64'
}
That gets me through the compile. However, the link promptly blew up as below. Any clues?
E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\data\.cpanplus\5.18.0\build\MQSeries-1.34>dmake
dlltool --def MQSeries.def --output-exp dll.exp
g++.exe -o ..\blib\arch\auto\MQClient\MQSeries\MQSeries.dll -Wl,--base-file -Wl,dll.base -mdll -s -L"E:\strawberryBuild\5.18.0.1-64-
20130905-bootstrap\perl\lib\CORE" -L"E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\lib" MQSeries.o constants.o E:\strawberry
Build\5.18.0.1-64-20130905-bootstrap\perl\lib\CORE\libperl518.a E:\mq71\Tools\lib\mqic.lib E:\mq71\Tools\lib\mqic32.lib E:\strawberr
yBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libmoldname.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86
_64-w64-mingw32\lib\libkernel32.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libuser32.a E:\strawber
ryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libgdi32.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_6
4-w64-mingw32\lib\libwinspool.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libcomdlg32.a E:\strawber
ryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libadvapi32.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x8
6_64-w64-mingw32\lib\libshell32.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libole32.a E:\strawberr
yBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\liboleaut32.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86
_64-w64-mingw32\lib\libnetapi32.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libuuid.a E:\strawberry
Build\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libws2_32.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64
-w64-mingw32\lib\libmpr.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libwinmm.a E:\strawberryBuild\5
.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libversion.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-m
ingw32\lib\libodbc32.a E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libodbccp32.a E:\strawberryBuild\5
.18.0.1-64-20130905-bootstrap\c\x86_64-w64-mingw32\lib\libcomctl32.a dll.exp
MQSeries.o:MQSeries.c:(.text+0x150): undefined reference to `MQSTAT'
MQSeries.o:MQSeries.c:(.text+0x15aa): undefined reference to `MQSETMP'
MQSeries.o:MQSeries.c:(.text+0x2c28): undefined reference to `MQINQMP'
MQSeries.o:MQSeries.c:(.text+0x3bad): undefined reference to `MQDLTMP'
MQSeries.o:MQSeries.c:(.text+0x40ba): undefined reference to `MQDLTMH'
MQSeries.o:MQSeries.c:(.text+0x45d3): undefined reference to `MQCRTMH'
MQSeries.o:MQSeries.c:(.text+0x4f91): undefined reference to `MQSET'
MQSeries.o:MQSeries.c:(.text+0x556c): undefined reference to `MQBEGIN'
MQSeries.o:MQSeries.c:(.text+0x5888): undefined reference to `MQBACK'
MQSeries.o:MQSeries.c:(.text+0x5a68): undefined reference to `MQCMIT'
MQSeries.o:MQSeries.c:(.text+0x5c4d): undefined reference to `MQDISC'
MQSeries.o:MQSeries.c:(.text+0x5eb7): undefined reference to `MQCLOSE'
MQSeries.o:MQSeries.c:(.text+0x89a9): undefined reference to `MQGET'
MQSeries.o:MQSeries.c:(.text+0x1040e): undefined reference to `MQPUT1'
MQSeries.o:MQSeries.c:(.text+0x1635c): undefined reference to `MQPUT'
MQSeries.o:MQSeries.c:(.text+0x17b21): undefined reference to `MQINQ'
MQSeries.o:MQSeries.c:(.text+0x198b9): undefined reference to `MQOPEN'
MQSeries.o:MQSeries.c:(.text+0x1ca72): undefined reference to `MQCONNX'
MQSeries.o:MQSeries.c:(.text+0x1cf8b): undefined reference to `MQCONN'
e:/strawberrybuild/5.18.0.1-64-20130905-bootstrap/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.ex
e: MQSeries.o: bad reloc address 0x0 in section `.pdata'
e:/strawberrybuild/5.18.0.1-64-20130905-bootstrap/c/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.ex
e: final link failed: Invalid operation
collect2: ld returned 1 exit status
dmake: Error code 129, while making '..\blib\arch\auto\MQClient\MQSeries\MQSeries.dll'
dmake: Error code 255, while making 'subdirs'
E:\strawberryBuild\5.18.0.1-64-20130905-bootstrap\data\.cpanplus\5.18.0\build\MQSeries-1.34>