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
Build with MSVC-14 (Visual Studio 2015) / Windows 10 not possible #7263
Comments
Comment author: gerd In deed, when I rebuild flexdll_msvc.obj and flexdll_initer_msvc.obj, the error vanishes: cl /nologo /MD -D_CRT_SECURE_NO_DEPRECATE /GS- /DMSVC -c /Fo"flexdll_msvc.obj" flexdll.c |
Comment author: gerd msvcrt.lib is no longer sufficient. You also need to link in ucrt.lib and vcruntime.lib (https://msdn.microsoft.com/en-us/library/abx4dbyh.aspx) I changed MKEXE in config/Makefile as follows: |
Comment author: gerd Also, there is now snprintf, and you get an error if you try to #define it: cl -nologo -D_CRT_SECURE_NO_DEPRECATE -Feobjinfo_helper.exe -Ox -MD Solution: commented "#define snprintf caml_snprintf" out in byterun/caml/misc.h |
Comment author: gerd With these fixes I could complete the build. |
Comment author: @dra27 This is a bug (of sorts) in the binary distro of FlexDLL - there's a move (prompted by VS2015 support) towards the "binary" distribution of FlexDLL being flexlink.exe and the .c files. |
Comment author: @damiendoligez In 4.04, I've added a note to README.win32.adoc to say that you must recompile FlexDLL from source if you're using VS2015. The snprintf thing was fixed by @dra in commit 12a9af9. This seems to be enough to fix it all, although the FlexDLL makefile still gives some error messages when trying to get the OCaml version number. |
Comment author: @dra27 The problem with the FlexDLL Makefile should be harmless as long as you're building OCaml 4.03.0 or later. It's also fixed in master (and so 0.36) |
Original bug ID: 7263
Reporter: gerd
Status: resolved (set by @damiendoligez on 2016-09-27T13:50:24Z)
Resolution: fixed
Priority: normal
Severity: block
Version: 4.02.3
Target version: 4.04.0 +dev / +beta1 / +beta2
Fixed in version: 4.04.0 +dev / +beta1 / +beta2
Category: platform support (windows, cross-compilation, etc)
Tags: patch
Monitored by: @gasche @hcarty
Bug description
The suggested Win 7 SDK (in README.win32) does not install under Win 10. Because of that I tried it with something newer, namely MSVC 14 Express For Desktop with Win 10 SDK.
However, this leads to a problem:
$ make -f Makefile.nt world
cd byterun ; make -f Makefile.nt all
make[1]: Entering directory '/home/gerd/tmp/ocaml-4.02.3/byterun'
flexlink -merge-manifest -stack 16777216 -exe -o ocamlrun.exe prims.obj ws2_32.lib
libcamlrun.lib
** Cannot resolve symbols for descriptor object:
___iob_func
_sprintf
Steps to reproduce
Find attached my script for setting the environment variables.
Additional information
This could be an incompatibility of the libraries distributed with flexlink, because I find there the symbols __imp__sprintf and __imp____iob_func. See also this Stack Overflow article: http://stackoverflow.com/questions/30412951/unresolved-external-symbol-imp-fprintf-and-imp-iob-func-sdl2
File attachments
The text was updated successfully, but these errors were encountered: