Ask Your Question
0

Coin3D library using cmake on Fedora 20 - fatal error: Inventor/Qt/SoQt.h: No such file or directory

asked 2014-11-07 12:59:03 -0500

tuxdna gravatar image

I have create a project that uses Cmake and Coin3D libraries: https://github.com/tuxdna/phyloviz

I am getting a fatal error: Inventor/Qt/SoQt.h: No such file or directory. This is what I am doing:

$ sudo yum install cmake SoQt-devel
$ cd path/to/phyloviz
[phyloviz] $ mkdir build
[phyloviz] $ cd build/
[phyloviz/build] $ cmake ../ -DCOIN3D_INCLUDE_DIRS=/usr/include/Coin2/
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /bin/c++
-- Check for working CXX compiler: /bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PkgConfig: /bin/pkg-config (found version "0.28") 
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /bin/qmake-qt4 (found version "4.8.5") 
-- Found Coin3D: /usr/lib64/libCoin.so  
-- Configuring done
-- Generating done
-- Build files have been written to: .../phyloviz/build

Now lets compile the code

[phyloviz/build] $ make
Scanning dependencies of target ev-iv
[ 50%] Building CXX object CMakeFiles/ev-iv.dir/src/ev-iv/ev-iv.cc.o
.../phyloviz/src/ev-iv/ev-iv.cc:1:30: fatal error: Inventor/Qt/SoQt.h: No such file or directory
 #include <Inventor/Qt/SoQt.h>
                              ^
compilation terminated.
make[2]: *** [CMakeFiles/ev-iv.dir/src/ev-iv/ev-iv.cc.o] Error 1
make[1]: *** [CMakeFiles/ev-iv.dir/all] Error 2
make: *** [all] Error 2
[phyloviz/build]$

Even though I have specified the include directory using cmake ../ -DCOIN3D_INCLUDE_DIRS=/usr/include/Coin2/, I am getting the fatal error above.

This works fine on Ubuntu 14.04. How can I resolve this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-11-07 16:04:49 -0500

QuLogic gravatar image

You have told CMake to find the libraries, and link to the libraries, but you have not told it to search for the libraries' headers when compiling.

You need to add an INCLUDE_DIRECTORIES call to your CMakeLists.txt (and pass it ${QT_INCLUDES} or ${QT_INCLUDE_DIR} or something like that for each library.)

edit flag offensive delete link more

Comments

I have specified set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cMake") which picks up cMake/FindSoQt.cmake. But it doesn't seem to work.

tuxdna gravatar imagetuxdna ( 2014-11-08 08:08:32 -0500 )edit

That's the CMake search path. I'm talking about the compiler search path.

QuLogic gravatar imageQuLogic ( 2014-11-08 14:46:13 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-11-07 12:59:03 -0500

Seen: 852 times

Last updated: Nov 07 '14