On Wed, Jun 24, 2015 at 10:11 AM, Alain Frisch <alain@frisch.fr> wrote:
This could come from .obj files shipped with flexdll.  You could try to produce new versions of flexdll_msvc.obj, flexdll_initer_msvc.obj (and the *msvc64.obj versions) by recompiling sources with MSVC 14.  Sources can be found:

https://github.com/alainfrisch/flexdll

See also the Makefile for build instructions on these .obj files.

Let us know how this goes!

​This has indeed helped a bit. In my case I'm focusing on a 64-bit build so regenerated the objects with these commands

cl.exe /nologo /MD -D_CRT_SECURE_NO_DEPRECATE /GS- /DMSVC  -c /Fo"flexdll_msvc64.obj" flexdll.c
cl.exe /nologo /MD -D_CRT_SECURE_NO_DEPRECATE /GS- /DMSVC -c /Fo"flexdll_initer_msvc64.obj" flexdll_initer.c

That proved enough to get a build of 'ocaml_run.exe'. We run into problems now at a later step:

flexlink -x64 -merge-manifest -stack 33554432 -exe -o tmpheader.exe headernt.obj legacy_stdio_wide_specifiers.lib legacy_stdio_definitions.lib

Specifically, the link errors are 

flexlink -x64 -merge-manifest -stack 33554432 -exe -o tmpheader.exe headernt.obj legacy_stdio_wide_specifiers.lib legacy_stdio_definitions.lib
flexdll_msvc64.obj : error LNK2019: unresolved external symbol __imp___acrt_iob_func referenced in function allow_write
flexdll_msvc64.obj : error LNK2019: unresolved external symbol __imp_fflush referenced in function dump_symtbl
flexdll_msvc64.obj : error LNK2019: unresolved external symbol __imp___stdio_common_vfprintf referenced in function _vfprintf_l
flexdll_msvc64.obj : error LNK2019: unresolved external symbol __imp___stdio_common_vsprintf referenced in function _vsnprintf_l
flexdll_msvc64.obj : error LNK2019: unresolved external symbol memcpy referenced in function cannot_resolve_msg
dyndlld1e979.obj : error LNK2001: unresolved external symbol memcpy
flexdll_msvc64.obj : error LNK2019: unresolved external symbol strcmp referenced in function compare_dynsymbol
dyndlld1e979.obj : error LNK2001: unresolved external symbol strcmp
flexdll_msvc64.obj : error LNK2019: unresolved external symbol strlen referenced in function cannot_resolve_msg
dyndlld1e979.obj : error LNK2001: unresolved external symbol strlen
flexdll_msvc64.obj : error LNK2019: unresolved external symbol __imp_free referenced in function flexdll_dlclose
flexdll_msvc64.obj : error LNK2019: unresolved external symbol __imp_malloc referenced in function flexdll_dlopen
flexdll_msvc64.obj : error LNK2019: unresolved external symbol __imp_bsearch referenced in function find_symbol
flexdll_msvc64.obj : error LNK2019: unresolved external symbol __imp_exit referenced in function allow_write
flexdll_msvc64.obj : error LNK2019: unresolved external symbol __imp__putenv_s referenced in function flexdll_dlopen
tmpheader.exe : fatal error LNK1120: 12 unresolved externals
** Fatal error: Error during linking

It appears to me that there is an underlying link command involved that reads something like

link /nologo /verbose  /implib:"C:\cygwin\tmp\dyndll_implib6ce752.lib" /out:"tmpheader.exe" /subsystem:console "C:\Program Files (x86)\flexdll\flexdll_msvc64.obj" "headernt.obj" "C:\cygwin\tmp\dyndll15a7c1.obj" /base:0x10000 msvcrt.lib

Any ideas?

-- 
Shayne Fletcher