问题描述
如何在终端Mac OS X中使用和安装 SystemC ?
我尝试了Logic poet应用程序,但是我使用os x 10.10,所以它不起作用.
所以我想知道如何在终端中编译和执行SystemC.
我在终端中找不到SystemC的详细信息.
how to use and install SystemC in terminal mac OS X?
I tried the Logic poet application, But i use os x 10.10 so it doesn't work.
so i want to know how can i compile and execute SystemC in terminal.
I could't find the detail of SystemC in terminal.
谢谢
推荐答案
确保您拥有 xcode命令线工具已安装.
遵循官方存储库中提供的说明.
根据个人经验.
使用clang
编译SystemC库将导致segmentation fault: 11
每当我在代码中包含systemc
库时,都会发生错误.为避免这种情况,请改用gcc
.
Compiling SystemC library with clang
results in segmentation fault: 11
error every time I include systemc
library into my code. To avoid this use gcc
instead.
$ cd path/to/systemc-2.3.3
$ mkdir objdir
$ cd objdir
$ export CXX=g++-8
$ ../configure
$ make
$ make install
使用$ make check
启动示例编译和单元测试.
Use $ make check
to launch examples compilation and unit tests.
要编译并运行 hello world示例:
$ export SYSTEMC_HOME=path/to/systemc-2.3.3
$ g++-8 hello.cpp -o hello.o -L $SYSTEMC_HOME/lib-macosx64 -I $SYSTEMC_HOME/include/ -l systemc
$ ./hello.o
这篇关于如何在终端Mac OS X中使用和安装SystemC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!