• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Dolphin Emulator Discussion and Support › Development Discussion v
« Previous 1 ... 36 37 38 39 40 ... 116 Next »

linking libraries with CMake
View New Posts | View Today's Posts

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
linking libraries with CMake
02-05-2015, 11:56 AM
#1
Ziek
Unregistered
 
Hello I'm trying to get the enet library to link properly in Dolphin for ubuntu and android but keep running into problems.  I believe it has something to do with my cmake code and was hoping some one more familiar with cmake and linux programming might have some insight into my problems.

This is what I added to CMakeList.txt in the main directory

include_directories(Externals)
add_subdirectory(Externals/enet)

and in externals/enet this is what the CMakeList.txt looks like

Code:
project(enet C)
set(SRCS
callbacks.c
compress.c
host.c
list.c
packet.c
peer.c
protocol.c)
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
   set(SRCS ${SRCS} win32.c)
else()
   set(SRCS ${SRCS} unix.c)
endif()
add_definitions(-Wno-parentheses-equality -DHAS_SOCKLEN_T)
add_library(enet STATIC ${SRCS})

and how I include the code is with

#include "enet/enet.h"

which works fine in visual studios

The errors I'm getting are unreferenced objects such as enet_initialize()
and enet_host_services(), and pretty much any other function call to enet library.

Any help on the subject would be much appreciated.
Reply
02-05-2015, 09:54 PM
#2
Ziek
Unregistered
 
Was able to solve the problem I forgot to Set(LIB enet) in the proper folders CMakeLists.txt
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode