简体   繁体   English

Mac上的SystemC在Makefile中出错

[英]SystemC on Mac error with Makefile

I need to start working on a project with SystemC. 我需要开始使用SystemC进行项目。 I managed to compile SystemC according to this instructions: how to use and install SystemC in terminal mac OS X? 我设法按照以下说明编译SystemC: 如何在终端Mac OS X中使用和安装SystemC?

Afterwards I adjusted the SYSTEMC_HOME variable in Makefile.config to "SYSTEMC_HOME?=~/Work/Other/systemc-2.3.1" The problem occurs when i try to compile and run any of the provided examples. 之后,我将Makefile.config中的SYSTEMC_HOME变量调整为"SYSTEMC_HOME?=~/Work/Other/systemc-2.3.1"当我尝试编译并运行提供的任何示例时,就会出现问题。 The error I get is: 我得到的错误是:

ld: unknown option: -rpath=/Users/admin/Work/Other/systemc-2.3.1/lib
clang: error: linker command failed with exit code 1 
(use -void to see invocation)

The command I run is: 我运行的命令是:

make -f Makefile run

And the whole output from the console: 控制台的整个输出:

simple_fifo admin$ make -f Makefile run
clang++ -fcolor-diagnostics  -g -Wall -pedantic -Wno-long-long -Werror -L. -L.. -L /Users/admin/Work/Other/systemc-2.3.1/lib -Wl,-rpath=/Users/admin/Work/Other/systemc-2.3.1/lib -o simple_fifo.x simple_fifo.o -lsystemc -lm  2>&1 | c++filt
ld: unknown option: -rpath=/Users/admin/Work/Other/systemc-2.3.1/lib
clang: error: linker command failed with exit code 1 (use -void to see invocation)
make: *** [simple_fifo.x] Error 1

Any hints on what to look for would be highly appreciated. 任何关于寻找什么的提示将不胜感激。

= is a GNU linker feature, not Clang. =是GNU链接器功能,不是Clang。

Edit examples/sysc/Makefile.rules and replace: 编辑examples/sysc/Makefile.rules并替换为:

LDFLAG_RPATH ?= -Wl,-rpath=

with

LDFLAG_RPATH ?= -Wl,-rpath,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM