Archive 17/01/2023.

CMake errors using codeblocks

MZoltan32

I have errors while cmake used with codeblocks settings.

CMake Log
SirNate0

Did you perhaps use Source/ as the cmake source directory, rather than the top-level Urho directory?

MZoltan32

if i use the top level it gives this error code:

“CMake Error: The source “E:/tar/games/developedgames/Urho3D-1.7.1/CMakeLists.txt” does not match the source “E:/tar/games/developedgames/Urho3D-1.7.1/Source/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory.”

Modanung

Have you tried running cmake_clean.sh in between?

MZoltan32

i use windows no i havent tryed it

Modanung

Ah, you’re in bat country. :wink:
CMake tries to be lazy. Usually this only saves time, but sometimes this means it will leave things unchanged that should be modified.

SirNate0

Just delete your build directory and redo the build process using the correct (top level) directory as the source. The .bat file would also accomplish it, but it’s usually simpler this way unless you have stuff you want to keep in it, possibly.

bvanevery

I would say, don’t use .bat files at all. What’s with this .bat file stuff that keeps coming up? I’ve never used a .bat file to build Urho3D on Windows in my life. Use cmake-gui.

weitjong

It really does not matter guys. Our build system supports both cmake GUI and CLI mode, and also both out-of-source or non out-of-source build. Out of source build is preferred whether your “build” tree is relative to the “source” tree or really outside of it. We support most of the generators supported by CMake, although officially we only named a few in our docs as well as in our batch files and shell files. So, choose your own poison and stick to one (or more but just don’t mix them).

MZoltan32

i tryed deleting the build directory content and restarting after installing directx sdk

but i have a lot of error messages about not found things (are there things needed to be added to environment variables?):

Log

Looking for C++ include d3dcompiler.h

Looking for C++ include d3dcompiler.h - not found

Looking for C++ include d3d9.h

Looking for C++ include d3d9.h - found

Looking for C++ include d3d11.h

Looking for C++ include d3d11.h - not found

Looking for C++ include ddraw.h

Looking for C++ include ddraw.h - not found

Looking for C++ include dsound.h

Looking for C++ include dsound.h - not found

Looking for C++ include dinput.h

Looking for C++ include dinput.h - not found

Looking for C++ include dxgi.h

Looking for C++ include dxgi.h - not found

Looking for C++ include xaudio2.h

Looking for C++ include xaudio2.h - not found

Looking for include files windows.h, xinput.h

Looking for include files windows.h, xinput.h - not found

Found DirectX: TRUE missing components: DInput DSound XAudio2 XInput

Looking for stdint.h

Looking for stdint.h - found

Looking for inttypes.h

Looking for inttypes.h - found

Looking for malloc.h

Looking for malloc.h - found

Looking for __sincosf

Looking for __sincosf - not found

Looking for malloc_usable_size

Looking for malloc_usable_size - not found

Looking for sincosf in m

Looking for sincosf in m - not found

Performing Test HAVE_RTL_OSVERSIONINFOW

Performing Test HAVE_RTL_OSVERSIONINFOW - Failed

Performing Test HAVE_GCC_WALL

Performing Test HAVE_GCC_WALL - Success

Performing Test HAVE_GCC_WDECLARATION_AFTER_STATEMENT

Performing Test HAVE_GCC_WDECLARATION_AFTER_STATEMENT - Success

Performing Test HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT

Performing Test HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT - Success

Performing Test HAVE_GCC_ATOMICS

Performing Test HAVE_GCC_ATOMICS - Success

Performing Test HAVE_GCC_PREFERRED_STACK_BOUNDARY

Performing Test HAVE_GCC_PREFERRED_STACK_BOUNDARY - Success

Performing Test HAVE_GCC_WSHADOW

Performing Test HAVE_GCC_WSHADOW - Success

Performing Test HAVE_NO_UNDEFINED

Performing Test HAVE_NO_UNDEFINED - Success

Looking for sys/types.h

Looking for sys/types.h - found

Looking for stdio.h

Looking for stdio.h - found

Looking for stdlib.h

Looking for stdlib.h - found

Looking for stddef.h

Looking for stddef.h - found

Looking for stdarg.h

Looking for stdarg.h - found

Looking for memory.h

Looking for memory.h - found

Looking for string.h

Looking for string.h - found

Looking for strings.h

Looking for strings.h - found

Looking for ctype.h

Looking for ctype.h - found

Looking for math.h

Looking for math.h - found

Looking for iconv.h

Looking for iconv.h - not found

Looking for signal.h

Looking for signal.h - found

Looking for 7 include files stdint.h, …, float.h

Looking for 7 include files stdint.h, …, float.h - found

Looking for M_PI

Looking for M_PI - found

Looking for sys/mman.h

Looking for sys/mman.h - not found

Looking for strtod

Looking for strtod - found

Looking for malloc

Looking for malloc - found

Looking for calloc

Looking for calloc - found

Looking for realloc

Looking for realloc - found

Looking for free

Looking for free - found

Looking for getenv

Looking for getenv - found

Looking for setenv

Looking for setenv - not found

Looking for putenv

Looking for putenv - found

Looking for unsetenv

Looking for unsetenv - not found

Looking for qsort

Looking for qsort - found

Looking for abs

Looking for abs - found

Looking for bcopy

Looking for bcopy - not found

Looking for memset

Looking for memset - found

Looking for memcpy

Looking for memcpy - found

Looking for memmove

Looking for memmove - found

Looking for memcmp

Looking for memcmp - found

Looking for strlen

Looking for strlen - found

Looking for strlcpy

Looking for strlcpy - not found

Looking for strlcat

Looking for strlcat - not found

Looking for strdup

Looking for strdup - found

Looking for _strrev

Looking for _strrev - found

Looking for _strupr

Looking for _strupr - found

Looking for _strlwr

Looking for _strlwr - found

Looking for strchr

Looking for strchr - found

Looking for strrchr

Looking for strrchr - found

Looking for strstr

Looking for strstr - found

Looking for itoa

Looking for itoa - found

Looking for _ltoa

Looking for _ltoa - found

Looking for _uitoa

Looking for _uitoa - not found

Looking for _ultoa

Looking for _ultoa - found

Looking for strtol

Looking for strtol - found

Looking for strtoul

Looking for strtoul - found

Looking for _i64toa

Looking for _i64toa - found

Looking for _ui64toa

Looking for _ui64toa - found

Looking for strtoll

Looking for strtoll - found

Looking for strtoull

Looking for strtoull - found

Looking for atoi

Looking for atoi - found

Looking for atof

Looking for atof - found

Looking for strcmp

Looking for strcmp - found

Looking for strncmp

Looking for strncmp - found

Looking for _stricmp

Looking for _stricmp - found

Looking for strcasecmp

Looking for strcasecmp - found

Looking for _strnicmp

Looking for _strnicmp - found

Looking for strncasecmp

Looking for strncasecmp - found

Looking for vsscanf

Looking for vsscanf - found

Looking for vsnprintf

Looking for vsnprintf - found

Looking for fseeko

Looking for fseeko - not found

Looking for fseeko64

Looking for fseeko64 - found

Looking for sigaction

Looking for sigaction - not found

Looking for setjmp

Looking for setjmp - not found

Looking for nanosleep

Looking for nanosleep - found

Looking for sysconf

Looking for sysconf - not found

Looking for sysctlbyname

Looking for sysctlbyname - not found

Looking for pow in m

Looking for pow in m - found

weitjong

You must be new to auto-configure tools such as CMake. Those “not found” messages are not error in general. So you don’t have to worry about each and every one of them. Just need to check those you want it to be found but showed up as otherwise as it means you have something wrong in your build environment.

MZoltan32

but a headerfile is not found isnt it a problem? how to check those i need

you have the same messages?

JTippetts

CMake performs a large number of checks or tests to determine things such as the presence of certain libraries, certain functions, compiler capabilities, and so on. If something critical to the project is missing, it will terminate the entire configure process. In some cases, a missing feature might trigger an alternate build configuration, rather than triggering a critical failure. The success/failure of your configure can be determined by noting whether the build files were written to the build directory. If invoking cmake from the command line you should see some lines at the end of your configure output to the effect of “Configuring done”, “Generating done”, “Build files have been written to {build path}”. If you see errors there instead, then something is broken.