以下是引用阿海在2003-7-30 22:59:17的发言:
如何把basic程序编译成.exe文件
小妹想学
我编写的批处理文件:
@echo off
if "%1" == "" goto help
if exist %1.exe del %1.exe
if not exist %1.bas goto nofile
c:\bc7\binb\bc /A /E /X /V /W %1.bas,%1.obj,nul.lst/D/Es/O/Ot/FBx/S/Lr/Zi/FPi/T/Z/C:1024/Ah
c:\BC7\BINb\link /exepack /L %1.obj,%1.EXE,NUL.MAP,c:\BC7\LIB\BCL71ENR.LIB+C:\BC7\LIB\QBX.LIB,NUL.DEF
if exist %1.obj del %1.obj
if exist %1.map del %1.map
if exist %1.sbr del %1.sbr
dir %1.*
if "%2" == "" goto end
if exist %1.exe %1.exe
goto end
:nofile
echo.
echo.
echo Sorry, Input file not found !
echo.
echo.
goto end
:help
echo.
echo Microsoft (R) QuickBASIC Extended Compiler Version 7.10
echo Copyright (C) Microsoft Corporation 1982-2004. All rights reserved.
echo.
echo Usage:
echo BC7 { BASIC Program source Filename } { Run code }
echo.
:end