[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 ...
随机推荐
- 我的VPN推荐经历
先说说我为什么会走上VPN推荐之路的. 忘记了什么原因需要上某一国外的网站,但是这个网站在国内被禁止访问,于是我想到了VPN,我在网上搜索VPN,找到了几个VPN推荐的博客,然后我根据博客的推荐到了某 ...
- IE6/IE7/IE8兼容H5标签
可以使用html5shiv(html5shiv主要解决HTML5提出的新元素不被IE6-8识别,这些新元素不能作为父节点包裹子元素,并且不能应用CSS样式)来解决 <!--[if lt IE 9 ...
- code project 上的内存管理的示例代码
/******************************************************************** created: 2014/03/17 18:53 file ...
- 【译】RabbitMQ:远程过程调用(RPC)
在教程二中,我们学习了如何使用工作队列在多个工作线程中分发耗时的任务.但如果我们需要去执行远程机器上的方法并且等待结果会怎么样呢?那又是另外一回事了.这种模式通常被称为远程过程调用(RPC). 本教程 ...
- iconv将文件编码从gb2312 转换为utf-8
iconv命令用于转换指定文件的编码,默认输出到标准输出设备,亦可指定输出文件. 用法: iconv [选项...] [文件...] 有如下选项可用: 输入/输出格式规范:-f, --from-cod ...
- C# 文件操作 把文件读取到字节数组
string zipfile = "c:\\a.zip"; //方法1 FileStream fs = new FileStream(zipfile, FileMode.Open) ...
- 部署war包后,新增tomcat服务器,启动tomcat服务器报错解决方法
导入Maven工程后,新增tomcat服务器,启动服务器后,报如下错误: 使用http访问页面的时候报如下错误: 经过百度后,有一种方法可以解决: 在eclipse tomcat无法启动,无法访问to ...
- 基类用的this指针
结论:基类构造函数中的this指针指向的是派生类的对象 测试代码: #include <iostream> using namespace std; class father; fathe ...
- OpenSSL Heartbleed原因小结
User发送心跳报文给Server,Server复制心跳报文的内容回应User. memcpy(bp, p1, payload); Server拷贝心跳报文的内容给Client时,如果拷贝的字节数目超 ...
- sqlite本地保存数据
package com.cesecsh.ics.database; import android.content.Context; import android.database.Cursor; im ...