marlam / gencolormap

color map generator for scientific visualization
https://marlam.de/gencolormap
Other
10 stars 3 forks source link

GUI compilation problem #1

Closed adammaj1 closed 9 months ago

adammaj1 commented 9 months ago

Hi

I have compiled command line tool ,

cmake .
-- The CXX compiler identification is GNU 11.4.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
CMake Warning (dev) in CMakeLists.txt:
  AUTOGEN: No valid Qt version found for target gencolormap.  AUTOMOC
  disabled.  Consider adding:

    find_package(Qt<QTVERSION> COMPONENTS Core)

  to your CMakeLists.txt file.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /home/a/gencolormap-mirror
a@zalman:~/gencolormap-mirror$ make
[ 25%] Building CXX object CMakeFiles/gencolormap.dir/cmdline.cpp.o
[ 50%] Building CXX object CMakeFiles/gencolormap.dir/colormap.cpp.o
[ 75%] Building CXX object CMakeFiles/gencolormap.dir/export.cpp.o
[100%] Linking CXX executable gencolormap
[100%] Built target gencolormap

but gui have an errror

make all
g++ -c -pipe -O2 -Wall -Wextra -D_REENTRANT -fPIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I. -I. -I/usr/include/x86_64-linux-gnu/qt5 -I/usr/include/x86_64-linux-gnu/qt5/QtGui -I/usr/include/x86_64-linux-gnu/qt5/QtCore -I. -I/usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ -o colormapwidgets.o colormapwidgets.cpp
In file included from colormapwidgets.cpp:25:
gui.hpp:28:10: fatal error: QMainWindow: No such file or directory
   28 | #include <QMainWindow>
      |          ^~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:415: colormapwidgets.o] Error 1

Any tips ? I'm on Ubuntu 22.043

qmake --version QMake version 3.1 Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu

marlam commented 9 months ago

Gencolormap uses the CMake build system instead of qmake, and it requires Qt6 instead of Qt5.

So, with package qt6-base-dev, something like the following should work:

cd gencolormap
mkdir build
cd build
cmake ..
make
adammaj1 commented 9 months ago
sudo apt-get install qt6-base-dev
cd gencolormap
mkdir build
cd build
cmake ..
make

and it works. Thx