Reputation: 33813
I want to compile the wxWidgets v3.0.0
from visual C++ 2010
command line, and I want to use /MT
option which responsible for the C Runtime Library. and the following is what I have done:
nmake /MT -f makefile.vc BUILD=release MONOLITHIC=0 SHARED=0 UNICODE=1
But there is an error in the previous command nmake fatal error u1065 invalid option 'M
, because this /MT
. Note that /MT
, /MD
, etc are options in the compiler.
Now, how can I write the correct command that can control in use C runtime Library (Static
or Dynamic
)?
Screenshot for the target option in the IDE.
Upvotes: 0
Views: 644
Reputation: 22678
There is RUNTIME_LIBS
, documented in build\msw\config.vc
file, make option which can be used to select the kind of CRT to use. In your case you want to add RUNTIME_LIBS=static
to your make command line. I.e. the full command becomes
nmake /f makefile.vc BUILD=release RUNTIME_LIBS=static
(MONOLITHIC
, SHARED
and UNICODE
values you use are the defaults anyhow, so you can just as well omit them).
Upvotes: 0
Reputation: 119847
nmake
does not accept the same options your compiler accepts. It just doesn't work this way. You control the compiler and other programs invoked by nmake
by creating and editing makefiles. You can find one such makefile in the list of command line arguments, it's the one after -f
.
If you want to use a tool from the make
family you must try to read and understand at least a basic make
tutorial. I will not attempt to explain make
from scratch here.
If your makefile is not too complex you might be able to figure out the required changes on your own, but I highly recommend reading a basic make
or nmake
tutorial anyway.
Upvotes: 1