[SystemC] Setting Up the Environment
My operating system is Ubuntu 12.04.
0. Checking Your Compilers
First thing first, you will need the tools beforing making stuffs.
- Type "g++ --version" to check if you have g++, if not use "sudo apt-get install g++" to install it first. (Fedora users can use command "yum")
- Type "make --version" to check if you have GNU make, otherwise you know what to do...
1. Downloading SystemC
The first step is to download the source package of SystemC. The official download page is http://www.accellera.org/downloads/standards/systemc. You need to register with your email for accepting the licenses. Currently the newest and stable version of SystemC is 2.3.0.
2. Making SystemC Library Step-by-step
The downloaded tar file are for example located here: ~/Downloads/
cd ~/Downloads/
tar zxvf systemc-2.3..tar
cd systemc-2.3.
mkdir objdir
cd objdir
sudo mkdir /usr/local/systemc/
sudo ../configure --prefix=/usr/local/systemc/
sudo make
sudo make install
Here "sudo" is kind of important if you are not root.
3. Compling SystemC Files
Suppose you have already have your SystemC example files here: ~/hello_word/, with file hello.h, and main.cpp.
To compile your SystemC files, use
g++ main.cpp -I$SYSTEMC_HOME/include -L$SYSTEMC_HOME/lib-linux64 -o hello -lsystemc
Of coursee you need to set the environment variable SYSTEMC_HOME first:
export SYSTEMC_HOME=/usr/local/systemc/
or anywhere you actually built it.
In this way your code will be compiled successfully.
4. Running the Executable
The title looks stupid but I still think it is necessary to address it here. Your compilation will be successful but you might face an error when you are trying to run the executable, for example:
./hello: error while loading shared libraries: libsystemc-2.3..so: cannot open shared object file: No such file or directory
In this case, you need to set LD_LIBRARY_PATH:
export LD_LIBRARY_PATH=/usr/local/systemc/lib-linux
For 64-bit system users, you may set the variable value to:
export LD_LIBRARY_PATH=/usr/local/systemc/lib-linux64
In my case I need to set it to the latter one (To be frank I didn't set it right at the first time). If you are not sure which one you need to set, simply go to that folder, to see you have "lib-linux" or "lib-linux64".
At this stage, you may run your executables without errors.
[SystemC] Setting Up the Environment的更多相关文章
- Building and setting up QT environment for BeagleBone
There are too few information available on how to easily setup QT environment for building Beaglebon ...
- Storm(1) - Setting Up Development Environment
Setting up your development environment 1. download j2se 6 SDK from http://www.oracle.com/technetwor ...
- 使用SystemC进行硬件仿真
使用SystemC进行硬件仿真 环境 linux-x86-64 bash g++ 下载解压SystemC SystemC下载地址 解压下载的包 tar zxvf systemc-2.3.3.tar.g ...
- Setting the Java Class Path
The class path is the path taht Java Runtime Environment(JRE) searches for classes and other resourc ...
- svn: None of the environment variables SVN_EDITOR...问题解决
转:http://blog.163.com/lgh_2002/blog/static/44017526201046111856208/ 问题1: svn: Could not use external ...
- Setting an appropriate geodatabase spatial domain
原文地址:http://webhelp.esri.com/arcgisdesktop/9.1/body.cfm?tocVisable=1&ID=1470&TopicName=Setti ...
- pt-heartbeat
pt-heartbeat是用来监测主从延迟的情况的,众所周知,传统的通过show slave status\G命令中的Seconds_Behind_Master值来判断主从延迟并不靠谱. pt-hea ...
- 『.NET Core CLI工具文档』(二).NET Core 工具遥测(应用信息收集)
说明:本文是个人翻译文章,由于个人水平有限,有不对的地方请大家帮忙更正. 原文:.NET Core Tools Telemetry 翻译:.NET Core 工具遥测(应用信息收集) .NET Cor ...
- 安装jhipster
基础软件安装 安装JDK,需要配置环境变量.暂时使用1.8版本 安装maven,需要配置环境变量. http://maven.apache.org/ 安装Node.js ,https://nodej ...
随机推荐
- Camtasia Studio屏幕录像安装与破解
Camtasia Studio汉化版是一款功能强大的屏幕录像工具,能在任何颜色模式下轻松地记录屏幕动作,包括影像.音效.鼠标移动轨迹.解说声音等.Camtasia Studio具有强大的视频播放和视频 ...
- linux下编译bib、tex生成pdf文件
实验: 在linux环境下,编译(英文)*.bib和*.tex文件,生成pdf文件. 环境: fedora 20(uname -a : Linux localhost.localdomain 3.19 ...
- 使用js把json字符串转为js对象的方法
ECMA-262(E3) 中没有将JSON概念写到标准中,还好在 ECMA-262(E5)中JSON的概念被正式引入了,包括全局的JSON对象和Date的toJSON方法. 1,eval方式解析,恐怕 ...
- nignx软件安装与调试
1.通过yum或下载相应软件包安装nginx所需要的辅助软件:pcre.pcre-devel.openssl.openssl-devel.make.gcc.gcc+ 2.解压已经下载好的nginx软件 ...
- 第三章 centos安装git
yum install git 安装后的默认存放地点/usr/bin/git
- ConfigHelper.cs
using System.Configuration; using System.IO; /// <summary> /// 配置文件辅助类 /// </summary> pu ...
- Entity Framework Code First数据库自动更新
EF的Code First方式允许你先写Model,再通过Model生成数据库和表. 具体步骤如下: 1.建项目 2.在model文件夹中,添加一个派生自DbContext的类,和一些Model类. ...
- 如何在string.Format()方法中输出大括号
在string.Format参数中,大括号{}是有特殊意义的符号,但是如果我们希望最终的结果中包含大括号({}),那么我们需要怎么做呢?是”\{”吗?很遗憾,运行时,会给你一个Exception的!正 ...
- Linux 中 Vi 编辑器的简单操作
Linux 中 Vi 编辑器的简单操作 Vi 编辑器一共有3种模式:命名模式(默认),尾行模式,编辑模式.3种模式彼此需要切换. 一.进入 Vi 编辑器的的命令 vi filename //打开或新 ...
- TDDL DataSource
TDDL DataSource 分为 AtomDataSource GroupDatasource 他们两者没有依赖关系, 都实现了 JDBC 规范, 可以作为独立的 datasource 单独使用 ...