Sign in

Problem building in Windows 10: no such file error

  • CN 3 0
    Hello,
    I'm having problems building the Polyphone app from the git repository sources. I reviewed the tech doc 'https://www.polyphone.io/o/documentation/en/development/using-qt-creator-to-build-polyphone', cloned the polyphone repo, and made the recommended Windows OS changes to the Qt project file polyphone.pro. Running qmake succeeds, building the project fails with several missing files as shown below. I am building with Qt archive version 5.15.2. Please see the attached files for build log and Qt system info.

    My appreciation & many thanks for your help!

    ..\sources\core\sample\samplereaderogg.cpp:26:10: fatal error: vorbis/codec.h: No such file or directory
    #include <vorbis/codec.h>
    ^~~~~~~~~~~~~~~~
    compilation terminated.
    mingw32-make[1]: *** [Makefile.Debug:61074: debug/samplereaderogg.o] Error 1
    mingw32-make[1]: *** Waiting for unfinished jobs....
    ..\sources\core\sample\samplereaderflac.cpp:26:10: fatal error: FLAC/stream_decoder.h: No such file or directory
    #include "FLAC/stream_decoder.h"
    ^~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    mingw32-make[1]: *** [Makefile.Debug:64355: debug/samplereaderflac.o] Error 1
    ..\sources\core\utils.cpp:43:10: fatal error: openssl/rsa.h: No such file or directory
    #include "openssl/rsa.h"
    ^~~~~~~~~~~~~~~
    compilation terminated.
    mingw32-make[1]: *** [Makefile.Debug:66526: debug/utils.o] Error 1
    ..\sources\core\sample\sound.cpp:34:10: fatal error: FLAC/stream_decoder.h: No such file or directory
    #include "FLAC/stream_decoder.h"
    ^~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    mingw32-make[1]: *** [Makefile.Debug:65540: debug/sound.o] Error 1
    ..\sources\context\audiodevice.cpp:28:10: fatal error: portaudio.h: No such file or directory
    #include "portaudio.h"
    ^~~~~~~~~~~~~
    compilation terminated.
    build-output.txt
    qt-system-info-output.txt
  • CS 73 0
    Message from csw900 on
    I assume you are doing this for fun as a perfectly good Polyphone binary is available for windows - which I use myself.

    tt looks as if you need to download the missing dependency files and add them to the project.

    csw900
  • CN 3 0
    Hi CSW,
    I am interested in in adding some functionality to the SF2 libraries. I have another couple of software developers that are working with SF2 and also like to use the PolyPhone app. There are other library options available that may be easier to implement, but my colleagues have specifically asked about being able to the SF2 file conversion work from within the PolyPhone app.

    Thanks for your response and analysis. It does indeed look like there is some library source or lib & header files missing.

    I noticed in the Qt project file, polyphone.pro there is a reference to a set of libraries 'LIBS' and an include file path '../lib_windows/include' that is missing from the repo sources. It looks like a set of external libraries and their include files need to be added to the git repository.

    File polyphone.pro fragment:
    ...
    win32 {
    DEFINES += __WINDOWS_MM__ USE_LOCAL_RTMIDI USE_LOCAL_STK USE_LOCAL_QCUSTOMPLOT
    INCLUDEPATH += ../lib_windows/include
    RC_FILE = polyphone.rc
    QMAKE_CXXFLAGS += -std=c++11 -ffloat-store # Compiler is MinGW for the option -ffloat-store, required by sfArk
    LIBS += -lzlib1 -lwinmm -logg -lvorbis -lvorbisfile -lvorbisenc.dll -lcrypto -lFLAC -lportaudio

    !contains(QMAKE_TARGET.arch, x86_64) {
    LIBS += -L$$PWD/../lib_windows/32bits
    DESTDIR = $$PWD/../lib_windows/32bits
    } else {
    LIBS += -L$$PWD/../lib_windows/64bits
    DESTDIR = $$PWD/../lib_windows/64bits
    }
    }

    Carlos
  • CS 73 0
    Message from csw900 on
    If you read the README file in the src directory there is a list of
    Prerequisites
    ------------------------------------------------------------------------------------------------
    The following libraries are required (the name may vary depending on your system):
    - qt (qtbase5-dev / qt5-devel) (also libqt5svg5-dev)
    - alsa (libasound2-dev / alsa-lib-devel)
    - jack (libjack-jack2-dev / jack-audio-connection-kit-devel)
    - portaudio (portaudio19-dev / portaudio-devel)
    - rtmidi (librtmidi-dev)
    - stk (libstk0-dev)
    - qcustomplot (libqcustomplot-dev)
    - vorbis (libvorbis-dev)
    - ogg (libogg-dev)
    - wolfssl (libwolfssl-dev)
    - flac (libflac-dev)
    Use your package manager to install them: apt, synaptic, yum,...
    -----------------------------------------------------------------------------------------------
    This is clearly aimed at Linux - You cannot "install" any of these on Windows so you will need to download the sources and you will probably have to seperately compile each one to obtain .dll shared library files and add these to your project along with the header files. (It will probably be easier to cross compile on Linux with a target of windows).

    I think there are ways to use github facilities for cross compiling binaries for different systems but you will need to ask someone else as I have never used this facility.
    csw900
  • CN 3 0
    Hi CSW,
    Thank you for the explanation. I do recall reading the README file, but it only has instructions for Linux and MacOS. The online doc I referenced contained the only instructions I was able to find for the Windows build. I appreciate your advise. The Linux build path looks like the best option.

    Thanks,

    Carlos

Sign in or register to take part in discussions.

Polyphone needs you!

Polyphone is free but there are costs associated with its website and development. A small donation will help a lot.

Donate
Learn the basics Try a tutorial
Scroll to
top