SystemC 验证构建错误 'undefined reference to..'

SystemC Verification building error 'undefined reference to..'

我无法构建任何包含 SCV 函数用法的代码。我正在使用 Eclipse 和 Cygwin。 这是我正在尝试构建的简单代码 运行:

#include <scv.h>

int sc_main (int argc, char* argv[]) {
// Int data type
int data = 100;
// Get the bitwidth of the data
int bitwidth = scv_get_extensions(data).get_bitwidth();
cout << "Width of data is "<< bitwidth << endl;
cout << "Value in data is ";
// Get the value in data and print to stdio
scv_get_extensions(data).print();
return 0;
}

但它有很多错误,大部分都是重复出现的。 这是其中的第一对:

Building target: proba.exe
Invoking: Cygwin C++ Linker
g++ -L"C:/systemc-2.3.1/lib-cygwin" -o "proba.exe"  ./apb_transaction.o   -lsystemc -lscv
C:/systemc-2.3.1/lib-cygwin/libscv.a(libscv_la-scv_introspection.o): In function `_scv_extension_rw_sc_signed::write(sc_dt::sc_signed const&)':
/cygdrive/c/scv-2.0.0/objdir/src/scv/../../../src/scv/scv_introspection.cpp:1090: undefined reference to `sc_dt::sc_signed::operator=(sc_dt::sc_signed const&)'
/cygdrive/c/scv-2.0.0/objdir/src/scv/../../../src/scv/scv_introspection.cpp:1090:(.text+0xee54): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sc_dt::sc_signed::operator=(sc_dt::sc_signed const&)'
C:/systemc-2.3.1/lib-cygwin/libscv.a(libscv_la-scv_introspection.o): In function `_scv_extension_rw_sc_signed::assign(long)':
/cygdrive/c/scv-2.0.0/objdir/src/scv/../../../src/scv/scv_introspection.cpp:1090: undefined reference to `sc_dt::sc_signed::operator=(long)'
/cygdrive/c/scv-2.0.0/objdir/src/scv/../../../src/scv/scv_introspection.cpp:1090:(.text+0xf04e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sc_dt::sc_signed::operator=(long)'
C:/systemc-2.3.1/lib-cygwin/libscv.a(libscv_la-scv_introspection.o): In function `_scv_extension_rw_sc_signed::assign(unsigned long)':
/cygdrive/c/scv-2.0.0/objdir/src/scv/../../../src/scv/scv_introspection.cpp:1090: undefined reference to `sc_dt::sc_signed::operator=(unsigned long)'
/cygdrive/c/scv-2.0.0/objdir/src/scv/../../../src/scv/scv_introspection.cpp:1090:(.text+0xf08a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `sc_dt::sc_signed::operator=(unsigned long)'

我找到答案了! Here 是它的 link,如果有人需要的话! 只是需要更改添加 scv 和 systemc 库的顺序。