Sunday, March 9, 2014
How to Compile C Code as a Library
1. Click the Windows 'Start' button and type 'cmd' in the search text box. Press 'Enter' to open the command prompt.
2. Type 'cd path' where 'path' is the location of your C source code file. Press 'Enter' to move to the location of the file.
3. Type the following code to compile the C source code to the DLL file:cl.exe --output myfile.dll myfile.cppReplace 'myfile.dll' with the name of the DLL you want to use for the link file. Replace 'myfile.cpp' with your own C source code file.
4. Press 'Enter' to compile the program. After the compiler completes the creation of the DLL, type 'dir' and press 'Enter.' You should see the DLL file in your directory.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment