简体   繁体   中英

SystemC on Mac error with Makefile

I need to start working on a project with SystemC. I managed to compile SystemC according to this instructions: how to use and install SystemC in terminal mac OS X?

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. 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.

Edit examples/sysc/Makefile.rules and replace:

LDFLAG_RPATH ?= -Wl,-rpath=

with

LDFLAG_RPATH ?= -Wl,-rpath,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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