Git Product home page Git Product logo

Comments (6)

dra27 avatar dra27 commented on June 3, 2024

Can I ask what your use-case is here? (welcome to GitHub, by the way!)

@alainfrisch - why was -custom-crt added? Of possible relevance, in case your memory is as bad as mine at the moment: https://sympa.inria.fr/sympa/arc/caml-list/2009-07/msg00024.html.

As it happens, I think the fix should possibly go further and not specify either /nodefaultlib, since the reason msvcrt.lib would be pulled in anyway would be because the user was linking objects compiled with cl /MD, so it should really be the caller's responsibility to say -custom-crt (disable flexlink automatically linking with the runtime dll) and then -link /nodefaultlib:msvcrt (prevent the linker automatically adding it in, because I'm linking objects which expected it).

from flexdll.

ccuchet avatar ccuchet commented on June 3, 2024

Hello

We would like to use LIBCMT and not MSVCRT in an OCaml application.
We compile C files with option '/MT' (not '/MD') and would like to link with LIBCMT.lib (and not MSVCRT.lib).

It is fine if FlexDLL option '-custom-crt' just avoids adding 'msvcrt.lib' and does nothing more.

Thanks

from flexdll.

alainfrisch avatar alainfrisch commented on June 3, 2024

Yes, my memory is at least as bad as yours. I think -custom-crt was an experiment to allow linking with libcmt, but I never really managed to make it work full scale.

@ccuchet After the suggested fix (or the "going further" variant), are you indeed able to link your OCaml application with libcmt? You probably need to recompile at least the OCaml runtime system, no?

from flexdll.

ccuchet avatar ccuchet commented on June 3, 2024

Yes we compile the OCaml runtime with option /MT
and after the suggested fix we can link with no errors with LIBCMT.lib
(we do not use dynamic loading of DLL in our application).

from flexdll.

dra27 avatar dra27 commented on June 3, 2024

@ccuchet - thanks for the info! That's pretty that that still works. Did you completely disable native code dynamic linking in your build of OCaml, or are you just not using it?

Would you be willing to create a pull request with the change (if not, Alain or I can do so)?

from flexdll.

ccuchet avatar ccuchet commented on June 3, 2024

We just do not use dynamic linking.

Can you please do the pull request for me, because I am new with Github and do not want to make mistakes :-)

Thanks

from flexdll.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.