IRC Log Viewer » #firebreath » 2013-08-04

IRC Nick Time (GMT-7) Message
lj1102 10:08 Hello, I'm currently trying to build a plugin (on linux x64) depending on a library that uses X11 and Xinemera, when building i get errors like " undefined reference to `XOpenDisplay'
"
they come out of the library i'm using, that compiles without any errors. After googling around i think i need to link X11 and Xinemera into my plugin but i just cant get it to work :/
I tried to add X11 to target_link_libraries in my projectDef.cmake file in my X11 folder. Btw. I'm on ubuntu.
lj1102 11:08 just to clarify my question, how do i link X11 and Xinemera proper into my project, if thats the problem.
taxilian 11:08 lj1102 look at the "Using Libraries" page on the website
lj1102 11:08 I already tried this using "find_library(X11_LIB X11)" and then "target_link_libraries(${X11_LIB})" without any difference, do i have to provide the full path to find X11 ?
taxilian 11:08 sounds like you need to learn a bit more cmake
one trick is to message("Found X11 lib: ${X11_LIB}")
that'll show you if it found it or not
lj1102 11:08 inserted the following, no message appears oO (also in projectDef.cmake) find_library(X11_LIB X11)
message("Found X11 Lib:${X11_LIB}")
taxilian 11:08 when you run the prep script?
lj1102 11:08 when i do "make myplugin" in firebreath build directory
taxilian 11:08 of course
when you change the cmake you need to rerun the prep script
sounds like prepmake.sh
lj1102 11:08 ah yeah, now i see the message "Found X11 Lib:/usr/lib/x86_64-linux-gnu/libX11.so" looks good to me though
taxilian 11:08 right… but if you hadn't rerun the prep script then it wouldn't have taken effect
so try building again
oh
target_link_libraries(${PROJECT_NAME} ${X11_LIB})
if you don't put the target it should add the library to as the first parameter it wont' work
lj1102 11:08 so I've added both libraries (X11, Xinerama) ran prepmake.sh on my plugin directory and then ran make myplugin again but i'm still receiving the same error messages :(
target_link_libraries(${PROJECT_NAME} ${X11_LIB})
target_link_libraries(${PROJECT_NAME} ${XINERAMA_LIB})
both are found
as the messages come out of the library i use maybe its a problem with the library itself, even tough it compiles flawless.. ?
lj1102 12:08 when i do "make VERBOSE=1 myplugin" i can see at the end of the compilerstring that it compiles with the necesary flags:
-lX11 -lXinerama