4.5 KiB
How to build CARLA on Windows
---Necessary software
- [Git](https://git-scm.com/downloads) - [Make](http://gnuwin32.sourceforge.net/packages/make.htm) - [CMake](https://cmake.org/download/) - [Python3 x64](https://www.python.org/downloads/)!!! important Be sure that these programs are added to your environment path, so you can use them from your command prompt.
!!! important If make complins about missing libintl3.dll or/and libiconv2.dll please donwload the dependencies and extract the bin contento into the make installation path.
Also:
- Unreal Engine (v4.19.x)
- Visual Studio (2017)
Environment Setup
In order to build CARLA you must **enable the x64 Visual C++ Toolset**. I recommend to use this environment for everything you do in this tutorial. You have different options:- Recomended: Use
Visual Studio x64 Native Tools Command Prompt
. Just press theWin
button and search forx64
(be careful to not unintentionally open ax86_x64
prompt), because the name of this Command Prompt can change depending on the lenguage you have Visual Studio installed. - Enable a 64-Bit Visual C++ Toolset on the Command Line (the instructions will depend on the version of VS that you have).
Clone the repository
Go to the path you want to install CARLA and use git to download the project using the following command:git clone https://github.com/carla-simulator/carla.git
and get in the created folder:
cd carla
Download Carla contents
Depending on the Carla version that you are unsing download one of the links that you can find in `\Util\ContentVersions.txt` and extract the content to `Unreal\CarlaUE4\Content\Carla`, if the path doesn't exist, create it.Build Carla
Once you have downloaded the repo and extract the Carla contents you can start with the automatic build. The process may take a while, it will download and install the necessary libraries (Boost, RPCLib and googletest). Expect 20-40 minutes, depending on your hardware and internet connection. If you get any error comment on GitHub #647 issue or just ask on the Windows Discord channel.
Build commands
Command | Description |
---|---|
make help |
Print all available commands |
make launch |
Builds and launches Carla |
make launch-editor |
Launches Carla Editor |
make package |
Builds CARLA and creates a packaged version for distribution |
make clean |
Deletes all the binaries and temporals generated by the build system |
make rebuild |
Rebuilds Carla project, dependencies not build |
If you build Carla for the first time or after you clean the project it will probably ask you to build the UE4Editor-CarlaUE4.dll
and UE4Editor-Carla.dll
also (as is needed for coocking the content for launch Carla), agree and the project will be opened in the Unreal Engine in a few minutes.
Example of building Carla 0.9.0 for first time:
1) git clone https://github.com/carla-simulator/carla.git
2) Download https://drive.google.com/uc?id=1FtC00CrDb7Kz5StBAwb6vqOGbzZtpROx&export=download
3) Extract to Unreal/CarlaUE4/Content/Carla
4) make launch
Update Carla
Every new release of CARLA we release a new package with the latest changes in the CARLA assets. To download the latest version and recompile CARLA, run:
1) make clean # Deletes all the binaries and temporals generated by the build system
2) git pull # Download the las Carla modifications
3) Download the latest version of assets (if needed)
4) make launch # Build and launch Carla
Possible build errors
If you also have installed other version of Visual Studio or Microsoft Compiler and get any error during the build as C2440 or C2672 this is probably because is not using the 2017 compiler, so try first to uninstall the other ones and rebuild again.
If you would like to keep the other version of Visual Studio edit %appdata%\Unreal Engine\UnrealBuildTool\BuildConfiguration.xml
adding the following lines:
<VCProjectFileGenerator>
<Version>VisualStudio2017</Version>
</VCProjectFileGenerator>
<WindowsPlatform>
<Compiler>VisualStudio2017</Compiler>
</WindowsPlatform>