Comments (6)
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.
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.
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.
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.
@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.
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)
- Cannot relocate on OCaml 4.13.1 [Windows] HOT 1
- Implementing a less memory intensive read function HOT 9
- Temporary files not deleted on exit HOT 3
- Generate import library for exported function of the main executable file HOT 5
- findlib sometimes cannot be built on Windows HOT 3
- Support for /alternatename: linker directive needed for x86 HOT 2
- Fix parallel access to global symbol structures
- flexlink: simplify static linking with libstdc++
- Upgrade from msvcrt.lib to ucrt.lib HOT 6
- ** Fatal error: Cannot parse directive: -exclude-symbols:__alloca
- Compile ERROR with MSVC VS2019 HOT 3
- Fail to find a function in the executable (pg_query) HOT 5
- Conditionally link with gcc_eh
- MSYS2/ucrt64 support HOT 2
- Cannot resolve symbols for swscanf
- Switch to Unix.create_process for auxiliaries
- MSVC flexlink appears to attempt cygpath
- Issue with link order of archive files specified twice on the command line HOT 11
- "Cannot relocate" error with flexdll in OCaml for Windows 4.11 (and older versions) HOT 8
- `-print-search-dirs` may return `;`-delimited mixed paths on MSYS2 HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flexdll.