I have a library of routines from which I create an object library (.lib) and a DLL (.dll).
I currently use a custom pre-processor which removes the "!DEC$ATTRIBUTES DLLEXPORT :: name" statements, (and one or two other DLL-specific statements), when I am compiling for the object library.
I am wondering if I can avoid using a pre-processor.
Would it matter if I left the "!DEC$ATTRIBUTES DLLEXPORT :: name" statements in when compiling for the object library?
Having DLLEXPORT directives in code not built into a DLL is "mostly harmless". The code will work fine, but the linker will create an export library when the executable is linked, which may be annoying.