adbrt / cb-legacy-dev

36 stars 6 forks source link

Building for 3.11 fails. #3

Closed aabluedragon closed 7 months ago

aabluedragon commented 7 months ago

The script for Windows 95 works, as well as native build for current system, but the Build Target for Windows 3.11 fails with the following error:

-------------- Build: 311 in TestLegacy (compiler: Borland C++ Compiler (5.5, 5.82))---------------

bcc32.exe -q -D__WXMSW__ -q -c -P -tWM -a8 -DNDEBUG -w -O2    -IC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\wxMSW-2.8.12\include -IC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\wxMSW-2.8.12\lib\bcc_lib\msw -IC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\BCC55\include -IC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\BCC55\include -oobj\311\TestLegacyApp.obj -c TestLegacyApp.cpp
testlegacyapp.cpp:
bcc32.exe -q -D__WXMSW__ -q -c -P -tWM -a8 -DNDEBUG -w -O2    -IC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\wxMSW-2.8.12\include -IC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\wxMSW-2.8.12\lib\bcc_lib\msw -IC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\BCC55\include -IC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\BCC55\include -oobj\311\TestLegacyMain.obj -c TestLegacyMain.cpp
testlegacymain.cpp:
Warning W8057 testlegacymain.cpp 133: Parameter 'id' is never used in function TestLegacyFrame::TestLegacyFrame(wxWindow *,int)
Warning W8057 testlegacymain.cpp 144: Parameter 'event' is never used in function TestLegacyFrame::OnQuit(wxCommandEvent &)
Warning W8057 testlegacymain.cpp 150: Parameter 'event' is never used in function TestLegacyFrame::OnAbout(wxCommandEvent &)
Warning W8057 testlegacymain.cpp 156: Parameter 'event' is never used in function TestLegacyFrame::OnButton1Click(wxCommandEvent &)
Warning W8057 testlegacymain.cpp 162: Parameter 'event' is never used in function TestLegacyFrame::OnTextCtrl1Text(wxCommandEvent &)
ilink32.exe -q -aa  -Tpe -aa  -LC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\wxMSW-2.8.12\lib\bcc_lib -LC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\BCC55\lib -LC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\BCC55\lib\psdk -LC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\BCC55\lib -LC:\Users\alona\Downloads\cb-legacy-dev_v18nov2023\CodeBlocks\BCC55\lib\psdk c0w32 obj\311\TestLegacyApp.obj obj\311\TestLegacyMain.obj,bin\311\TestLegacy.exe,,import32.lib cw32mt.lib ole2w32.lib wxmsw28.lib wxpng.lib wxjpeg.lib wxtiff.lib wxzlib.lib wxregex.lib wxexpat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comctl32.lib wsock32.lib,, obj\311\resource.res
Fatal: Illegal option: 2.8.12\lib\bcc_lib
Process terminated with status 2 (0 minute(s), 0 second(s))
1 error(s), 5 warning(s) (0 minute(s), 0 second(s))
adbrt commented 7 months ago

Looks like there may be some problems with linker configuration, namely the directories that it should use. BCC compiler is old, and you have pretty long installation path, maybe if you would move it closer to the C:\ it would work... (command line length exceeded?) But this is just a guess for now.

You can also check compiler paths by opening Settings -> Compiler, check if correct paths are in Toolchain executables, Search directories tabs etc.

But first try just saving and reopening the project if you didn't already, sometimes adding new build target required restart for reasons I couldn't identify.

aabluedragon commented 7 months ago

That helped. Moved CodeBlocks to C:\codeblocks, re-ran the .bat file to set all the stuff up. Created a new wxWidgets project on C:\somepath. I also had to give full folder permission to those paths, since they are not under the current user directory.