cubert-hyperspectral / cuvis.cpp

Apache License 2.0
1 stars 2 forks source link

Functions called in cuvis.hpp, undefined / undeclared in cuvis.h (nor elsewhere in the scope) #28

Open mhmdjouni opened 2 months ago

mhmdjouni commented 2 months ago

I tried running it first in the C version of the examples, no issues. In the C++ version though it gives some errors.

Steps to reproduce:

A bunch of errors of the same type occur (see below), for which it seems the following functions are reported undeclared in the scope:

In particular, here is the full report:


-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- 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
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
statusDoxygen is needed to build the documentation.
Failed to compile and run get_version_executable
CMake Error at /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/FindCuvisCpp.cmake:91 (message):
  Change Dir:
  '/home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/01_loadMeasurement_cpp/build/try_compile/CMakeFiles/CMakeTmp'

  Run Build Command(s): /usr/local/bin/cmake -E env VERBOSE=1 /usr/bin/gmake
  -f Makefile cmTC_41651/fast

  /usr/bin/gmake -f CMakeFiles/cmTC_41651.dir/build.make
  CMakeFiles/cmTC_41651.dir/build

  gmake[1]: Entering directory
  '/home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/01_loadMeasurement_cpp/build/try_compile/CMakeFiles/CMakeTmp'

  Building CXX object CMakeFiles/cmTC_41651.dir/get_version.cpp.o

  /usr/bin/c++ -isystem
  /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/interface
  -isystem
  /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/auxiliary/include
  -pthread -o CMakeFiles/cmTC_41651.dir/get_version.cpp.o -c
  /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/helper/get_version.cpp

  In file included from
  /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/helper/get_version.cpp:2:

  /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/interface/cuvis.hpp:
  In member function ‘std::string
  cuvis::AcquisitionContext::get_pixel_format(cuvis::int_t) const’:

  /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/interface/cuvis.hpp:2368:9:
  error: ‘cuvis_acq_cont_get_pixel_format’ was not declared in this
  scope; did you mean ‘cuvis_acq_cont_get_state’?

   2368 |     chk(cuvis_acq_cont_get_pixel_format(*_acqCont, id, format));
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        |         cuvis_acq_cont_get_state

  /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/interface/cuvis.hpp:
  In member function ‘void
  cuvis::AcquisitionContext::set_pixel_format(cuvis::int_t, std::string)’:

  /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/interface/cuvis.hpp:2374:9:
  error: ‘cuvis_acq_cont_set_pixel_format’ was not declared in this scope

   2374 |     chk(cuvis_acq_cont_set_pixel_format(*_acqCont, id, format.c_str())); }
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/interface/cuvis.hpp:
  In member function ‘std::vector<std::__cxx11::basic_string<char> >
  cuvis::AcquisitionContext::get_available_pixel_formats(cuvis::int_t)
  const’:

  /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/interface/cuvis.hpp:2379:9:
  error: ‘cuvis_acq_cont_get_available_pixel_format_count’ was not
  declared in this scope; did you mean
  ‘cuvis_comp_available_pixel_format_get’?

   2379 |     chk(cuvis_acq_cont_get_available_pixel_format_count(*_acqCont, id, &count));
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        |         cuvis_comp_available_pixel_format_get

  /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/interface/cuvis.hpp:2384:11:
  error: ‘cuvis_acq_cont_get_pixel_format’ was not declared in this
  scope; did you mean ‘cuvis_acq_cont_get_state’?

   2384 |       chk(cuvis_acq_cont_get_pixel_format(*_acqCont, id, format));
        |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        |           cuvis_acq_cont_get_state

  gmake[1]: *** [CMakeFiles/cmTC_41651.dir/build.make:78:
  CMakeFiles/cmTC_41651.dir/get_version.cpp.o] Error 1

  gmake[1]: Leaving directory
  '/home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/01_loadMeasurement_cpp/build/try_compile/CMakeFiles/CMakeTmp'

  gmake: *** [Makefile:127: cmTC_41651/fast] Error 2

Call Stack (most recent call first):
  /home/jounim/Work/codebase_projects/cuvis.sdk/examples/cuvis.cpp.examples/cuvis.cpp/FindCuvisCpp.cmake:98 (get_library_version)
  CMakeLists.txt:5 (find_package)

-- Configuring incomplete, errors occurred!
mhmdjouni commented 2 months ago

A naïve way to bypass these errors is to comment out the lines 2368, 2374, 2379, and 2384 of cuvis.hpp, which then allows to build the binary file using the make command. However:

birkholz-cubert commented 1 month ago

Hello,

so this functions still had the wrong names in the 3.3.0beta1 version. This is now fixed in the 3.3.0rc1 version. The functions are new called:

It seems like the submodule for the cuvis.cpp.examples repository was not updated. The submodule should now point to the correct repository