Interesting, as I am myself developing Gecode on Windows with cygwin and MSVC (same version) I can reassure you that enable-debug does work. Also, you just add the variables once to your .bashrc file. Or, if you are really lazy: start bash and run vcvars.bat in it. That's it.
As it comes to shipping the pdb files, I think that's a good idea. Will do for Gecode 2.0.0. BTW: We intend to release 31. October 2007. The system is ready apart from minor cleanups and major platform fiddling (on different platform we have different issues). If you are curious, you can already get it from svn. Christian -- Christian Schulte, http://www.imit.kth.se/~schulte/ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Filip Konvicka Sent: Friday, September 21, 2007 3:24 PM To: Guido Tack Cc: [EMAIL PROTECTED] Subject: Re: [gecode-users] pdb files Guido Tack (21.9.2007 7:55): > Filip Konvička wrote: >> Is there a >> recommended way of obtaining the pdb files? I think that it's >> necessary to pass "/DEBUG /PDB:"GecodeKernel.pdb" to link.exe for the >> release build. (This IMHO does not change the dll files themselves, >> it just creates appropriate pdbs and thus enables debugging.) > > You can configure Gecode using > > ./configure --enable-debug CC=cl CXX=cl > > (and any other options you want). Then build it (as detailed in the > documentation). This will create the pdb files. Hm, not exactly what I want. To give you the whole funny story, I'll start at the beginning :-) First, I installed cygwin, then added the things that configure complained about. I'm using MSVC 8, so I executed the following: export PATH=/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8/Common7/IDE:/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC/BIN:/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8/Common7/Tools:/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8/Common7/Tools/bin:/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC/PlatformSDK/bin:/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8/SDK/v2.0/bin:/cygdrive/c/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC/VCPackages:$PATH export INCLUDE='C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE;C:\Program Files\Microsoft Visual Studio 8\VC\INCLUDE;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\include' export LIB='C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\LIB;C:\Program Files\Microsoft Visual Studio 8\VC\LIB;C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\lib;C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib' export LIBPATH= which is probably worth mentioning in the docs, as everybody probably needs this and it is tiresome to reinvent (all of this comes from vcvars32.bat somewhere in VC8 dirs). Anyway, configure went fine, so I ran "make". I think I had to install "diff" and "make", which configure did not check, and then make started complaining about missing perl. So I installed that, but this time things got a bit worse, since compile failed in gecode/int/int-set.cc (I think), complaining that (at gecode\int\var.icc line 40) "IntVarImpBase" was not a base class. I found out, after a while, that the defining include file "gecode\int\var\imp-hdr.icc" was empty, probably cause of the previous perl absence (which created it, zero-size, and failed, so subsequent make attempts did not bother to re-create the file). The problem is that the generated icc files are not deleted by "make veryclean". OK, then I finally succeeded compiling everything with "configure CC=cl CXX=cl", so I tried --enable-debug, which does not work: cl -nologo -EHsc -Zi -LDd MDd gecode/kernel/exception.obj gecode/kernel/core.obj gecode/kernel/memory-manager.obj \ -FeGecodeKernel.dll cl : Command line warning D9024 : unrecognized source file type 'MDd', object file assumed LINK : fatal error LNK1181: cannot open input file 'MDd.obj' Clearly, it tries to pass "MDd" instead of "/MDd" to cl.exe. Never mind, this is not what I want anyway, as it uses "-Zi -LDd" instead of "-Ox". In other words, I wanted to generate release-mode dlls and the corresponding pdb files (so that I have full-performance gecode with external symbols that enable call-stack decryption). After some research, I found out that the easiest way is to invoke export LINK="/DEBUG /OPT:REF /OPT:ICF" before running make. The generated dlls are essentially same as the distributed ones (only some header bits are changed to indicate that symbols exist somewhere, AFAICT), and I have a set of pdb files so that I can see the call stack while debugging my actors. If it's not too complicated, I suggest that you build and distribute the pdb files in an installer package - maybe as an optional download, it's a 1,4 MB 7-zip (one floppy, rememer? :-)). It makes debugging in MSVC much easier. Cheers, Filip _______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users _______________________________________________ Gecode users mailing list [EMAIL PROTECTED] https://www.gecode.org/mailman/listinfo/gecode-users
