Need better /MD multithreaded dll support
See original GitHub issueI’m trying to compile the node.js extension with the following binding.gyp file:
{
"targets": [
{
"target_name": "MyLib",
"type": "shared_library",
"sources": [ ... ],
"conditions": [
[ "OS=='win'", { "libraries": [
"..\\Library\\binaries\\x64\\Release\\mylib.lib"
] } ]
]
}
]
}
and VS2012 Pro. The command line is following:
node-gyp configure --msvs_version=2012 && node-gyp build
This causes the error:
error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease'
Changing the property “RuntimeLibrary” in the vcxproj file from “MultiThreaded” to “MultiThreadedDLL” fixes compilation.
Is it correct workaround?
Thanks, Alex
Issue Analytics
- State:
- Created 10 years ago
- Comments:14 (8 by maintainers)
Top Results From Across the Web
MD, -MT, -LD (Use Run-Time Library) - Microsoft Learn
Indicates whether a multithreaded module is a DLL and specifies retail or debug versions of the run-time library. Syntax. Copy. /MD[d] / ...
Read more >Multi-threaded DLL (/MD) vs Multi-threaded (/MT) [duplicate]
One project build as exe with using above three libraries. I need to host this application without CLR support in windows XP. so...
Read more >How to build static multithread debug dll ... - Google Groups
I am building latest master branch webrtc for vs2015 using the new gn build but can't figure out how to get it to...
Read more >build libmxnet.dll with /MD (Multithreaded DLL runtime)
Basically, I only need to be able to use the prediction API (and nothing more), since the networks will have been trained under...
Read more >Multi-threaded DLL (/MD)crash the application on Relese mode
No, you've given us absolutely nothing to go on. I'm sure you'll get a few guesses, but that's all and will most likely...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Note: I also found I could override the settings within my binding.gyp as mentioned here by doing:
But this seems less ideal because it results in many warnings about the settings being overridden on the command line.
I think this can be closed - looks like we do provide
/MD
support if one builds node that way.