New to Urho3D and installation problems

I am new to urho3D, but I have used irrlicht.
However I am having a bit of trouble setting up urho3D.

I want to use urho3D with C++ and my preferred IDE is CodeBlocks.
So I installed the Urho3d_CodeBlocks_Wizrard-Master, which seemed to work ok.
I pointed it at an empty Urho3D folder I created knowing I was going to install Urho3D there.

I then downloaded urho3D-1.7.1.zip for windows.
I run cmake on the cmake_codeblocks.bat and pointed it at my folder I created.

It created a pile of folders and files. eg bin,CMakeFiles,Docs, include,lib,Source, and it made a Urho3D.cbp.
I thought I would have to run that and compile it and everything would work. However I get an error when I do this.

error: unknown type name ‘WAVEOUTCAPS2W’ and a pile of other errors.

Can anyone tell me where I am going wrong?

Hello and welcome to the forum! :confetti_ball:

I’m unfamiliar with Urho3D_CodeBlocks_Wizard but it is a community contribution last updated *edit: today. :slight_smile:

As a general rule (edit: without considering anyone’s requirements or issues; also 1.7.1 is current) I recommend the master repository https://github.com/urho3d/Urho3D which has an excellent stability record, and can also generate CodeBlocks projects.
Official build docs: https://urho3d.github.io/documentation/HEAD/_building.html

If all else fails, a Makefile project (vs. IDE-specific) works most anywhere.
HTH

1 Like

Hi Asimov500,
Welcome to the forum.
I haven’t used the wizard either, and not sure why you would need it. I just tried the 1.7.1 zip using the CMake GUI, targeting Code::Blocks and MinGW-w64, and it builds and compiles with no errors using the default values (64 bit).

What compiler and version and are you using, and 32 or 64 bit? There are a few issues on various sites regarding similar errors like the one you receive and they all seem to point to MinGW, including one in this forum:

I hope you get it working. Personally, I find Urho3D superior to irrlicht, and it has always been the easiest open source game engine to build of any I’ve tried (and that’s a LOT).

The wizard is to set up a new project in codeblocks and that part works, but obviously I need the compile urho3D engine in the folder I point it to of course.

I am still having problems. I downloaded the master from github and went to the scripts folder. I created a folder called build-tree and run the batch file

cmake_codeblocks.bat build-tree
So I look in the build-tree and it has made a few folders CMakeFiles,include and some files CMakeCache.txt, CPackConfig.cmake and CpackSourceConfgi.cmake.

Now in the CMakeFiles there is an error log, which I tried to upload, but I think that this forum only allows images in an upload. I would paste it, but it is rather long. Is there a way to upload the error log for someone to look at?

Upload it to pastebin then paste the link here.

Here is the paste
https://pastebin.com/wTGjSNV0

I hope it works because it is the first time I used pastebin

Alternatively the [details=title] ... [/details] tags (also available through the Options cog in the message tool bar) can be used to hide parts of a message.

Also, welcome to the forums! :confetti_ball: :slightly_smiling_face:

1 Like

Note that the simple existence of a CMakeError.log file inside CMakeFiles doesn’t mean it failed. When detecting features, cmake attempts to compile various internal test programs and the success/failure of those compilations sets flags for the feature being tested for, and CMakeError.log is just where the spam for those tests ends up.

Yeh I understand that, but I had errors in my console as well.
And it is quite suspicious that when I look in the include folder there is a Urho3D folder with a ThirdParty folder and no actual include files in there, which kinda leads me to believe it hasn’t worked correctly.

I really wish someone could make a video showing the process, that would be a great help. I have only found one on youtube with some really loud music and it is hard to follow.

CMake Error: Error processing file: D:/Download/Urho3D-master/Urho3D-master/script/CMake/Modules/GetUrhoRevision.cmake
CMake Error at CMakeLists.txt:86 (string):
string sub-command REGEX, mode MATCH needs at least 5 arguments total to
command.

CMake Error at F:/Utilities/cmake/share/cmake-3.16/Modules/CPack.cmake:537 (message):
CPack license resource file:
“D:/Download/Urho3D-master/Urho3D-master/script/LICENSE” could not be
found.
Call Stack (most recent call first):
F:/Utilities/cmake/share/cmake-3.16/Modules/CPack.cmake:542 (cpack_check_file_exists)
CMakeLists.txt:169 (include)

CMake Error at CMakeLists.txt:199 (add_subdirectory):
add_subdirectory given source “Source” which is not an existing directory.

CMake Error at CMakeLists.txt:202 (add_subdirectory):
add_subdirectory given source “Docs” which is not an existing directory.

Hi @Asimov500

I created Urho3D_CodeBlocks_Wizard , and as you rightfully said it is used for setting up urho3d project, albeit for Windows using Mingw. Unfortunately it has not been updated for a while ( some other projects has kept me away from urho3d) but has now been updated.

I just downloaded urho3d v1.7.1, ran the codeblocks cmake, built successfully and was also able to build a test project.

Can you further detail your steps so we can reproduce it

I think your “git” on Windows behaves erroneously. I suggest you to uninstall it and install “git” from other provider.

I suspect your problem started at the first highlighted line below and causing a variable to left unset/undefined, ultimately the CMake command in last highligted line failed and it could not recover itself.

Arguably the CMake command in the last line could have been rewritten to handle abnormal result from “git” on Windows. In your case the “git” command should have exited with non-zero exit code (as you are using downloded source instead of a git clone), but it didn’t. Hence my suggestion above.

Alternatively, fix the last highlighted line to read:

string (REGEX MATCH "[^.]+\\.[^-]+" VERSION "${LIB_REVISION}")
2 Likes

Thanks I will have another go and let you know.

I am not sure how it is a git problem as I didn’t use git to clone it. I downloaded it directly from github in a zip file. I use git all the time as I am a web developer as well, and not had a problem with it however.

I am going to try your line to see if it works, and will get back to you once I have tried it.
It will probably be tomorrow when I can have another look at it though, as it is getting late.

Hi @Bluemoon,
Actually your wizard worked fine. I have already installed it in codeblocks and it creates a new Urho3D project great. Obviously I won’t be able to compile it until I get Urho3D compiled, but I am sure once I got Urho3D compiled ok I am sure your script will work.

@weitjong,

I tried changing the line and re-compiling and unfortunately it doesn’t work. I feel I am stumbling at the first stage. It actually only took me a about an hour to work out how to compile irrlicht. The only reason I want to have a go at urho3D is because the shader support, and normalmaps look better than irrlicht. So I want to transfer a project I have already started writing to urho3D.

I will keep looking for an answer but I am a bit slow as I have the flu at the moment and got this tremendous headache.

Take a rest. If you want our help you will need to show us what’s the problem exactly after the change I suggested. It cannot be the same issue again because it just not possible.

1 Like

I found a video on youtube and found out where I was going wrong on one part.
The video had no sound, so was a little hard to follow. Plus it was a little old, but it helped.

However I managed to get the cmake to make the files I needed.
I was running the cmake_codeblocks.bat from command line. I never thought
about using the cmake gui at all. Also I just downloaded the source folder from git this time.

So I follow the video but instead of selecting visual studio I selected codeblocks and mingw, because
that is what I mainly use. Even though I do have Visual Studio as well.

So after configuring cmake and clicking generate I end up with a pile of stuff in my build folder,
including the Urho3D.cbp for codeblocks.

So I run the cbp which opens codeblocks and then click build and run.
Then it starts building and I get a few errors
eg.
error: unknown type name ‘WAVEOUTCAPS2W’

So I am closer on getting it compile but not there yet. Please check out my image for the errors I am getting.

hmm… isn’t that the same error in the link posted by Valdar above? Ensure you have a MinGW that is up for the task.

It seems I am running mingw 5.1.0. It was installed when I installed codeblocks. Is that too old?

Oh yes you are right it is the same error by the way, but I did the compiling a completely different way so I reposted to show what I have tried.

For Urho3d v1.7 I believe it is not too old