From: Adrien Nader <adrien@notk.org>
To: Leonardo Laguna <modlfo@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Embedding Ocaml in a windows application
Date: Fri, 9 May 2014 22:20:46 +0200 [thread overview]
Message-ID: <20140509202046.GA17828@notk.org> (raw)
In-Reply-To: <CAF=ojbXh0KbnwZJsn4igz-pPyROhZC4iafx71LkDjg8rhFJ5ew@mail.gmail.com>
On Fri, May 09, 2014, Leonardo Laguna wrote:
> I have given up on compiling the msvc port. I don't know why I'm getting
> errors when the '.exe' is not there.
>
> I will try to explain better what I want to do.
>
> I have the following files:
>
> - plug.lib (provided by the software vendor, closed source, compiled with
> VC++), in OSX I have plug.a
> - my_main.c (the code for the plugin)
> - ocaml_stub.c (this code calls 'caml_startup()')
> - ocaml_code.ml
>
> in OSX I compile my_main.c, ocaml_stub.c and ocaml_code.ml to obtain '.o'
> files. Then I link the .o files with plug.a and libasmrun.a. This works
> fine.
>
> In windows I have wodi32, visual studio 2008 and Flexdll. I tried the
> following.
> - Using cl compile, ocaml_stub.c, my_main.c to obtain '.obj' files
> - Using ocamlopt, compile ocaml_code.ml to obtain a '.o' file
> - Using flexlink to link the .obj, .o, libasmrun.a, plug.lib, libgcc.a and
> libc.a
>
> This gives me an error:
>
> ** Cannot resolve symbols for libasmrun.a(floats.o):
> ___strtod
>
> I have tried to create my own strtod function and link it does not pick it.
>
> Anybody knows how can I link my program.
Can you provide the commands? In particular the flexlink one?
Also you probably shouldn't call flexlink directly; using ocamlc should
do it.
--
Adrien Nader
next prev parent reply other threads:[~2014-05-09 20:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 7:42 Leonardo Laguna
2014-05-09 12:13 ` Adrien Nader
2014-05-09 20:16 ` Leonardo Laguna
2014-05-09 20:20 ` Adrien Nader [this message]
2014-05-09 20:27 ` Leonardo Laguna
2014-05-09 20:40 ` David Allsopp
2014-05-09 21:54 ` Adrien Nader
2014-05-09 22:00 ` Leonardo Laguna
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=20140509202046.GA17828@notk.org \
--to=adrien@notk.org \
--cc=caml-list@inria.fr \
--cc=modlfo@gmail.com \
/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