Msbuild example for Clarion

Dave’s article had the correct syntax of #implib LIB EXP, it was wrong as #implib EXP LIB in the excerpt from page 130 of AdvancedTopicsReferenceGuide.pdf, the example projects in that PDF do show correctly e.g. #implib %%drvname%%.LIB %%drvname%%.EXP. The wrong syntax will trash your EXP and not give you a LIB.

I attached a corrected DLL Tutor example project to generate LIBs with the bwlow syntax. There’s not need to do AllFiles since if it is the first one built.
#implib ALLFILES.LIB ALLFILES.EXP
#implib REPORTS.LIB REPORTS.EXP
#implib UPDATES.LIB UPDATES.EXP

I also changed its target to a LIB so there’s never a pointless EXE, and then in the Post Build Cmd is DEL LibCreate.lib

My tests show this is optimized to only make the new LIB if it changes, i.e. if you run it twice in a row the LIB is not created again. I would guess it makes it, checks its the same, then does not replace it, but I did not test this. The project language does allow “#if reports.lib #older reports.exp #then #implib …”

ImpLibExampleForDllTutor_Corrected.zip (12.4 KB)

OutputPanel

1 Like