如何在终端Mac OS X中使用和安装SystemC? [英] how to use and install SystemC in terminal mac OS X?

查看:247
本文介绍了如何在终端Mac OS X中使用和安装SystemC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在终端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.

请注意,我使用的是gcc-8,它安装有自制软件.

$ 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

在macOS 10.13.6上测试; gcc版本8.2.0; systemc-2.3.3

Tested on macOS 10.13.6; gcc version 8.2.0; systemc-2.3.3

这篇关于如何在终端Mac OS X中使用和安装SystemC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆