Jump to content
tiva

fatal error: systemc.h: No such file or directory #include <systemc.h>

Recommended Posts

n order to run Network on chip simulator form Github called "noxim" , I am getting a fatal error in the last step (build noxim) when I am trying to type "make"  concerning Systemc.h and sincerely don't fully understand:

saliha@ubuntu:~/Downloads/noxim-master/bin$ make
g++ -O3 -Wall -DSC_NO_WRITE_CHECK --std=c++11   -I../src -isystem libs/systemc-2.3.1a/include -Ilibs/yaml-cpp/include -c ../src/Stats.cpp -o  build/Stats.o
In file included from ../src/Stats.h:17:0,
             from ../src/Stats.cpp:11:
../src/DataStructs.h:14:21: fatal error: systemc.h: No such file or directory
 #include <systemc.h>
                 ^
compilation terminated.
Makefile:43: recipe for target 'build/Stats.o' failed
make: *** [build/Stats.o] Error 1

I have respected all the steps in INSTALL.txt including C++ compiler installation, YAML installation, SystemC installation until Build noxim.

The only difference between noxim guide prerequisites and what I found is the SystemC version "systemc 2.3.1(including in INSTALL.txt) and systemc 2.3.1a (what i found)".

Share this post


Link to post
Share on other sites

Hi.

Using -isystem is OK to specify includes. But the path you give it should point to your SystemC installation.

Are the SystemC header files in the idrectory you specified?

libs/systemc-2.3.1a/include

This is  alocal  path relative to the location where you do the compiler call.

Greetings

Ralph

Share this post


Link to post
Share on other sites

g++ -O3 -I. -I.. -I../src -I/usr/home/Desktop/AccessNoxim_v0.3/bin/systemc/include -c ../src/NoximNoC.cpp
In file included from ../src/NoximNoC.cpp:10:0:
../src/NoximNoC.h:10:10: fatal error: systemc.h: No such file or directory
 #include <systemc.h>
          ^~~~~~~~~~~
compilation terminated.
Makefile.defs:26: recipe for target 'NoximNoC.o' failed
make: *** [NoximNoC.o] Error 1

 

Share this post


Link to post
Share on other sites

Based on the question, it seems to me that you need to take a class in C++.

Anyhow, of course you cannot execute an object file. You need a fully linked executable. Files ending in .o are not executable because they do not contain fully resolved code. Linking is part of the process of compilation. If your code compiled, I expect there is another file either with no extension or perhaps with .x or .exe. In any event, you definitely should not ever have to add the execute privilege (chmod +x). In fact, that was a bold and dangerous move on your part.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×