-
Notifications
You must be signed in to change notification settings - Fork 2
Getting started in Linux
To acquire the Urho3D source code you are advised to use a program called Git. Also building Urho3D requires certain packages. Run the following command in a terminal to install these. Add or remove package names as you see fit.
- On Debian-based platforms:
sudo apt-get install libx11-dev libxrandr-dev libasound2-dev git cmake make libgl1-mesa-dev
- Additionally, on Mint and Ubuntu:
sudo apt-get install build-essential
- On RedHat:
sudo yum install libX11-devel libXrandr-devel alsa-lib-devel git cmake make
Now you can clone Urho by navigating to the path you would like the Urho3D folder to be in and run:
git clone https://github.com/urho3d/Urho3D
To build Urho3D type and run cd Urho3D
then cmake .
which should start a process ending with a line saying
-- Build files have been written to: ...
If this is not the case, read the error messages, they may give you the required information to fix your problem.
If all went well type make
, hit enter and Urho3D should start compiling.
For more extensive information on the building process see the documentation.
After Urho3D has been compiled you can run its samples - which should now be located in Urho3D/bin/
- and use it as a library. The library file is created in the Urho3D/lib/
folder.
Note:
If you execute the cmake .
or your IDE execute the cmake operation(like CLion), then it tips you some err(like failed to initialise SDL subsystem), you should install some deps (like libasound2-dev libpulse-dev), the important is : After you installed these libs, delete the cmake generated folder then reconfigure and regenerate.
Depending on your IDE of choice you can now use one of the community-provided wizards below to create your first Urho3D project or continue reading on the wiki about how to create your first project.
Modify me