On 2013-04-12, at 1:10 AM, Ralph Möritz ralph.moeritz@outlook.com wrote:
Hi,
I've downloaded `gambc-v4_6_7-devel.tgz' and want to compile it with MSVC 11. I've tried tweaking `misc\vc2008.bat' but it bombs out with errors :-(
How are the prebuilt VC binaries on the Gambit homepage built - ie. what's the recommended way to do this?
Check out the subdirectory prebuilt/windows . The build procedure uses the standard Unix tools ("make", "sed", etc) from MinGW to drive the build process with the VC compiler.
Does this mean I need MSYS? (to run ./configure)
misc/vc2008.bat should be the easiest approach. The hardest part is getting the PATH set up properly at the top of the vc2008.bat file. By the way, what were the errors you got?
There's an initial batch of errors, right after running vc2008.bat (renamed to vc2012.bat with updated path):
F:\Ralph\Temp\src\gambc-v4_6_7-devel\misc>echo #ifndef ___VOIDSTAR_WIDTH 1>include\gambit.h The system cannot find the path specified. F:\Ralph\Temp\src\gambc-v4_6_7-devel\misc>echo #define ___VOIDSTAR_WIDTH ___LONG _WIDTH 1>>include\gambit.h The system cannot find the path specified. F:\Ralph\Temp\src\gambc-v4_6_7-devel\misc>echo #endif 1>>include\gambit.h The system cannot find the path specified. F:\Ralph\Temp\src\gambc-v4_6_7-devel\misc>echo #ifndef ___MAX_CHR 1>>include\gambit.h The system cannot find the path specified. F:\Ralph\Temp\src\gambc-v4_6_7-devel\misc>echo #define ___MAX_CHR 0x10ffff 1>>include\gambit.h The system cannot find the path specified. F:\Ralph\Temp\src\gambc-v4_6_7-devel\misc>echo #endif 1>>include\gambit.h The system cannot find the path specified. F:\Ralph\Temp\src\gambc-v4_6_7-devel\misc>type include\gambit.h.in 1>>include\gambit.h The system cannot find the path specified. F:\Ralph\Temp\src\gambc-v4_6_7-devel\misc>cd lib The system cannot find the path specified.
After this everythinig appears to build fine & the file `bin\gsc-cc-o.bat' is produced. Running this from a command prompt with VC vars set (and gcc in the path) gives the following error:
cl : Command line warning D9024 : unrecognized source file type '', object file assumed LINK : warning LNK4001: no object files specified; libraries used LINK : warning LNK4068: /MACHINE not specified; defaulting to X86 LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12 .dll : fatal error LNK1120: 1 unresolved externals
Any ideas what might be going wrong? Did I maybe miss a step somewhere (eg. running ./configure in the root)
The problem is that you are in the wrong directory! You should be in the Gambit root directory and type:
misc\vc2008.bat
I'll add this information to the top of the batch files so that it is clearer.
Marc