I tried to install SFML with the help of this tutorial because I couldn't find a way to install it myself. After I did CTRL + B and Run build & debug I got this error:
⬤ Build & Run: Debug (target: sfml-vscode-boilerplate.exe)
src/PCH.hpp
In file included from src/PCH.hpp:66:0:
src/Utility/FileSystem.hpp:8:36: fatal error: experimental/filesystem: No such file or directory
#include <experimental/filesystem>
^
compilation terminated.
Makefile:313: recipe for target 'bin/Debug/obj/PCH.hpp.gch' failed
mingw32-make[1]: *** [bin/Debug/obj/PCH.hpp.gch] Error 1
Makefile:262: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
✘ Failed!
Review the compile errors above.
I'm using Windows 10, g++ version 6.3.0, SFML version 2.5.1, Visual Studo Code
Okay it was just bad version of GCC and G++
Related
I am trying to compile a code that uses openssl libraries. however, if I compile with -m32 flag, I get the following error:
make > make.txt
In file included from /usr/include/openssl/e_os2.h:56:0,
from /usr/include/openssl/bio.h:62,
from /home/dolf/gsoap-linux-2.7.17/stdsoap2.h:665,
from obj/../otamStub.h:13,
from obj/../otamH.h:10,
from obj/../otamC.cpp:13:
/usr/include/openssl/opensslconf.h:13:30: fatal error: opensslconf-i386.h: No such file or directory
#include "opensslconf-i386.h"
^
compilation terminated.
make[1]: *** [obj/otamC.o] Error 1
make: *** [all] Error 2
I have CentOS version 7.9.2009
I have installed openssl-devel, openssl, openssl-libs, openssl-devel-1.0.2k-25.el7_9.x86_64
those packages should installed the header file I am missing.
any clue on how to fix such issue?
thanks,
Dolf
I am trying to create a new project from Windows 10/11 in Omnet++ 5.7 referenced to inet (Right Clicked on First Project - > Properties - > Project References - > Marked Inet) but it fails because it can't find the inet's classes.
I tried to recompile everything (including inet after adding my .cc files), but nothing seems to work.
That's a sample of how I included the files in my .cc classes:
#include "inet/common/INETDefs.h"
#include "inet/common/geometry/common/Coord.h"
#include "inet/common/packet/Packet.h"
This is my error:
23:26:01 **** Incremental Build of configuration release for project project ****
make MODE=release all
cd src && /usr/bin/make
make[1]: Entering directory '/c/Users/cyb/Desktop/omnetpp-5.7/samples/project/src'
gpsr/Gpsr.cc
In file included from gpsr/Gpsr.cc:22:
gpsr/Gpsr.h:23:10: fatal error: 'inet/common/INETDefs.h' file not found
#include "inet/common/INETDefs.h"
^~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [Makefile:112: ../out/clang-release/src/gpsr/Gpsr.o] Error 1
make[1]: Leaving directory '/c/Users/cyb/Desktop/omnetpp-5.7/samples/project/src'
make: *** [Makefile:2: all] Error 2
"make MODE=release all" terminated with exit code 2. Build might be incomplete.
23:26:04 Build Failed. 3 errors, 0 warnings. (took 2s.194ms)
I've already tried to recreate a new "makemake" file, but still this error occurs.
I also tried the suggestions I found here Omnet++ inet::EtherAppCli not found and here Omnet++ fatal error: 'inet/common/INETDefs.h' file not found . Same error occurs when I create a new project from 0 or even if I use a different version of Omnet++/Inet (I tried omnet 4,5 and 6) or O.S (such as Windows or Linux). Anyone could help me?
I've been trying to install opencv, using this referance. But when I try to run make command, I get error as follows:
/opt/opencv/modules/videoio/src/cap_dc1394_v2.cpp:59:10: fatal error:
dc1394/dc1394.h: No such file or directory
#include <dc1394/dc1394.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:278: recipe for
target 'modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o'
failed
make[2]: ***
[modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_dc1394_v2.cpp.o] Error
1
CMakeFiles/Makefile2:6307: recipe for target
'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
I tried so many times to install opencv, when the installation is completed, I tried to check the installation, and then I get error that there is no module named opencv.
I recommend to use this guide to download the OpenCV Libary to the linux. (ubuntu 18.04).
I did it today on my ubuntu 18.04 and it worked perfectly, but please read all the guide and don't just copy the terminal commands.
Edit: not solved, but as I moved on to other software, I ran into other challenges.
For a research project, I downloaded a Github project (Tagliasacchi et al., 2015) for computer vision to Linux 16.04. I have programming experience with PHP but I am new to C++. When I try to replicate the results of the study on my computer, I run early into a compiling error.
The Hello world-example of the Github project (apps » helloworld) works fine.
When trying to compile another application, I run into an error with the Makefile: cmake . works fine and some files are created. However, make does not work.
After the error, g++ [filename].cpp -o main obviously does not work.
How to solve this and get the dependencies right?
In some cases, there is a Makefile, but I run into an error:
[ 33%] Building CXX object CMakeFiles/helloworld_atb.dir/main.cpp.o
/bin/sh: 1: /usr/bin/g++-4.8: not found
CMakeFiles/helloworld_atb.dir/build.make:62: recipe for target 'CMakeFiles/helloworld_atb.dir/main.cpp.o' failed
make[2]: *** [CMakeFiles/helloworld_atb.dir/main.cpp.o] Error 127
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/helloworld_atb.dir/all' failed
make[1]: *** [CMakeFiles/helloworld_atb.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
In other cases (e.g. in tracker » HandFinder), I can't run either cmake . or make and compiling using g++ HandFinder.cpp -o handfinder does not work:
In file included from HandFinder.cpp:1:0:
HandFinder.h:2:41: fatal error: tracker/ForwardDeclarations.h: No such file or directory
compilation terminated.
In order to use OpenCV in Qt, I have to compile it with MinGW by cmake.
Software are the following:
Qt 5.4.0
Opencv 2.4.11
CMake 3.2.2
MinGW version unknown, GCC 4.8.1
A fatal error occurred when I make file and I have no idea how to solve it at all.
[ 29%] Automatic moc for target opencv_highgui
Generating moc_window_QT.cpp
Exit code 0xc000007b
AUTOGEN: error: process for C:/opencvbuild/modules/highgui/moc_window_QT.cpp failed:
Exit code 0xc000007b
moc failed...
modules\highgui\CMakeFiles\opencv_highgui_automoc.dir\build.make:48: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui_automoc' failed
mingw32-make[2]: *** [modules/highgui/CMakeFiles/opencv_highgui_automoc] Error 1
CMakeFiles\Makefile2:2066: recipe for target 'modules/highgui/CMakeFiles/opencv_highgui_automoc.dir/all' failed
mingw32-make[1]: *** [modules/highgui/CMakeFiles/opencv_highgui_automoc.dir/all] Error 2
Makefile:145: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
These messages are shown in cmd.
Then I revised CMakeLists.txt, SET(CMAKE_AUTOMOC OFF)
modules\highgui\CMakeFiles\opencv_highgui_automoc.dir\build.make:64: recipe for target 'modules/highgui/qrc_window_QT.cpp' failed
Does anybody know a solution?
2 items to try.
Try running make with VERBOSE=1 to increase the output on the makefile. That should give you a better idea of what is wrong.
Try running with cmake-gui, then turn on advanced mode to check out what CMake found for the different Qt5 dependencies. On Mac, I install the latest Qt to my home directory, causing me to have to manually set variables. This is what it looks like for me.
Hopefully this provides some useful information.