There are two steps you need to follow in order to compile a dll:
- Compile your source files to object files
- Link your object files to a dynamic link library (DLL)
Here is one example using gcc:
gcc -c source.cpp //compile sources; will output "source.o"
gcc -shared -o mydll.dll source.o //add -shared to create a dll, will output "mydll.dll"
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…