• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

CMake don't create otclient.cbp file

Antharaz

New Member
Joined
Jan 28, 2010
Messages
27
Reaction score
0
I do step by step of tutorial to compile OTC with code blocks, when i click at "generate" the program (cmake) create a lot of files at folder that i specified, but the file "otclient.cbp" isn't created and any one file with ".cbp" is created. I didn't understand what happened :x

Can anyone help me pls?

Above is the Cmake log:

The C compiler identification is GNU 6.3.0

The CXX compiler identification is GNU 6.3.0

Check for working C compiler: C:/MinGW/bin/gcc.exe

Check for working C compiler: C:/MinGW/bin/gcc.exe -- works

Detecting C compiler ABI info

Detecting C compiler ABI info - done

Detecting C compile features

Detecting C compile features - done

Check for working CXX compiler: C:/MinGW/bin/g++.exe

Check for working CXX compiler: C:/MinGW/bin/g++.exe -- works

Detecting CXX compiler ABI info

Detecting CXX compiler ABI info - done

Detecting CXX compile features

Detecting CXX compile features - done

Performing Test COMPILER_KNOWS_CXX11

Performing Test COMPILER_KNOWS_CXX11 - Success

Performing Test COMPILER_KNOWS_STDLIB

Performing Test COMPILER_KNOWS_STDLIB - Failed

Link to static libraries: ON

Build type: RelWithDebInfo

Build commit: devel

Build revision: 0

Looking for pthread.h

Looking for pthread.h - not found

Found Threads: TRUE

Boost version: 1.50.0

Found the following Boost libraries:

system

thread

filesystem

chrono

date_time

Found Lua: C:/MinGW/lib/liblua51.a

LuaJIT: OFF

Found PHYSFS: C:/MinGW/lib/libphysfs.a

Found OPENSSL: C:/MinGW/lib/libssl.a;C:/MinGW/lib/libcrypto.a

Found ZLIB: C:/MinGW/lib/libz.a

Debug information: ON

Crash handler: ON

Found OpenGL: opengl32

Found GLEW: C:/MinGW/lib/libglew32.a

OpenGL ES: OFF

Windows console: OFF

Found OPENAL: C:/MinGW/lib/libOpenAL32.a

Found VORBISFILE: C:/MinGW/lib/libvorbisfile.a

Found VORBIS: C:/MinGW/lib/libvorbis.a

Found OGG: C:/MinGW/lib/libogg.a

Bot protection: ON

Use precompiled header: OFF

Configuring done
 
Looking for pthread.h

Looking for pthread.h - not found

Try to feed (link) what the compiler wants to eat!

Well, i follow your instruction and went to winGW, then searched for pthread lib. After that, i've install it. After this i've run CMake again and clicked at "Generate", it appears some errors, but it created otclient.cbp file.

The CMakeError.txt is here:

Performing C++ SOURCE FILE Test COMPILER_KNOWS_STDLIB failed with the following output:
Change Dir: D:/compile/CMakeFiles/CMakeTmp

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_4b80d/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_4b80d.dir\build.make CMakeFiles/cmTC_4b80d.dir/build

mingw32-make.exe[1]: Entering directory 'D:/compile/CMakeFiles/CMakeTmp'

Building CXX object CMakeFiles/cmTC_4b80d.dir/src.cxx.obj

C:\MinGW\bin\g++.exe -std=c++11 -DCOMPILER_KNOWS_STDLIB -stdlib=libc++ -o CMakeFiles\cmTC_4b80d.dir\src.cxx.obj -c D:\compile\CMakeFiles\CMakeTmp\src.cxx

g++.exe: error: unrecognized command line option '-stdlib=libc++'

CMakeFiles\cmTC_4b80d.dir\build.make:64: recipe for target 'CMakeFiles/cmTC_4b80d.dir/src.cxx.obj' failed

mingw32-make.exe[1]: *** [CMakeFiles/cmTC_4b80d.dir/src.cxx.obj] Error 1

mingw32-make.exe[1]: Leaving directory 'D:/compile/CMakeFiles/CMakeTmp'

Makefile:125: recipe for target 'cmTC_4b80d/fast' failed

mingw32-make.exe: *** [cmTC_4b80d/fast] Error 2


Source file was:
int main() { return 0; }
Determining if the pthread_create exist failed with the following output:
Change Dir: D:/compile/CMakeFiles/CMakeTmp

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_4bca2/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_4bca2.dir\build.make CMakeFiles/cmTC_4bca2.dir/build

mingw32-make.exe[1]: Entering directory 'D:/compile/CMakeFiles/CMakeTmp'

Building C object CMakeFiles/cmTC_4bca2.dir/CheckSymbolExists.c.obj

C:\MinGW\bin\gcc.exe -o CMakeFiles\cmTC_4bca2.dir\CheckSymbolExists.c.obj -c D:\compile\CMakeFiles\CMakeTmp\CheckSymbolExists.c

Linking C executable cmTC_4bca2.exe

"C:\Program Files\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_4bca2.dir\link.txt --verbose=1

"C:\Program Files\CMake\bin\cmake.exe" -E remove -f CMakeFiles\cmTC_4bca2.dir/objects.a
C:\MinGW\bin\ar.exe cr CMakeFiles\cmTC_4bca2.dir/objects.a @CMakeFiles\cmTC_4bca2.dir\objects1.rsp
C:\MinGW\bin\gcc.exe -Wl,--whole-archive CMakeFiles\cmTC_4bca2.dir/objects.a -Wl,--no-whole-archive -o cmTC_4bca2.exe -Wl,--out-implib,libcmTC_4bca2.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\cmTC_4bca2.dir\linklibs.rsp
CMakeFiles\cmTC_4bca2.dir/objects.a(CheckSymbolExists.c.obj):CheckSymbolExists.c:(.text+0x12): undefined reference to `pthread_create'

collect2.exe: error: ld returned 1 exit status

CMakeFiles\cmTC_4bca2.dir\build.make:98: recipe for target 'cmTC_4bca2.exe' failed

mingw32-make.exe[1]: *** [cmTC_4bca2.exe] Error 1

mingw32-make.exe[1]: Leaving directory 'D:/compile/CMakeFiles/CMakeTmp'

Makefile:125: recipe for target 'cmTC_4bca2/fast' failed

mingw32-make.exe: *** [cmTC_4bca2/fast] Error 2


File D:/compile/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>

int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: D:/compile/CMakeFiles/CMakeTmp

Run Build Command:"C:/MinGW/bin/mingw32-make.exe" "cmTC_7909c/fast"
C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_7909c.dir\build.make CMakeFiles/cmTC_7909c.dir/build

mingw32-make.exe[1]: Entering directory 'D:/compile/CMakeFiles/CMakeTmp'

Building C object CMakeFiles/cmTC_7909c.dir/CheckFunctionExists.c.obj

C:\MinGW\bin\gcc.exe -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles\cmTC_7909c.dir\CheckFunctionExists.c.obj -c "C:\Program Files\CMake\share\cmake-3.10\Modules\CheckFunctionExists.c"

Linking C executable cmTC_7909c.exe

"C:\Program Files\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_7909c.dir\link.txt --verbose=1

"C:\Program Files\CMake\bin\cmake.exe" -E remove -f CMakeFiles\cmTC_7909c.dir/objects.a
C:\MinGW\bin\ar.exe cr CMakeFiles\cmTC_7909c.dir/objects.a @CMakeFiles\cmTC_7909c.dir\objects1.rsp
C:\MinGW\bin\gcc.exe -DCHECK_FUNCTION_EXISTS=pthread_create -Wl,--whole-archive CMakeFiles\cmTC_7909c.dir/objects.a -Wl,--no-whole-archive -o cmTC_7909c.exe -Wl,--out-implib,libcmTC_7909c.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles\cmTC_7909c.dir\linklibs.rsp
c:/mingw/bin/../lib/gcc/mingw32/6.3.0/../../../../mingw32/bin/ld.exe: cannot find -lpthreads

collect2.exe: error: ld returned 1 exit status

CMakeFiles\cmTC_7909c.dir\build.make:98: recipe for target 'cmTC_7909c.exe' failed

mingw32-make.exe[1]: *** [cmTC_7909c.exe] Error 1

mingw32-make.exe[1]: Leaving directory 'D:/compile/CMakeFiles/CMakeTmp'

Makefile:125: recipe for target 'cmTC_7909c/fast' failed

mingw32-make.exe: *** [cmTC_7909c/fast] Error 2

What i undestood from "g++.exe: error: unrecognized command line option '-stdlib=libc++'" is that the gcc doesn't recognize command -stdlib, then i've thinked that it's a lib that isn't installed. So i went to winGW again and search for this library, then i found the library an it's already installed. (mingw32-libstdc++) "/

So i googled this error and found A LOT ot comments saying this:

the gcc compiler has no such commandline option as -stdlib. The LLVM clang compiler does. That is because clang offers you the choice of linking the LLVM standard C++ library (libc++) or the GNU standard C++ library (libstdc++), whereas gcc supports only libstdc++.

And now i didn't know what can i do "/ I've tryied search a solution, but all comment says to use clang compiler. Have any idea to help me?
 

Similar threads

Back
Top