Image:
Image:
Modify the compiler option to convert a DLL project to a Windows project.
Sometimes the compilation type of the project needs to be converted.
For example, compile a Windows program into a DLL or compile a DLL project into a console for convenience of debugging.
In the open-source project gh0st of codediyer by cloud, the debugging version is the console release piece and the DLL
Haha, this is mainly for vc6, but it is not very different from the vs series.
If it is Delphi or another IDE compiler, it may be different. I have never used it and I do not know it.
1. Differences between projectoptions in link options
The option after/nologo is used to set the compilation subsystem type
DLL type:/DLL
Console is/subsystem: Console
Windows:/subsystem: Windows
2. In Preprocessor definitions of the (C/C ++) Compilation Option
DLL is
Win32, _ debug, _ WINDOWS, _ MBCS, _ usrdll, mydll_exports
Console is
Win32, _ debug, _ console, _ MBCS
Windwos is
Win32, _ debug, _ WINDOWS, _ MBCS
3. Key Points of DLL project Conversion
If the DLL is converted to Windows or console, you need to remove the export function from the DLL.
4. output file name and Path
You can specify the output file name and path in the output file name of link.
After the compilation type is modified, you can modify the file name here to switch the file name after compilation.
Based on the above three items, you can switch between Windows console and DLL files.
I just drew two images.