2016-09-21 3 views
0

SCV関数の使用方法を含むコードを作成できないという問題があります。私はEclipseとCygwinを使用しています。 これは私がビルドして実行しようとしています簡単なコードです:SystemC検証ビルドエラー 'undefined reference to ..'

#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)' 

答えて

0

私は答えを見つけました!もし誰かがそれを必要とするなら、Hereはそれへのリンクです! scvとsystemcライブラリの追加順序を変更するだけです。

関連する問題