-
Notifications
You must be signed in to change notification settings - Fork 78
build_with_clion_vc6_toolchain
- CLion installed and configured.
- Microsoft Visual C++ 6.0 (VC6) installed (assuming it’s installed in the default directory).
- CMake installed and configured.
- Source code of the project cloned from the TheSuperHackers repository.
-
Open CLion and go to File -> Settings -> Build, Execution, Deployment -> Toolchains.
-
Add a new Toolchain by clicking the + button.
-
Select System as the Type (not Visual Studio).
-
Next to the toolchain name, add the environment file by clicking the + button and pointing to the following file:
C:\Program Files (x86)\Microsoft Visual Studio\VC98\Bin\VCVARS32.BAT
-
Set the paths for the tools:
-
Build Tool: Choose the
NMAKE.EXE
file from VC6. For example:C:/Program Files (x86)/Microsoft Visual Studio/VC98/Bin/NMAKE.EXE
-
C Compiler: The
cl.exe
should be detected automatically. If not, set it manually to:C:/Program Files (x86)/Microsoft Visual Studio/VC98/Bin/cl.exe
-
C++ Compiler: The
cl.exe
will also be detected automatically.
-
-
Go to File -> Settings -> Build, Execution, Deployment -> CMake.
-
In this window, select the CMake profile you want to configure (if there isn’t one, create a new one).
-
Choose the Toolchain you created in the previous step (VC6 Toolchain).
-
Choose the Generator as
NMake Makefiles
. -
Under CMake options, add the following generate settings:
-G "NMake Makefiles"
Be careful not to set
Preset
, as it will override the generator settings. -
Add the build directory path under CMake Build Directory:
C:\Users\User\Documents\CLion\CnC_Generals_Zero_Hour\build\vc6
- Now, click the Build button in CLion.
- CLion will start the build process using the VC6 (x86) toolchain.
- Once the build is successfully completed, a zerohour.exe file will be generated.
- You need to copy the zerohour.exe file to the appropriate game directory in order to run the game.
- Visual C++ 6.0 (VC6) only supports C++98, so avoid using modern C++ features.
- Working with VC6 requires some adjustments, so it’s always a good idea to check that the toolchain is working properly.
- You can add Release and Debug profiles in CLion to build the project in different configurations.
- Admin rights might be required to run VC6 tools, so make sure to run CLion as an administrator.
- How to Get Involved
- How to Contribution
- Replays for testing
- Community forks
- License
- Credits
- Changelog
- FAQ
- Known Issues
- Contact & Community
-
Visual Studio 6 Guides:
-
Visual Studio 2022 Guides:
- DirectX
- STLport
- Max4SDK
- NVASM
- Benchmark
- MilesSoundSystem
- Bink
- SafeDisk
- Asimp3
- GameSpy
- ZLib
- LZHCompress