[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 ...
随机推荐
- Js 职责链模式 简单理解
js 职责链模式 的简单理解.大叔的代码太高深了,不好理解. function Handler(s) { this.successor = s || null; this.handle = funct ...
- CocosCreator反射在Android中的使用
CocosCreator反射在Android中的使用 新建一个CocosCreator项目,然后点击构建 构建完成之后,即可用AndroidStudio打开构建的项目 使用AndroidStudio打 ...
- iOS架构基础
1.概念:架构其实是一个设计上的东西,它可以小到类类之间的交互,可以大到不痛的模块之间,可以说不痛的业务部门之间的交互都可以从架构的层面去理解它. 2.解耦 方法一:代理 方法二:通知
- cookie处理
有时候我们需要验证浏览器中是否存在某个cookie,因为基于真实的cookie 的测试是无法通过白盒和集成测试完成的.webdriver 可以读取.添加和删除cookie信息. webdriver 操 ...
- Tomcat8安装, 安全配置与性能优化
一.Tomcat 安装 官网:http://tomcat.apache.org/ Tomcat8官网下载地址:http://tomcat.apache.org/download-80.cgi 为了便于 ...
- Huffman编码
#define _CRT_SECURE_NO_WARNINGS #include <iostream> #include <cstdio> #include <cstri ...
- JS之模块模式应用
之前做过一些简单的单页面应用项目,是对模块模式很好的应用,我决定动手做一个简单的Demo出来. 基本思想是设计一个加载器,当用户点击菜单时,获取不同选项的按钮id,根据不同id实现对页面内容的替换. ...
- HTTP 错误 403.14–Forbidden错误解决
运行环境:开发环境:Windows7旗舰版64bit.VisualStudio2008 With SP1.ArcEngine10.0.NetFrameWork4.0.IIS7和C#开发语言. 问题描述 ...
- Create side-by-side stereo pairs in the Unity game engine
Create side-by-side stereo pairs in the Unity game engine Paul BourkeDecember 2008 Sample Island pro ...
- SVN 集中式版本控制软件
简介: 目前流行的版本控制软件中,SVN ( 集中式版本控制 ) 算是使用范围更广.且使用时间更早的一款了,现在 git ( 分布式版本控制 ) 更火爆一点. 一.安装svn [root@localh ...