main.cpp:96:11: error: ‘getpid’ was not declared in this scope
Linux MIDI arpeggiator, phrase generator and controller LFO
Status: Alpha
Brought to you by:
emuse
I'm trying to build from git on Arch Linux but getting this error atm;
/usr/include/qt/QtCore/qstring.h:382:14: note: declared here
382 | QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
| ^~~~~~~
src/logwidget.cpp:100:35: warning: ‘QString& QString::sprintf(const char*, ...)’ is deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations]
100 | ev.value, tick);
| ^
In file included from /usr/include/qt/QtCore/qhashfunctions.h:44,
from /usr/include/qt/QtCore/qlist.h:47,
from /usr/include/qt/QtGui/qicon.h:45,
from /usr/include/qt/QtWidgets/qabstractbutton.h:44,
from /usr/include/qt/QtWidgets/qpushbutton.h:44,
from /usr/include/qt/QtWidgets/QPushButton:1,
from src/logwidget.cpp:24:
/usr/include/qt/QtCore/qstring.h:382:14: note: declared here
382 | QString &sprintf(const char *format, ...) Q_ATTRIBUTE_FORMAT_PRINTF(2, 3);
| ^~~~~~~
g++ -c -pipe -O2 -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -D_REENTRANT -Wall -Wextra -fPIC -DPACKAGE=\"qmidiarp\" -DPACKAGE_VERSION=\"0.6.6\" -DAPP_NAME=\"QMidiArp\" -DAPPBUILD -DJACK_SESSION -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -Ic:/Qt/Tools/mingw492_32/include -Ic:/Qt/5.6/mingw49_32/include/QtWidgets -isystem /usr/include/qt -isystem /usr/include/qt/QtWidgets -isystem /usr/include/qt/QtGui -isystem /usr/include/qt/QtCore -I. -I/usr/lib/qt/mkspecs/linux-g++ -o main.o src/main.cpp
src/main.cpp: In function ‘int main(int, char**)’:
src/main.cpp:96:11: error: ‘getpid’ was not declared in this scope; did you mean ‘getpt’?
96 | srand(getpid());
| ^~~~~~
| getpt
make: *** [Makefile:1534: main.o] Error 1
==> ERROR: A failure occurred in build().
Did you follow build instructions and what were the last 20 lines output from configure?
after git checkout:
autoreconf -i
./configure --prefix=/usr
make
From the fact you're including mingw directories: did you use any of the qmake-relateed scripts? On linux you should use the autotools configure / make.
I haven't seen this error so far, neither the warning ocurring right before the error.
HTH
Best
Frank
My mistake! I read the installation section of the readme then directly went to try building before reading the next section ;) It has built now.
Great, happy it works :)
Just a note that I've created an AUR entry for the VCS version.
https://aur.archlinux.org/packages/qmidiarp-git