[gecode-users] Linker errors when compiling Gecode with GCC on Windows

Guido Tack tack at gecode.org
Mon May 13 01:32:46 CEST 2013


Hi,

please try linking in the order explained in Sect. 2.3.3 in MPG.  If that doesn't solve the problem, try the --disable-gcc-visibility configure option (although I'm not sure if that works with mingw).  It's possible that the visibility attributes don't work with the current configuration for mingw (we don't test mingw at all).

Cheers,
Guido

On 13/05/2013, at 12:24 AM, Mailing List Email <mailinglistx at gmail.com> wrote:

> Hi all,
> 
> I'm trying to compile some Gecode code with GCC on Windows. I am getting the following linking errors:
> 
> ccUI4ffQ.o:NoOverlap.cpp:(.text$_ZN6Gecode9ExceptionD2Ev[__ZN6Gecode9ExceptionD2Ev]+0xe): undefined reference to `_imp___ZTVN6Gecode9ExceptionE'
> ccUI4ffQ.o:NoOverlap.cpp:(.text$_ZN6Gecode15MemoryExhaustedC1Ev[__ZN6Gecode15MemoryExhaustedC1Ev]+0x1e): undefined reference to  `_imp___ZN6Gecode9ExceptionC2EPKcS2_'
> c:/test/mingw64-4.8/bin/../lib/gcc/i686-w64-mingw32/4.8.0/../../../../i686-w64-mingw32/bin/ld.exe: C:\Users\Mana\AppData\Local\Temp\ccUI4ffQ.o: bad reloc address 0x1e in section `.text$_ZN6Gecode15MemoryExhaustedC1Ev[__ZN6Gecode15MemoryExhaustedC1Ev]'
> collect2.exe: error: ld returned 1 exit status
> 
> I compiled Gecode myself on Windows using mingw. These errors occur no matter what libraries I try to link. Always the same error.
> For example, I've tried the following command line:
> 
> cls && g++ -isystem"C:\Program Files\Gecode\include" -L"D:\Dropbox\Stuff\Projects\gecode-4.0.0\build" -Wall -std=c++11 NoOverlap.cpp SquarePacking.cpp -lgecodedriver -lgecodeflatzinc -lgecodefloat -lgecodegist -lgecodeint -lgecodekernel -lgecodeminimodel -lgecodesearch -lgecodeset -lgecodesupport
> 
> But it still gives the same error.
> Any ideas?
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users




More information about the users mailing list