Bonjour ,
j'ai un petit souci avec cmake je m'explique :

je suis sous mac et novice sur cmake

j'ai générer un makefile via eclipse pour mon projet tout fonctionne correctement .

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
 
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
 
-include ../makefile.init
 
RM := rm
 
# All of the sources participating in the build are defined here
-include sources.mk
-include src/server/Shared/SignalHandler/subdir.mk
-include src/server/Shared/PostgreSQLInterface/subdir.mk
-include src/server/Shared/Logging/subdir.mk
-include src/server/Shared/Databases/subdir.mk
-include src/server/Shared/Config/subdir.mk
-include src/server/Auth/Authentification/subdir.mk
-include src/server/Auth/subdir.mk
-include Dep/Raknet/subdir.mk
-include subdir.mk
-include objects.mk
 
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
endif
 
-include ../makefile.defs
 
# Add inputs and outputs from these tool invocations to the build variables 
 
# All Target
all: xsilium
 
# Tool invocations
xsilium: $(OBJS) $(USER_OBJS)
	@echo 'Building target: $@'
	@echo 'Invoking: MacOS X C++ Linker'
	g++ -pthread -lpq -o "xsilium" $(OBJS) $(USER_OBJS) $(LIBS)
	@echo 'Finished building target: $@'
	@echo ' '
 
# Other Targets
clean:
	-$(RM) $(C++_DEPS)$(OBJS)$(C_DEPS)$(CC_DEPS)$(CPP_DEPS)$(EXECUTABLES)$(CXX_DEPS)$(C_UPPER_DEPS) xsilium
	-@echo ' '
 
.PHONY: all clean dependents
.SECONDARY:
 
-include ../makefile.targets
Mais le problème c'est que je ne suis pas tout seul a développer donc j'ai commence a configurer cmake et j'ai une erreur

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
Undefined symbols for architecture x86_64:
  "Authentification::Authentification(RakNet::RakPeerInterface*)", referenced from:
      SocketThread(void*) in AuthServer.cpp.o
  "Authentification::CreateClient(RakNet::Packet*)", referenced from:
      SocketThread(void*) in AuthServer.cpp.o
  "Authentification::DeleteClient(RakNet::Packet*)", referenced from:
      SocketThread(void*) in AuthServer.cpp.o
  "Authentification::_HandleLogonChallenge(RakNet::Packet*)", referenced from:
      SocketThread(void*) in AuthServer.cpp.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [src/server/Auth/authserver] Error 1
make[1]: *** [src/server/Auth/CMakeFiles/authserver.dir/all] Error 2
make: *** [all] Error 2
et voici mon CMakelists.txt

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
 
########### authserver ###############
 
file(GLOB_RECURSE sources_authentication Authentication/*.cpp Authentication/*.h)
file(GLOB_RECURSE sources_realms realms/*.cpp realms/*.h)
file(GLOB sources_localdir *.cpp *.h)
 
set(authserver_SRCS
  ${authserver_SRCS}	
  ${sources_authentication}
  ${sources_realms}
  ${sources_localdir}
)
 
include_directories(
  ${CMAKE_BINARY_DIR}
  ${CMAKE_SOURCE_DIR}/src/server/Shared
  ${CMAKE_SOURCE_DIR}/src/server/Shared/Config
  ${CMAKE_SOURCE_DIR}/src/server/Shared/Databases
  ${CMAKE_SOURCE_DIR}/src/server/Shared/PostgreSQLInterface
  ${CMAKE_SOURCE_DIR}/src/server/Shared/SignalHandler
  ${CMAKE_SOURCE_DIR}/src/server/Shared/Singleton
  ${CMAKE_SOURCE_DIR}/src/server/Shared/Logging
  ${CMAKE_SOURCE_DIR}/src/server/Shared/Structure
  ${CMAKE_SOURCE_DIR}/Dep/Raknet
  ${CMAKE_CURRENT_SOURCE_DIR}
  ${CMAKE_CURRENT_SOURCE_DIR}/Authentication
  ${CMAKE_CURRENT_SOURCE_DIR}/realms
  ${PGSQL_INCLUDE_DIR}
  ${shared_STAT_SRCS}
  ${raknet_STAT_SRCS}
)
 
 
set(authserver_LINK_FLAGS "-pthread -lpq")
 
 
 
 
 
add_executable(authserver
  ${authserver_SRCS}
)
 
if( UNIX )
  set(authserver_LINK_FLAGS "${authserver_LINK_FLAGS}")
endif()
 
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
  set(authserver_LINK_FLAGS "-framework Carbon ${authserver_LINK_FLAGS} ")
endif()
 
 
set_target_properties(authserver PROPERTIES LINK_FLAGS "${authserver_LINK_FLAGS}" )
 
target_link_libraries(authserver shared raknet ${OSX_LIBS} ${PGSQL_LIBRARIES} )
 
  install(TARGETS authserver DESTINATION bin)
  install(FILES  authserver.conf.dist DESTINATION etc)
je ne voit pas où est erreur


Pouvez vous m'aider ?