QT creator for mac throwing error with some libraries - c++

When loading a qt project in mac, I've got the following errors.
In file included from ../../common/monitoring.cpp:1:
../../common/monitoring.h:3:10: fatal error: 'prometheus/exposer.h' file not found
#include <prometheus/exposer.h>
^~~~~~~~~~~~~~~~~~~~~~
modules/ui/common/monitoring.h:3: error: 'prometheus/exposer.h' file not found
In file included from moc_monitoring.cpp:10:
./../../common/monitoring.h:3:10: fatal error: 'prometheus/exposer.h' file not found
#include <prometheus/exposer.h>
^~~~~~~~~~~~~~~~~~~~~~
:-1: error: [monitoring.o] Error 1
modules/ui/common/postgre.h:8: error: 'pqxx/pqxx' file not found
In file included from ../../common/postgre.cpp:1:
../../common/postgre.h:8:10: fatal error: 'pqxx/pqxx' file not found
#include <pqxx/pqxx>
^~~~~~~~~~~
modules/ui/common/fileio.cpp:3: error: 'jsoncpp/json/json.h' file not found
../../common/fileio.cpp:3:10: fatal error: 'jsoncpp/json/json.h' file not found
#include <jsoncpp/json/json.h>
^~~~~~~~~~~~~~~~~~~~~
modules/ui/common/postgre.h:8: error: 'pqxx/pqxx' file not found
In file included from moc_postgre.cpp:10:
./../../common/postgre.h:8:10: fatal error: 'pqxx/pqxx' file not found
#include <pqxx/pqxx>
^~~~~~~~~~~
The libraries have been installed via brew.
In the case of prometheus, I've got this on the pro file for the QT project.
INCLUDEPATH += "/opt/homebrew/Cellar/prometheus-cpp/1.0.1/include/prometheus/"
LIBS += "/opt/homebrew/Cellar/prometheus-cpp/1.0.1/lib/cmake/prometheus-cpp -lprometheus-cpp-pull -lprometheus-cpp-core"
But it still fails. Even when adding other libraries installed too.

It should be
INCLUDEPATH += "/opt/homebrew/Cellar/prometheus-cpp/1.0.1/include
Since the subdirectory prometheus is set in #include <prometheus/exposer.h>.

Related

Emscripten: fatal error: sys/cdefs.h: No such file or directory when compiling for 32 bit

When trying to compile an existing C++ project with emscripten I got the following error:
emmake make LINUX
In file included from /usr/include/stdio.h:27:0,
from src/abinitplugin.c:50:
/usr/include/features.h:367:25: fatal error: sys/cdefs.h: No such file or directory
compilation terminated.
I am able to compile for LINUXAMD64, but I need it specifically 32-bit. How do I solve it?

fatal error: features.h: No such file or directory compilation terminated

I am just running the code build.sh. However, I got the error message:
/mnt/storage/easybuild/software/GCCcore/5.4.0/lib/gcc/x86_64-unknown-linux-gnu/5.4.0/include-fixed/limits.h:168:61:
fatal error: limits.h: No such file or directory compilation
terminated.
and also this error:
/mnt/storage/software/libraries/nvidia/cuda-9.0/bin/..//include/crt/host_config.h:179:40:
fatal error: features.h: No such file or directory compilation
terminated.
I have checked the path: /mnt/storage/easybuild/software/GCCcore/5.4.0/lib/gcc/x86_64-unknown-linux-gnu/5.4.0/include-fixed/, there is a file "limits.sh", but the error still occurs.

gSoap error : xlocale.h No such file or directory

I am trying to create C++ soap webservice client in Windows 7. I am using gSoap and I followed gSoap tutorial.
first and second commands worked but
c++ -o main main.cpp soapC.cpp soapcalcProxy.cpp stdsoap2.cpp
command did not work.
error is
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\user\Desktop\soap>C:\MinGW\bin\mingw32-g++.exe -o main main.cpp soapC.cpp soapcalcProxy.cpp stdsoap2.cpp
In file included from soapStub.h:22:0,
from soapH.h:16,
from calc.nsmap:2,
from main.cpp:16:
stdsoap2.h:651:23: fatal error: xlocale.h: No such file or directory
compilation terminated.
In file included from soapStub.h:22:0,
from soapH.h:16,
from soapC.cpp:19:
stdsoap2.h:651:23: fatal error: xlocale.h: No such file or directory
compilation terminated.
In file included from soapStub.h:22:0,
from soapH.h:16,
from soapcalcProxy.h:16,
from soapcalcProxy.cpp:14:
stdsoap2.h:651:23: fatal error: xlocale.h: No such file or directory
compilation terminated.
In file included from stdsoap2.cpp:60:0:
stdsoap2.h:651:23: fatal error: xlocale.h: No such file or directory
compilation terminated.
How can I solve it ?
I am using Windows 7 64 bit and mingw.
Thanks.
I had the same problem, I solved it by adding the -DWITH_NO_C_LOCALE option when compiling.
Source: https://sourceforge.net/p/gsoap2/bugs/1098/

Boost compile error cstddef: No such file or directory

When I want to use boost, I meet compile error, also can not find cstddef in /usr/include/boost:
In file included from server.c:10:0:
/usr/include/boost/config/select_stdlib_config.hpp:17:19: fatal error: cstddef: No such file or directory
compilation terminated.
In Ubuntu 12.

mysql++ examples not compiling mysql.h: No such file or directory compilation terminated

Whenever I attempt to compile some examples from the mysql++ library, I got the following error:
In file included from /home/testbed/Tools/mysql++-3.1.0/lib/cmdline.h:32:0,
from multiquery.cpp:32:
/home/testbed/Tools/mysql++-3.1.0/lib/common.h:189:20: fatal error: mysql.h:
No such file or directory
compilation terminated.
I have all the MySQL libraries installed and when I search for the mysql.h file, it is displayed!
What am I doing wrong?