The following is the configuration method under centos7Download the systemc source package: SystemC (accellera.org) Place the compressed package in the user directory and decompress it tar -zxvf systemc-2.3.3.tar.gz Enter the systemc-2.3.3 folder cd systemc-2.3.3 Create a new temporary folder tmp and enter it mkdir tmpcd tmp Run the following command ../configure make make install At this point, two folders, include and lib-linux64, are generated in the folder Setting Environment Variables export LD_LIBRARY_PATH=home/centos7/systemc-2.3.3/lib-linux64 ///home/cnetos7/ is the path for decompressing the files. You can determine the path based on your needs. Executing this command is only available at the moment and will become invalid after a reboot. If you need to use it for a long time, it is recommended to add this command to the .bashrc file in the user directory and execute the following command to make it effective after the terminal is restarted. source .bashrc Run a systemc program for testing. test.cpp //all systemc modules should include systemc.h header file #include "systemc.h" //hello_world is module name SC_MODULE(hello_world){ SC_CTOR(hello_world){ //nothing in constructor } void say_hello(){ //Print "Hello world!!!" to the console. cout<<"Hello World!!!"<<endl; } }; //Don't forget the semicolon here //sc_main in top level function like in C++ main int sc_main(int argc, char* argv[]){ hello_world hello("HELLO"); return 0; } Compile and run g++ test.cpp -I/home/cp/Simulator/systemc/include -L/home/cp/Simulator/systemc/lib-linux64 -o test -lsystemc ./test The screen will display Makefile LIBDIR=-L/home/cp/Simulator/systemc/lib-linux64 INCDIR=-I/home/cp/Simulator/systemc/include LIB=-lsystemc all: g++ -o test test.cpp $(LIBDIR) $(INCDIR) $(LIB) clean: rm -rf *.o This is the end of this article about SystemC environment configuration method under Linux system. For more relevant content about SystemC environment of Linux system, please search previous articles of 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Examples of clearfix and clear
>>: MySQL partition table is classified by month
Ubuntu 16.04 installs the PHP7.0 environment by d...
Table of contents 1 Install Docker 2 Configuring ...
1. Introduction This article will show you how to...
Table of contents 1. Customize the search bar con...
answer from stackflow: Simply <br> is suffic...
binlog is a binary log file that records all DML ...
Table of contents Multi-application deployment 1-...
Preface Vue provides a wealth of built-in directi...
Table of contents 1. Introduction 2. Main text 2....
1. Introduction Recently, I helped a friend to ma...
Without further ado, I will post the code for you...
1. Introduction to Macvlan Before the emergence o...
CSS has two pseudo-classes that are not commonly ...
This article example shares the implementation me...
1. Virtual environment virtualenv installation 1....