New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build OCaml 3.12.1 Win32/MSVC #5383
Comments
Comment author: @protz Hi, Thanks for reporting this. Can you provide any explanation as to why this is failing now?
I'm not familiar with MSVC but it seems weird that we should be defining something private (starting with _). Thanks, jonathan |
Comment author: avlasov Defining _WIN32_WINNT is a standard Microsoft way to specify the minimum system required. Actually, another file in OCaml 3.12.1 source code otherlibs\win32unix\winworker.h already defines _WIN32_WINNT as 0x0400. If the appropriate _WIN32_WINNT version is not defined, then compiling files referencing TryEnterCriticalSection should normally fail, since it is not in the original WIN32, but was added later. |
Comment author: @protz That's a good justification, thanks :-). Could you possibly submit a patch against latest HEAD, using diff --git? Cheers, jonathan |
Comment author: @xavierleroy To be fixed as suggested by the reporter. Thanks. |
Comment author: @protz Fixed in r12100 (trunk) and r12101 (version/3.12). |
git-svn-id: http://caml.inria.fr/svn/ocaml/version/3.12@12101 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Original bug ID: 5383
Reporter: avlasov
Assigned to: @protz
Status: closed (set by @xavierleroy on 2013-08-31T10:46:18Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.12.1
Fixed in version: 3.13.0+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @protz
Bug description
The OCamk 3.12.1 Win32/MSVC build is failed, using Microsoft VS 2005 (I was following instructions from README.win32).
When building 'make -f Makefile.nt world', the following error happens:
../../../ocamlcomp.sh -o ocamlbrowser.exe -I ../../../otherlibs/win32unix -I ../
../../otherlibs/str -I ../../../otherlibs/systhreads -I ../labltk -I ../lib -I .
./support -I ../../../parsing -I ../../../utils -I ../../../typing
../../../toplevel/toplevellib.cma
unix.cma str.cma threads.cma -custom -ccopt "-link /subsystem:wi
ndows" labltk.cma jglib.cma
list2.cmo useunix.cmo setpath.cmo lexical.cmo file
select.cmo searchid.cmo searchpos.cmo shell.cmo help.cmo viewer.cmotyp
echeck.cmo editor.cmo main.cmo winmain.obj
camlprim8e0eac.c
** Cannot resolve symbols for ../../../otherlibs/systhreads\libthreads.lib(st_st
ubs_b.obj):
_TryEnterCriticalSection
The problem actually can be easily fixed by inserting '#define _WIN32_WINNT 0x0400' before '#include <windows.h>' in the file otherlibs\systhreads\st_win32.h.
For some reason st_stubs.obj has been compiled earlier, while TryEnterCriticalSection normally require _WIN32_WINNT >= 0x0400 to be defined.
The text was updated successfully, but these errors were encountered: