Omnet++ fatal error: 'inet/.../something.h' file not found - c++

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?

Related

C++ SFML src/Utility/FileSystem.hpp:8:36: fatal error

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++

How to fix 'cannot find -lgmp' build error on OMNeT++?

I have become aware that OverSim can be used with the newer versions of OMNeT++. I installed OMNeT++ 5.6.1 on Windows 10 by following the instructions in InstallGuide. Then, I imported INET 3.6.5 in OMNeT++ and built it, there were no errors. Finally, I imported OverSim-20190424 and when I build it I get the following error at the end of the build process:
make[1]: Entering directory '/c/omnet561/oversim-20190424/src'
Creating executable: ../out/gcc-debug/src/OverSim_dbg.exe
C:/omnet561/omnetpp-5.6.1/tools/win64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/7.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lgmp
collect2.exe: error: ld returned 1 exit status
make[1]: *** [Makefile:418: ../out/gcc-debug/src/OverSim_dbg.exe] Error 1
make[1]: Leaving directory '/c/omnet561/oversim-20190424/src'
make: *** [Makefile:11: all] Error 2
"make MODE=debug -j8 all" terminated with exit code 2. Build might be incomplete.
12:15:59 Build Failed. 3 errors, 0 warnings. (took 12s.448ms)
The other two errors are:
Description Resource Path Location Type
make: *** [Makefile:11: all] Error 2 OverSim C/C++ Problem
make[1]: *** [Makefile:418: ../out/clang-debug/src/OverSim_dbg.exe] Error 1 OverSim C/C++ Problem
Does anyone know how this error can be fixed? I have tried using OverSim on Windows 7 as well and tried using OMNeT++ 5.4.1 but the same error is still produced.
The libgmp libraries (libgmp-10.dll and libgmpxx-4.dll) are in the directory "C:/omnet561/omnetpp-5.6.1/tools/win64/mingw64/bin". I think the problem here might be that the software is using the wrong directory to search for the libraries but I'm not sure how to fix such an issue.
Try to add path to libgmp libraries using Makefrag.
Go to OverSim-20190424 Project Properties, choose OMNeT++ | Makemake | select src | Options | Custom | Makefrag and write:
LIBS += -L/c/libraries/libgmp
It is assumed that libgmp libraries (*.dll or *.a) are in C:\libraries\libgmp.
EDIT
Open Makefrag from oversim-20190424\src\ in a text editor, and then change LIBS and OMNETPP_LIBS to proper values:
LIBS += -L/sw/lib -L/c/omnet561/omnetpp-5.6.1/tools/win64/mingw64/bin
OMNETPP_LIBS += -lgmp
or
OMNETPP_LIBS += -lgmp-10
For anyone who encounters the same problem, I managed to solve it by using OMNeT++ 5.6.1 and Oversim 20190424 on Ubuntu 18.04. When I built Oversim, I got an error "Could not find gmp.h", to solve that error I installed libgmp3-dev - apt-get install libgmp3-dev. If somebody manages to get it to work on Windows 10 or has an idea of how it can be fixed, then please feel free to post.

certain headers arent being found, even though I've included them. Aside from using quotes, how can I fix this?

Ive downloaded the SDL2 library using brew install SDL2 but when I am trying to compile melonDS for Mac, I keep banging my head against the wall of the annoying error of
bash-3.2$ make
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/bigman/melonDS/build
[ 1%] Building CXX object CMakeFiles/melonDS.dir/src/libui_sdl/main.cpp.o
/Users/bigman/melonDS/src/libui_sdl/main.cpp:24:10: fatal error:
'SDL2/SDL.h' file not found
#include <SDL2/SDL.h>
^~~~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/melonDS.dir/src/libui_sdl/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/melonDS.dir/all] Error 2
make: *** [all] Error 2
bash-3.2$
I've uninstalled, reinstalled, tried to use compiler flags in the makefile (which did't work because the project uses cmake) but to no avail. Any other reccomendations would be great.

Unable to Compile KAA C++ SDK

While compiling C++ SDK I am getting the following error
**
ERROR LOGS
**
fatal error: kaa/gen/EndpointGen.hpp: No such file or directory
[ 1%] Building CXX object kaa/CMakeFiles/kaacpp.dir/impl/event/registration/EndpointRegistrationManager.cpp.o
In file included from /home/vidhi/Projects/Kaa/kaaCppApp/kaa/kaa/channel/ITransportConnectionInfo.hpp:25:0,
from /home/vidhi/Projects/Kaa/kaaCppApp/kaa/kaa/KaaDefaults.hpp:28,
from /home/vidhi/Projects/Kaa/kaaCppApp/kaa/kaa/event/registration/EndpointRegistrationManager.hpp:20,
from /home/vidhi/Projects/Kaa/kaaCppApp/kaa/impl/event/registration/EndpointRegistrationManager.cpp:17:
/home/vidhi/Projects/Kaa/kaaCppApp/kaa/kaa/channel/TransportProtocolId.hpp:22:35: fatal error: kaa/gen/EndpointGen.hpp: No such file or directory
#include "kaa/gen/EndpointGen.hpp"
^
compilation terminated.
make[2]: * [kaa/CMakeFiles/kaacpp.dir/impl/event/registration/EndpointRegistrationManager.cpp.o] Error 1
make[1]: * [kaa/CMakeFiles/kaacpp.dir/all] Error 2
make: *** [all] Error 2
Manually I place EndpointGen.hpp file but again while compiling it's giving the same error for different file. Later I found files inside kaa/CMakeFiles/kaacpp.dir/impl/ were missing.
Could anyone please help me to resolve this issue?
This issue was resolved in v2.0.0 by adding compile-client-cpp option to the maven goals when compiling Kaa.
See the reference for this.

Error building llvm 3.0

I was trying to get llvm 3.0 on my machine, but I get the following errors when I give make -k.
chethan#ubuntu:~/llvm-3.0$ make
make[1]: Entering directory `/home/chethan/llvm-3.0/lib/Support'
llvm[1]: Compiling APFloat.cpp for Release build
In file included from APFloat.cpp:15:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/APFloat.h:104:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/APInt.h:18:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/ArrayRef.h:13:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/SmallVector.h:17:
/home/chethan/llvm-3.0/include/llvm/Support/type_traits.h:20:10: fatal error: 'utility' file not found
#include <utility>
^
1 error generated.
make[1]: *** [/home/chethan/llvm-3.0/lib/Support/Release/APFloat.o] Error 1
make[1]: Leaving directory `/home/chethan/llvm-3.0/lib/Support'
make: *** [all] Error 1
I follow these steps to build llvm on my machine.
Get the llvm source zip file from llvm download page and unzipped to folder llvm-3.0
cd /home/chethan/llvm-3.0
./configure
make -k
Although in this case, I just gave 'make' so that it stops on first error. I have llvm-gcc 4.2 installed on my machine.
I followed the same steps today morning in my home machine, and llvm-3.0 built successfully! Any idea what might be missing here?
configure with CC=gcc CXX=g++. It looks like the configure script is finding a version of clang that isn't actually set up correctly to compile C++ code.