projectM-visualizer / frontend-sdl2

Standalone application based on SDL2 that turns your desktop audio into awesome visuals. Available on most platforms supported by both libprojectM and libSDL2.
GNU General Public License v3.0
57 stars 32 forks source link

build fails with undeclared functions #40

Closed Be-ing closed 1 year ago

Be-ing commented 1 year ago
frontend-sdl2 on  master via △ v3.22.2 
❯ cmake --build build
[0/1] Re-running CMake...
-- SDL version: 2.24.0
-- Poco version: 1.11.2
-- projectM version: 3.99
-- Configuring done
-- Generating done
-- Build files have been written to: /home/be/sw/frontend-sdl2/build
[3/5] Building CXX object src/CMakeFiles/projectMSDL.dir/ProjectMWrapper.cpp.o
FAILED: src/CMakeFiles/projectMSDL.dir/ProjectMWrapper.cpp.o 
ccache /usr/lib64/ccache/clang++ -DAUDIO_IMPL_HEADER=\"AudioCaptureImpl_SDL.h\" -DLIBPROJECTM_BUILD_VERSION=\"3.99\" -DPOCO_ENABLE_CPP11 -DPOCO_ENABLE_CPP14 -DPOCO_HAVE_FD_EPOLL -DPOCO_OS_FAMILY_UNIX -DPOCO_UNBUNDLED -DPROJECTMSDL_VERSION=\"2.0.0\" -DXML_DTD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_XOPEN_SOURCE=500 -isystem /home/be/local/include -isystem /usr/include/SDL2 -fPIE -fopenmp=libomp -std=gnu++14 -MD -MT src/CMakeFiles/projectMSDL.dir/ProjectMWrapper.cpp.o -MF src/CMakeFiles/projectMSDL.dir/ProjectMWrapper.cpp.o.d -o src/CMakeFiles/projectMSDL.dir/ProjectMWrapper.cpp.o -c /home/be/sw/frontend-sdl2/src/ProjectMWrapper.cpp
/home/be/sw/frontend-sdl2/src/ProjectMWrapper.cpp:137:5: error: use of undeclared identifier 'projectm_set_help_text'
    projectm_set_help_text(_projectM, helpText.c_str());
    ^
1 error generated.
[4/5] Building CXX object src/CMakeFiles/projectMSDL.dir/RenderLoop.cpp.o
FAILED: src/CMakeFiles/projectMSDL.dir/RenderLoop.cpp.o 
ccache /usr/lib64/ccache/clang++ -DAUDIO_IMPL_HEADER=\"AudioCaptureImpl_SDL.h\" -DLIBPROJECTM_BUILD_VERSION=\"3.99\" -DPOCO_ENABLE_CPP11 -DPOCO_ENABLE_CPP14 -DPOCO_HAVE_FD_EPOLL -DPOCO_OS_FAMILY_UNIX -DPOCO_UNBUNDLED -DPROJECTMSDL_VERSION=\"2.0.0\" -DXML_DTD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_XOPEN_SOURCE=500 -isystem /home/be/local/include -isystem /usr/include/SDL2 -fPIE -fopenmp=libomp -std=gnu++14 -MD -MT src/CMakeFiles/projectMSDL.dir/RenderLoop.cpp.o -MF src/CMakeFiles/projectMSDL.dir/RenderLoop.cpp.o.d -o src/CMakeFiles/projectMSDL.dir/RenderLoop.cpp.o -c /home/be/sw/frontend-sdl2/src/RenderLoop.cpp
/home/be/sw/frontend-sdl2/src/RenderLoop.cpp:59:21: error: use of undeclared identifier 'projectm_is_text_input_active'
                if (projectm_is_text_input_active(_projectMHandle, true))
                    ^
/home/be/sw/frontend-sdl2/src/RenderLoop.cpp:70:22: error: use of undeclared identifier 'projectm_is_text_input_active'
                if (!projectm_is_text_input_active(_projectMHandle, true))
                     ^
/home/be/sw/frontend-sdl2/src/RenderLoop.cpp:85:21: error: use of undeclared identifier 'projectm_is_text_input_active'
                if (projectm_is_text_input_active(_projectMHandle, true))
                    ^
/home/be/sw/frontend-sdl2/src/RenderLoop.cpp:87:21: error: use of undeclared identifier 'projectm_set_search_text'; did you mean 'projectm_get_search_index'?
                    projectm_set_search_text(_projectMHandle, event.text.text);
                    ^~~~~~~~~~~~~~~~~~~~~~~~
                    projectm_get_search_index
/home/be/local/include/libprojectM/projectM.h:805:30: note: 'projectm_get_search_index' declared here
PROJECTM_EXPORT unsigned int projectm_get_search_index(projectm_handle instance, const char* name);
                             ^
/home/be/sw/frontend-sdl2/src/RenderLoop.cpp:88:21: error: use of undeclared identifier 'projectm_populate_preset_menu'
                    projectm_populate_preset_menu(_projectMHandle);
                    ^
/home/be/sw/frontend-sdl2/src/RenderLoop.cpp:167:13: error: use of undeclared identifier 'projectm_set_toast_message'
            projectm_set_toast_message(_projectMHandle, aspectCorrectionEnabled ? "Aspect Correction Enabled"
            ^
/home/be/sw/frontend-sdl2/src/RenderLoop.cpp:196:17: error: use of undeclared identifier 'projectm_set_toast_message'
                projectm_set_toast_message(_projectMHandle, _audioCapture.AudioDeviceName().c_str());
                ^
/home/be/sw/frontend-sdl2/src/RenderLoop.cpp:234:13: error: use of undeclared identifier 'projectm_set_toast_message'
            projectm_set_toast_message(_projectMHandle, shuffleEnabled ? "Shuffle Enabled" : "Shuffle Disabled");
            ^
/home/be/sw/frontend-sdl2/src/RenderLoop.cpp:340:13: error: use of undeclared identifier 'projectm_delete_search_text'
            projectm_delete_search_text(_projectMHandle);
            ^
9 errors generated.
ninja: build stopped: subcommand failed.

Unfortunately the Qt frontend doesn't build either currently,

kblaschke commented 1 year ago

libprojectM's state is not always synced to the frontend's code, as we're still actively reworking the core library. I'm currently in the process of cleaning the library of code that shouldn't be part of it, e.g. the on-screen display, which was removed in the latest commit. Since it'd take a lot of effort to always keep all the frontends up to the development state of the library, this issue will remain for a while.

Until it is fixed, please just check out commit 62cecb36 of libprojectM, which will compile fine.

Be-ing commented 1 year ago

Okay, building this with 62cecb36 works.