[英]UVM-SystemC Mac Compiler Linker Error
I'm trying to manually compile some UVM examples using clang++. 我正在尝试使用clang ++手动编译一些UVM示例。 UVM-SystemC-1.0 was installed successfully (it apparently also ran these examples as tests).
UVM-SystemC-1.0已成功安装(显然,它们还运行了这些示例作为测试)。 However when I compile these examples using the command
但是,当我使用命令编译这些示例时
clang++ -I/Users/ahmadmas/Downloads/systemc-2.3.1/include -I/Users/ahmadmas/Downloads/uvm-systemc-1.0-alpha1/include -L/Users/ahmadmas/Downloads/systemc-2.3.1/lib-macosx64 -lsystemc -L/Users/ahmadmas/Downloads/uvm-systemc-1.0-alpha1/lib-macosx64 -uvm hello_world.cpp
I get the following error: 我收到以下错误:
(Huge amount of text)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Any ideas what I might be doing wrong? 有什么想法我可能做错了吗?
Thanks 谢谢
This is just a comment , as i don't have permission to add comments :( adding it as a answer 这只是一条评论,因为我无权添加评论:(将其添加为答案
-l links the library file - lib. -l链接库文件-lib。 from the paths specified in -L option.
从-L选项中指定的路径。 The lib file for uvm in lib-macosx64 is libuvm-systemc.dylib => the linker option will be -luvm-systemc
lib-macosx64中uvm的lib文件是libuvm-systemc.dylib =>链接器选项将是-luvm-systemc
Actually I resolved the issue myself. 其实我自己解决了这个问题。
Everything in the above compilation command is correct, except for the linker. 上面的编译命令中的所有内容(链接器除外)都是正确的。
In systemC, the linker flag is -lsystemc
, which would correspond to uvm having -luvm
or -uvm
. 在systemC中,链接器标志是
-lsystemc
,它对应于具有-luvm
或-uvm
。 However, it is -luvm-systemc
(which creates a bit of a misunderstanding as one has to link systemc twice for uvm to work). 但是,它是
-luvm-systemc
(这会产生一些误解,因为必须将systemc链接两次才能使uvm正常工作)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.