Created
March 4, 2016 17:43
-
-
Save jsancheznet/23b1fc8c592455f1bb84 to your computer and use it in GitHub Desktop.
Building Static Library in MSVC Command Line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When you build on the Visual Studio command line, you must build the program in two steps. | |
First, run cl /c /EHsc MyLib.cpp to compile the code and create an object file that's named MyLib.obj. | |
(The cl command invokes the compiler, Cl.exe, and the /c option specifies compile without linking. For more information, see /c (Compile Without Linking).) | |
Second, run lib MathFuncsLib.obj to link the code and create the static library MathFuncsLib.lib. | |
(The lib command invokes the Library Manager, Lib.exe. For more information, see LIB Reference.) |
oh thank you for the answer!!!! i resolved with /OUT :DD
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, have you tried the /Fe flag?
Here's a link to MSDN that lists the compiler flags
https://docs.microsoft.com/en-us/cpp/build/reference/compiler-options-listed-by-category?view=msvc-160