[gecode-users] How to use Gecode binaries from within MSVC's IDE

Christian Schulte cschulte at kth.se
Mon Aug 25 20:53:13 CEST 2008


The truly bizarre aspect of all this mess is that whatever we build on the commandline works totally fine (I also use 2008 SP1).

Only when the MSVC IDE links against the dlls we built on the commandline, things go wrong. And then, of course, I started to wade through all the macros that the MSVC IDE defines (let me not get started about how well they are documented...). So far, no luck. (Not to mention that when we build on the commandline with _UNICODE and UNICODE defined -- yes, of course, one would have to define both: isn't that crystal clear and goes without further explanation, so please, we really don't need any documentation on this -- things go bang as well).

So there is no bug in Gecode, it is that we not yet have found the right voodoo or incantation to have our dlls appreciated by MSVC and to have Unicode working...

I'll keep you guys posted.

Cheers
Christian

-----Original Message-----
From: Filip Konvička [mailto:filip.konvicka at logis.cz] 
Sent: Monday, August 25, 2008 5:26 PM
To: Christian Schulte
Cc: users at gecode.org
Subject: Re: [gecode-users] How to use Gecode binaries from within MSVC's IDE


> First, the "fix" I just send does not fix the problem... It does for me but
> not for Jan.
>
> The crashes are totally bizarre, as far as the debugger tells the crash
> occurs right in the heart of copying... That's close to impossible as Gecode
> does not use char there...
>
Well, if someone overwrites memory somewhere else, anything can occur...
> I'll have a closer look tomorrow (my problem is that I know very little
> about MSVC's IDE and hoped that I could get away with that). I'll try the
> voodoo you suggest.
>
This almighty cure is mainly for solving issues with wstringstream and
std::wcin/std::wcout, but who knows, it saved me a lot of trouble already.
> Maybe, you still use MSVC 2005?
>
I already have MSVC 2008 SP1. All Gecode scripts I'm running now use
UNICODE and no crashes occur (even with my FloatVars :-)). However, one
thing on my TODO list is investigating this: when I break the execution
somewhere and inspect the variables (like FloatVarImp or IntVarImp), the
'home' pointer inside all variables is set to '0xBAADF00D', which is a
little scary. You know, everything seems to work, but it's creepy. So
far I thought that maybe I miscompiled Gecode somehow...

Cheers,
Filip






More information about the gecode-users mailing list