Define the environment variable
STM_ROOT
, as follows:Contact your Rational Statemate manager for the name of the root directory of the Rational Statemate tree. For example:
SET STM_ROOT=C:\IBM Rational\stmm\4.6
Use the following command to compile and link:
PROGRAM= my_prog.exe
DLL= <STM_ROOT>\bin\dataimport.dll
DLIB= <STM_ROOT>\lib\dataimport.lib
SRCS= my_prog.c
HDRS= my_prog.h
CFLAGS= /DDLL_LINK /I<STM_ROOT>\include
LIBS= kernel32.lib
all: $(PROGRAM) $(DLL) $(HDRS)
$(PROGRAM): $(SRCS) $(DLIB)
cl $(CFLAGS) $(SRCS) $(DLIB) $(LIBS)
clean:
-del $(PROGRAM) >nul: 2>&1
-del *.obj >nul: 2>&1
-del *.pdb >nul: 2>&1
-del *.ilk >nul: 2>&1
-del *.mdp >nul: 2>&1
-del *.opt >nul: 2>&1
●my_prog.exe
—The name you want to assign to the executable image
●my_prog.h
—The header file
●my_prog.c
—The name of the file containing the C program