Archive 19/01/2023.

Building urho3d from src

EpicSpaces

I’ve successufully builded urho3d with Cmake

cannot open file urho3d_d.lib when in debug
cannot open file urho3d.lib when in release

errors pops up so what to do ?

Modanung

Did you try running some of the compilation output located in the bin folder?

Also, welcome to the forums! :confetti_ball:

EpicSpaces

thank you, in my bin folder, there are bat files what for ? my x64/release is empty since build fails

Modanung

Ah, your successful build process fails. Check :slight_smile:

Then, have you tried the scripts in the script folder before running make ?

And I assume you’ve found your way to the documentation ?

EpicSpaces

there is nothing special in the documentation :confused:
the script folder before or after running make is filled with bat files what for again, launching one of them does nothing?

Modanung

You may want to read the build scripts section .

EpicSpaces

well technically that’s all the process that I’ve already done :wink:
I’m I missing something ?
I think the error is more technical

Modanung

What are the full last two commands that you run, before hitting the obstacle?

EpicSpaces

what commands, I used cmake-gui, I disabled
urho_angelscript
urho_ lua
urho_luajit
that’s all, everything seems fine, I run Visual Studio, chnage to release and these errors pops up
cannot open file urho3d.lib
and more errors in linux_adapter.cpp like expected identifier and like

errno_t mbstowcs_s(size_t *,wchar_t (&)[_Size],const char *,size_t) throw()’: function template has already been defined (compiling source file C:\Users\user\Desktop\Urho3D-master\Source\ThirdParty\SLikeNet\Source\src\BitStream.cpp)|SLikeNet|C:\Users\user\Desktop\Urho3D-master\Source\ThirdParty\SLikeNet\Source\include\slikenet\linux_adapter.h

maybe from the lib missing ?

Modanung

Did you try setting the WIN32 option?

EpicSpaces

where ? next to debug/release combobox there is only x64 no option for 32 and I don’t think that’s the case

Modanung

I’m unfamiliar in bat country. Maybe someone else can help you.

EpicSpaces

I just have to smack my head then :frowning:

Modanung

Either that, be patient, or install Linux . There’s alternatives.

EpicSpaces

noway, I’m unfamiliar in linux country

Modanung

It’s free of bats. :bat:

EpicSpaces

and full of sh (shit)

Modanung

bull.sh makes the flowers grow. :sunflower:

EpicSpaces

I love my bats gives me batman powers(not this time)

Modanung

Do you love them too much to execute them, and digest the outstream?

EpicSpaces

well it’s just hard to switch to linux, and even if I do what guarantee me that it will work ?
I can install virtualbox again Ubuntu and all the pain …

Modanung

Actually, I gave up on that suggestion.

Personally, I prefer Linux Mint over Ubuntu.

SirNate0

Start with the *.bat file for the initial run of CMake. You probably should run then from within a command line, and not just run them by double clicking. You need to supply the script with a build directory, so if you didn’t they would probably fail.

You can use the CMake GUI afterwards to edit the cache, but it does make it easier to use the bat file first as it will select the most of the right flags and all for you. I’m not certain, but I think if you switch between debug and release you’d need to re run CMake. But I’ve also not used visual studio with Urho, so that’s just a guess.

Which version of Urho are you using? Using the master branch off of GitHub tends to work best with Urho, the releases have gotten a bit out of date at this point.

Also, if the error doesn’t go away, an exact copy of the errors you’re seeing would probably be most helpful. Especially the earliest errors, not necessarily the last ones on the screen, if that wasn’t what you posted earlier.

throwawayerino

Here’s a guide with cmake GUI. I prefer to set the binaries built location to the same directory as source but it doesn’t matter since it should set all executables to link to that.

Pencheff
  1. Clone Urho3D git repository (git clone https://…)
  2. Inside Urho3D folder:
    mkdir build
    cd build
    cmake … -A Win32
  3. Open the build/Urho3D.sln using Visual Studio
  4. Build the “ALL BUILD” target
EpicSpaces

thanks guys I managed to make it to work :slight_smile:

commenting by hands(not advisable) the redefinition errors(like struct type redefinition) from these files that stopped building lib files, and everything worked perfectly.

lines to remove was :
linux_adapter.h
lines 66 to 99

linux_adapter.cpp
23 to 131
174 to 205
291 to 320

civetweb.cpp
until 661 line

EpicSpaces

I have another question, can we remove cmake references in my project ?, if not, can we extract vxproj and filters, because the headers and cpp files are only seen in solution explorer in visual studio, not in the source folder build, copying by hand is exhausting .

SirNate0

You can avoid using CMake. All it does is set up all the correct files and build flags. It’s not required, just very recommended. As to a way to do it, I have no idea other than just manually copying all of it.

If your goal is just too use it in your own project that uses Urho as a library it’s a lot easier. Just copy the preprocessor defines and other build flags (e.g. using c++11 for example), and add the Urho library and include paths (note that I think that ends up being more than just include, I think a couple of the ThirdParty paths are added as well).

EpicSpaces

no, actually I’m trying to create my own editor on top of urho3d, I’m trying even to redit all the src code, but I can’t understand it compleltly, there is so much files, any diagram class ?

SirNate0

Read the documentation pages first here . They give good introductions to the various subsystems. I think the online documentation also has class diagrams if you go to the different classes in the documentation.