home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
COMPILER
/
SAMPLE07
/
METHOD1
/
RUN.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-05-17
|
2KB
|
84 lines
@echo off
@REM
@REM C++ DLL Building
@REM
@REM Method 1 Sample Program
@REM
@REM=============================================
@REM STEP 1
@REM
@REM Use _Export or #pragma export in your
@REM source files
@REM
@REM Take a look at VF.H and see how it is done.
@REM=============================================
@REM===============================================
@REM STEP 2
@REM
@REM Compiling the objects needed to build the DLL
@REM Note that we have specified /Ge-
@REM===============================================
@erase *.exe *.dll *.lib *.map *.obj > NUL 2>&1
echo Compiling vf.CPP
icc /c /O+ /Ge- /Q vf.CPP
IF ERRORLEVEL 1 GOTO RPTERR
@REM===========================================
@REM STEP 3
@REM
@REM BASIC.DEF below is the dummy .def file
@REM===========================================
@REM===========================================
@REM STEP 4
@REM
@REM Building the DLL
@REM===========================================
echo Creating DLL
icc /B"/NOE" /Fevf.dll vf BASIC.DEF
IF ERRORLEVEL 1 GOTO RPTERR
@REM========================================
@REM STEP 5
@REM Building of Import Library
@REM========================================
echo "Creating import library from DLL
IMPLIB /NOLOGO vf.LIB vf.DLL
IF ERRORLEVEL 1 GOTO RPTERR
@REM===========================================
:COMPEXE
@REM===========================================
echo Compiling main.CPP
icc /O+ /Q /c main.CPP
@REM============================================
@REM STEP 6
@REM
@REM Linking of the EXE with the import library
@REM============================================
echo Linking the application with the import library
icc /Q main vf.lib
@REM====================
@REM Running the EXE
@REM====================
main
goto end
:RPTERR
@echo ERROR has occurred
:END