• 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!

Help OTClient Compile

a the moment it's not possible to compile otclient in mingw
but a guy made a pull request to make some changes wait until it get fixed
 
To compile with mingw32 you need define the macro -DWIN32 and change some things at code
 
@gugu15 can you help me? i've made changes in my source but when i press the configure option in c-make
i get error in cmakelist.txt error at line 39
CMake Error at CMakeLists.txt:39:
Parse error. Expected a newline, got identifier with text
"add_definitions".


Configuring incomplete, errors occurred!


here my cmake
Code:
if(WIN32)
    add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o
                       COMMAND ${CMAKE_RC_COMPILER}
                       -I${CMAKE_CURRENT_SOURCE_DIR}/src
                       -i${CMAKE_CURRENT_SOURCE_DIR}/src/otcicon.rc
                       -o ${CMAKE_CURRENT_BINARY_DIR}/otcicon.o)
    set(executable_SOURCES ${executable_SOURCES} otcicon.o)
endif()

if(MINGW)
add_definitions(-DWIN32)
endif()
>> line 39  add_definitions(-D"VERSION=\\"${VERSION}\\"")
 
Last edited:
how i must do that? , i dont undertand what you mean with a tab at the line 11
@gugu15
thanks for your fast reply
cmakelist.txt
Code:
cmake_minimum_required(VERSION 2.6)
project(otclient)

set(VERSION "0.6.6")

option(FRAMEWORK_SOUND "Use SOUND " ON)
option(FRAMEWORK_GRAPHICS "Use GRAPHICS " ON)
option(FRAMEWORK_XML "Use XML " ON)
option(FRAMEWORK_NET "Use NET " ON)
option(FRAMEWORK_SQL "Use SQL" OFF)
LINE 11 <<<
include(src/framework/CMakeLists.txt)
include(src/client/CMakeLists.txt)

# functions map for reading backtraces
if(NOT APPLE)
    set(CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,-Map=${PROJECT_NAME}.map")
endif()

option(USE_PCH "Use precompiled header (speed up compile)" OFF)

set(executable_SOURCES
    src/main.cpp
 
where is this:
C++:
if(MINGW)
add_definitions(-DWIN32)
endif()
change to this:
C++:
if(MINGW)
    add_definitions(-DWIN32)
endif()
 
@gugu15
the error is still appearing /:
Code:
CMake Error at CMakeLists.txt:39:
  Parse error.  Expected a newline, got identifier with text
  "add_definitions".


Configuring incomplete, errors occurred!
would you mind share your cmakelist.txt with me pls men?
regards
 
add_definitions(-D"VERSION=\\"${VERSION}\\"") <<< line 39

# add client executable
add_executable(${PROJECT_NAME} ${framework_SOURCES} ${client_SOURCES} ${executable_SOURCES})
target_link_libraries(${PROJECT_NAME} ${framework_LIBRARIES})
 
Back
Top