As I said, mingw is not officially supported, and I can't test it here.  There 
were some messages on the mailing list a while ago about how to compile using 
mingw, and it involved changing quite a few things.

The only thing you could try is to change all the GECODE_VTABLE_EXPORT to 
GECODE_{KERNEL,SUPPORT,INT,...}_EXPORT in the exception.hpp files (depending on 
which module they're in), perhaps that does the trick.

Cheers,
Guido

On 13/05/2013, at 9:39 AM, Mailing List Email <mailingli...@gmail.com> wrote:

> Tried the linker order. Same error. Also same error if I remove all the -l 
> options. It simply can't find the symbols.
> --disable-gcc-visibility doesn't work, at least on mingw based on gcc 4.8.
> 
> 
> On 13 May 2013 01:32, Guido Tack <t...@gecode.org> wrote:
> 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 <mailingli...@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@gecode.org
> > https://www.gecode.org/mailman/listinfo/gecode-users
> 
> 

_______________________________________________
Gecode users mailing list
users@gecode.org
https://www.gecode.org/mailman/listinfo/gecode-users

Reply via email to