A tip for creating test programs

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

A tip for creating test programs

#1 Post by rdonnay »

Below is the contents of MAKEDLL.BAT.

I use this when I need to create code that I can run from an XDOT.EXE dot prompt.

For example, I often need to test functions and it is simpler to put them into a DLL and then load the DLL from the dot prompt. After that I can then call the functions with appropriate parameters from the dot prompt.

Here's you you would use it.

From a DOS prompt run MAKEDLL test.
This will create TEST.DLL from TEST.PRG.

From a DOT prompt run DLL LOAD test.
From a DOT prompt call any of the functions in TEST.PRG.
Ex. MyTestFunction( 23, Date() )

Code: Select all

del %1.xpj
cls
@echo.
@echo Building XPP project file for %1.PRG
@echo.
@echo [PROJECT] >> %1.XPJ
@echo     COMPILE       = xpp >> %1.XPJ
@echo     COMPILE_FLAGS = /q /w /rDCLIPX.LIB /rDCLIP1.LIB /rDCLIP2.LIB >> %1.XPJ /dll:DYNAMIC
@echo     DEBUG         = yes >> %1.XPJ
@echo     GUI           = yes >> %1.XPJ
@echo     LINKER        = alink >> %1.XPJ
@echo     LINK_FLAGS    = >> %1.XPJ
@echo     RC_COMPILE    = arc >> %1.XPJ
@echo     RC_FLAGS      = /v >> %1.XPJ
@echo     %1.XPJ >> %1.XPJ
@echo [%1.XPJ] >> %1.XPJ
@echo     %1.DLL >> %1.XPJ
@echo [%1.DLL] >> %1.XPJ
@echo     %1.PRG >> %1.XPJ
pbuild %1 /g
pbuild %1
del %1.obj
The eXpress train is coming - and it has more cars.

Post Reply