(
Jump to the original submission)
Fri 23 May 2008 09:30:35 AM UTC, comment #6:
The X_DISPLAY_MISSING related problem is fixed. I will open a new bug report for the LINK_DIRECTORIES related problem.
I think you may close this report.
|
Thu 24 Apr 2008 09:05:55 AM UTC, comment #5:
Still goes wrong.
All the LINK_DIRECTORIES entries are there, just the order is wrong. I have -L/usr/local/lib -L.../certi/libgraphc, but it should be -L.../certi/libgraphc -L/usr/local/lib to link with the most recent graph library.
Seems that more people had a similar problem with other libraries, but none has a solution. :-(
|
Wed 23 Apr 2008 09:40:07 PM UTC, comment #4:
Ok I see
I had never cross that one.
I'll use INCLUDE_DIRECTORIES(BEFORE ...)
Concerning wrong library link I think
it can be fixed using an extra
ADD_DEPENDENCIES(billard graph CERTI RTI)
in
test/Billiard/CMakeLists.txt
In fact I think without the dependency statement
CMake cannot guess if
TARGET_LINK_LIBRARIES(billard ... graph CERTI RTI)
concerns the CMake target "graph" of the same project
or the libgraph.a CMake found on the lib path.
I've just checked-in (HEAD) this would you try it?
Another solution may be to add
IF (NOT WIN32)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
LINK_DIRECTORIES(${LIBRARY_OUTPUT_PATH})
ENDIF(NOT WIN32)
in
certi/CMakeLists.txt
this is more "global" but it does not solve
the missing dependency specification and CMake
may try to build billard before graph.
|
Wed 23 Apr 2008 05:46:11 PM UTC, comment #3:
I found the problem:
In {prefix}/lib I have installed libgraph.a that is compiled using X_DISPLAY_MISSING, but now I'm compiling without X_DISPLAY_MISSING.
Since -L{prefix}/lib is BEFORE -L/{sources}/libgraph, the wrong library is found and an error is generated. Do you know how to convince cmake to put -L/{sources}/libgraph before -L{prefix}/lib? The library in {sources} should be preferrably used for linking.
BTW: I suggest to use INCLUDE_DIRECTORIES(BEFORE ... when including some certi libraries, e.g. in test/Billiard/CMakeLists.txt.
This solves a similar problem for the include search path. Unfortunatelly I don't know if there is a simular solution also for the library search path. Do you?
|
Wed 23 Apr 2008 12:11:42 PM UTC, comment #2:
Problem presist. I took a fresh new CVS HEAD, used cmake and got the same error as before.
|
Wed 23 Apr 2008 11:21:47 AM UTC, comment #1:
The appropriate
detection of X11 related header by CMake
should be OK.
This should be fixed in CVS HEAD.
However the error
is puzzling since Definecr is a function of libgraphc
(CERTI/test/libgraphc).
Would you try to rebuild CERTI CVS with CMake?
|
Thu 10 Apr 2008 09:01:43 AM UTC, original submission:
I have troubles building the Billiard example using cmake. The cmake doesn't report missing X11/bitmaps. The build fails when the bitmaps are missing.
After fixing this problem the build fails again. Some X libraries are still missing, but I don't know which ones.
CMakeFiles/billard.dir/Ball.o: In function `Ball::erase()':
/root/projects/certi/certi2/test/Billard/Ball.cc:71: undefined reference to `Definecr(point, unsigned long, mode_remp, couleur)'
I have Fedora Core 8, with lesstif-devel and
xorg-x11-xbitmaps installed.
|
(Note: upload size limit is set to 16384 kB, after insertion of the required
escape characters.)
Attach File(s):
Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Follow 9 latest changes.