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
This article describes the Linux file management ...
1. Introduction to Layer 4 Load Balancing What is...
The arrangement layout of aligning the two ends o...
On a whim, I wrote a case study of a small ball b...
Preface The service has been deployed on MySQL fo...
The following script is used for scheduled backup...
Table of contents 1. Process 2. Core Architecture...
Table of contents 1. Current situation 2. Communi...
Achieve resultsRequirements/Functionality: How to...
How to make tomcat support https access step: (1)...
A singly linked list can only be traversed from t...
Preface In LINUX, periodic tasks are usually hand...
Table of contents Effect display Code Link Key Co...
1. MySql Architecture Before introducing the stor...
Say it in advance We all know that Docker can ach...