How do I statically link my C/C++ program with C-Set++?

There are several flags you must use to get static linking work.

Add the flag /Tdp when compiling C/C++ sources. This flag ensures that any template functions are resolved correctly.

When linking the program, make sure that the /B flag looks like this: /B"/pmtype:pm /NOI /NOE /NOD".

/NOD Tells the linker to disregard default libraries

/NOE Tells the linker to ignore extended library information
found in the object files.

/NOI Maintains the case sensitivity for identifier names.

Linking a typical PM program might look like this: myapp.exe: $(OBJS) myapp.res
icc $(CFLAGS) /Gn+ /Ge+ /Gd- /Gm+ /Fe myapp.exe $(OBJS) myapp.def \
/B"/pmtype:pm /NOI /NOE /NOD" DDE4MBS.LIB DDE4MUIB.LIB \
DDE4MUIC.LIB DDE4MUID.LIB DDE4CC.LIB OS2386.LIB
rc myapp.res myapp.exe

Credit: Lyle Sutton


[Back: Can I distribute the C-Set++ runtime DLL?]
[Next: How do I determine what C/C++ compilator is compiling my code?]