Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Shayne Fletcher <shayne.fletcher.50@gmail.com>
To: Alain Frisch <alain@frisch.fr>
Cc: "caml-list@inria.fr users" <caml-list@inria.fr>
Subject: Re: [Caml-list] Build failure under Visual Studio 2015
Date: Wed, 24 Jun 2015 11:25:06 -0400	[thread overview]
Message-ID: <CAMsAzy_rqqm6JpymydmyYTD=skW2f3nLTSJ-Rjm+N7LQ_=OMBg@mail.gmail.com> (raw)
In-Reply-To: <558ABAA6.6070401@frisch.fr>

[-- Attachment #1: Type: text/plain, Size: 3333 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 4680 bytes --]

  reply	other threads:[~2015-06-24 15:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24 13:39 Shayne Fletcher
2015-06-24 14:11 ` Alain Frisch
2015-06-24 15:25   ` Shayne Fletcher [this message]
2015-06-24 15:47     ` Shayne Fletcher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMsAzy_rqqm6JpymydmyYTD=skW2f3nLTSJ-Rjm+N7LQ_=OMBg@mail.gmail.com' \
    --to=shayne.fletcher.50@gmail.com \
    --cc=alain@frisch.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox