I have some project which built on Borland, below the version.
I can clean/make/build it inside the IDE
Till today I was able to make it in cmd:
cd C:\repos\gradlecpp\Project\src\AssDelay
T:\Bin\bpr2mak.exe TSAssDelay.bpr
T:\Bin\make.exe -fTSAssDelay.mak
After execution of commands abowe, I had .dll file.
Today all I did systemwide, is deinstallation of MSSql Server, and now I get follow error:
C:\repos\gradlecpp\Project\src\AssDelay>T:\Bin\make.exe -fTSAssDelay.mak
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
T:\Bin\..\BIN\bcc32 -WD -Od -H=T:\Bin\..\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tWM -w-par -I..\DocGoodsCards;"C:\Program Files\B
orland\CBuilder5\Bin\";"D:\My project\tmp\";..\GroupClients;T:\Bin\..\Imports;P:\Tr\;L:\RSD\;"C:\Program Files\Borland\CBuilder5\Projects\";..\Common;"C:\Progra
m Files\Common Files\System\MAPI\1049\nt\";C:\;T:\Bin\..\include;T:\Bin\..\include\vcl;T:\Bin\..\include\atl;L:\CDBTypeLibrary\;L:\EhLib\;L:\FastReport\;L:\Grap
hics\;L:\ImgEdit\;L:\LGTypeLibrary\;L:\ML\;L:\Rx\;L:\TS\;L:\TSBF\;L:\TSTypeLibrary\;L:\VCLZip\;"L:\DL\" -D_DEBUG;_RTLDLL;NO_STRICT;_ATL_APARTMENT_THREADED;USING
_ATLVCL;_ATL_NO_SECURITY;INC_ATL_HEADERS;USEPACKAGES -n .\TSAssDelay.cpp .\TSAssDelay_ATL.cpp .\TSAssDelay_TLB.cpp .\FmDocAssDelayList.cpp .\DocAssDelayImpl.cpp
.\FmDocAssDelayItem.cpp .\DmDocAssDelay.cpp .\FmDocAssLimitList.cpp .\DocAssLimitImpl.cpp .\FmDocAssLimitItem.cpp .\DmDocAssLimit.cpp .\FmDocAssDelayFU.cpp .\F
mOrdChngFU.cpp .\DmDocAssIU.cpp .\FmDocAssIUList.cpp .\FmDocAssIUItem.cpp .\FmDocAssIULine.cpp .\DocAssIUImpl.cpp .\FmDocAssIUPercent.cpp .\DmDocAss.cpp .\DocAs
sImpl.cpp .\FmDocAss.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Error E2194: Could not find file 'project\tmp";..\GroupClients;T:\Bin\..\Imports;P:\Tr\;L:\RSD\;C:\Program Files\Borland\CBuilder5\Projects";..\Common;C:\Progra
m.cpp'
Error E2194: Could not find file 'Files\Common.cpp'
Error E2194: Could not find file 'Files\System\MAPI\1049\nt";C:\;T:\Bin\..\include;T:\Bin\..\include\vcl;T:\Bin\..\include\atl;L:\CDBTypeLibrary\;L:\EhLib\;L:\F
astReport\;L:\Graphics\;L:\ImgEdit\;L:\LGTypeLibrary\;L:\ML\;L:\Rx\;L:\TS\;L:\TSBF\;L:\TSTypeLibrary\;L:\VCLZip\;L:\DL" -D_DEBUG;_RTLDLL;NO_STRICT;_ATL_APARTMEN
T_THREADED;USING_ATLVCL;_ATL_NO_SECURITY;INC_ATL_HEADERS;USEPACKAGES -n .\TSAssDelay.cpp .\TSAssDelay_ATL.cpp .\TSAssDelay_TLB.cpp .\FmDocAssDelayList.cpp .\Doc
AssDelayImpl.cpp .\FmDocAssDelayItem.cpp .\DmDocAssDelay.cpp .\FmDocAssLimitList.cpp .\DocAssLimitImpl.cpp .\FmDocAssLimitItem.cpp .\DmDocAssLimit.cpp .\FmDocAs
sDelayFU.cpp .\FmOrdChngFU.cpp .\DmDocAssIU.cpp .\FmDocAssIUList.cpp .\FmDocAssIUItem.cpp .\FmDocAssIULine.cpp .\DocAssIUImpl.cpp .\FmDocAssIUPercent.cpp .\DmDo
cAss.cpp .\DocAssImpl.cpp .\FmDocAss.cpp .cpp'
So now, I don't have resulting .dll.
Same error I have if I create and run make file from IDE using Project -> Export Makefile..., Project -> Execute Makefile.
Here is the part of Makefile, which supposedly reasons the error:
SYSDEFINES = _RTLDLL;NO_STRICT;_ATL_APARTMENT_THREADED;USING_ATLVCL;_ATL_NO_SECURITY;INC_ATL_HEADERS;USEPACKAGES
INCLUDEPATH = ..\DocGoodsCards;"C:\Program Files\Borland\CBuilder5\Bin\";"D:\My project\tmp\";..\GroupClients;$(BCB)\Imports;P:\Tr\;L:\RSD\;"C:\Program Files\Borland\CBuilder5\Projects\";..\Common;"C:\Program Files\Common Files\System\MAPI\1049\nt\";C:\;$(BCB)\include;$(BCB)\include\vcl;$(BCB)\include\atl;L:\CDBTypeLibrary\;L:\EhLib\;L:\FastReport\;L:\Graphics\;L:\ImgEdit\;L:\LGTypeLibrary\;L:\ML\;L:\Rx\;L:\TS\;L:\TSBF\;L:\TSTypeLibrary\;L:\VCLZip\;"L:\DL\"
LIBPATH = "C:\Program Files\Borland\CBuilder5\Projects\Lib\";L:\Bpl\;..\DocGoodsCards;"C:\Program Files\Borland\CBuilder5\Bin\";"D:\My project\tmp\";"L:\DevExpress\ExpressEditors Library\Lib\";L:\DevExpress\ExpressInplaceEditors\Lib\;L:\DevExpress\ExpressQuantumGrid\Lib\;..\GroupClients;L:\DevExpress\Lib\;$(BCB)\Imports;P:\Tr\;L:\RSD\;"C:\Program Files\Borland\CBuilder5\Projects\";..\Common;"C:\Program Files\Common Files\System\MAPI\1049\nt\";L:\EhLib\;$(BCB)\Lib;$(BCB)\Lib\Obj;L:\Lib\;L:\ML\;L:\TS\;L:\TSBF\;"L:\DL\"
What else, before we had some script as part of automated build system, that fixed makefile:
@echo off
REM -- Prepare the Command Processor --
SETLOCAL ENABLEEXTENSIONS
SETLOCAL DISABLEDELAYEDEXPANSION
if "%~1"=="" findstr "^::" "%~f0"&GOTO:EOF
for /f "tokens=1,* delims=]" %%A in ('"type %1|find /n /v """') do (
set "line=%%B"
if defined line (
call set "line=echo.%%line:\"=\."%%"
rem call set "line=echo.%%line:%~1=%~2%%"
for /f "delims=" %%X in ('"echo."%%line%%""') do %%~X
) ELSE echo.
)
echo HERE
It is really impossible to understand what is going here... I think it is easier to understand compiled code in hex editor, than MS batch files... What I think is done there, is replacing of quotes. I tried to remove the quotes, but it didn't helps...
Can some one help me to make this project be compiled from cmd?
UPDATE
OK, so I get the command produced from make.exe -fTSAssdelay.mak and removed all directories paths which contained spaces:
@echo off
T:\Bin\bcc32 -WD -Od -H=T:\Bin\..\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tWM -w-par ^
-IL:\TS\;L:\TSBF\ -I..\GroupClients -I..\DocGoodsCards -IT:\Bin\..\Imports -IP:\Tr\ -IL:\RSD\ -I..\Common -IC:\ ^
-IT:\Bin\..\include -IT:\Bin\..\include\vcl -IT:\Bin\..\include\atl -IL:\CDBTypeLibrary\ -IL:\EhLib\ -IL:\FastReport\ ^
-IL:\Graphics\ -IL:\ImgEdit\ -IL:\LGTypeLibrary\ -IL:\ML\ -IL:\Rx\ -IL:\TSTypeLibrary\ -IL:\VCLZip\ -IL:\DL\ ^
-D_DEBUG;_RTLDLL;NO_STRICT;_ATL_APARTMENT_THREADED;USING_ATLVCL;_ATL_NO_SECURITY;INC_ATL_HEADERS;USEPACKAGES -n ^
.\TSAssDelay.cpp .\TSAssDelay_ATL.cpp .\TSAssDelay_TLB.cpp .\FmDocAssDelayList.cpp .\DocAssDelayImpl.cpp ^
.\FmDocAssDelayItem.cpp .\DmDocAssDelay.cpp .\FmDocAssLimitList.cpp .\DocAssLimitImpl.cpp .\FmDocAssLimitItem.cpp ^
.\DmDocAssLimit.cpp .\FmDocAssDelayFU.cpp .\FmOrdChngFU.cpp .\DmDocAssIU.cpp .\FmDocAssIUList.cpp .\FmDocAssIUItem.cpp ^
.\FmDocAssIULine.cpp .\DocAssIUImpl.cpp .\FmDocAssIUPercent.cpp .\DmDocAss.cpp .\DocAssImpl.cpp .\FmDocAss.cpp
rem -I"C:\Program Files\Borland\CBuilder5\Projects\" -I"C:\Program Files\Common Files\System\MAPI\1049\nt\"
rem -I"C:\Program Files\Borland\CBuilder5\Bin\" -I"D:\My project\tmp\" ^
As you can see, it is also possible to keep them together: -IL:\TS\;L:\TSBF\
So now, I get .obj files, but I still need to link.
If I remove those paths from makefile, I get:
C:\repos\gradlecpp\Project\src\AssDelay>make.exe -fTSAssDelay.mak
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
C:\PROGRA~1\Borland\CBUILD~1\Bin\..\BIN\bcc32 -WD -Od -H=C:\PROGRA~1\Borland\CBUILD~1\Bin\..\lib\vcl50.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi- -c -tWM -w-par -I..\DocGoodsCar
ds;..\GroupClients;C:\PROGRA~1\Borland\CBUILD~1\Bin\..\Imports;P:\Tr\;L:\RSD\;..\Common;C:\;C:\PROGRA~1\Borland\CBUILD~1\Bin\..\include;C:\PROGRA~1\Borland\CBUILD~1\Bin\..\include\vcl;C:\PRO
GRA~1\Borland\CBUILD~1\Bin\..\include\atl;L:\CDBTypeLibrary\;L:\EhLib\;L:\FastReport\;L:\Graphics\;L:\ImgEdit\;L:\LGTypeLibrary\;L:\ML\;L:\Rx\;L:\TS\;L:\TSBF\;L:\TSTypeLibrary\;L:\VCLZip\;"L
:\DL\" -D_DEBUG;_RTLDLL;NO_STRICT;_ATL_APARTMENT_THREADED;USING_ATLVCL;_ATL_NO_SECURITY;INC_ATL_HEADERS;USEPACKAGES -n..\Common\ ..\Common\FmSelDoctype.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Error E2266: No file names given


Solutions
Removing paths
OK, so one solution is to remove all representation of paths with space. If you have some include header or lib directory with space in it's path, you need to do one of the follow:
Using perl, it can be something like:
Patch the template
Other solution, is use makefile template, where you will substitute
BCC32definition inMAKE SECTIONwith:The original block is:
It seems that
bcc32ide.exerespects paths, which includes spaces.The original template is
default.bmkplaced in Borland's bin folder, so copy the file, substituteBCC32definition, lets the new name will bepatched.bmk. Than callbpr2mak.exewith modified template. At the finish callmake.exe: