Jump to content

pmeyeratdatest

Members
  • Content Count

    5
  • Joined

  • Last visited

  1. Hi: The .configure files between systemC and scv behave very differently. To get this to work, I had to do the following: export CXX='g++ -std=c++11' export CC='gcc -std=c++11' ./configure --libexecdir ${rootPath}/lib --with-systemc=${rootPath}/build/systemc-2.3.3
  2. What I am wondering is: Have I correctly built the respective systemC (2.3.2) and SCV (2.0.1) libraries? (i.e. inclusion of std=c++11, optimizations, etc.) Are there other compiler options I should be running with when building main and linking? (-fPIC ???, etc). Peter
  3. Results with shared object files only: g++-4.8 -g -Wall -ggdb -std=c++11 -O0 -D GCC48 -Wall ./main.o -o testCMD -L../build/systemc-2.3.2/lib-linux64 ../../CPP-NumericalMethods/libNumericalMethods.a -lscv -lsystemc -lpthread -lm ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x50): undefined reference to `_scv_extension_util::get_short_name() const' ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x78): undefined reference to `_scv_extension_type_int::get_enum_details(std::list<char const*, std::allocator<char const*> >&, std::list<int, std::allocator<int> >&) const' ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x148): undefined reference to `_scv_extension_rw_int::assign(std::string const&)' ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x178): undefined reference to `_scv_extension_rw_int::get_string() const' ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x248): undefined reference to `_scv_extension_util::_set_name(std::string const&)' ./main.o:(.rodata._ZTV19scv_extensions_baseIiE[_ZTV19scv_extensions_baseIiE]+0x50): undefined reference to `_scv_extension_util::get_short_name() const' ./main.o:(.rodata._ZTV19scv_extensions_baseIiE[_ZTV19scv_extensions_baseIiE]+0x78): undefined reference to `_scv_extension_type_int::get_enum_details(std::list<char const*, std::allocator<char const*> >&, std::list<int, std::allocator<int> >&) const' ./main.o:(.rodata._ZTV19scv_extensions_baseIiE[_ZTV19scv_extensions_baseIiE]+0x148): undefined reference to `_scv_extension_rw_int::assign(std::string const&)' ./main.o:(.rodata._ZTV19scv_extensions_baseIiE[_ZTV19scv_extensions_baseIiE]+0x178): undefined reference to `_scv_extension_rw_int::get_string() const' ./main.o:(.rodata._ZTV19scv_extensions_baseIiE[_ZTV19scv_extensions_baseIiE]+0x248): undefined reference to `_scv_extension_util::_set_name(std::string const&)' ./main.o:(.rodata._ZTV23scv_extension_callbacksIiE[_ZTV23scv_extension_callbacksIiE]+0x50): undefined reference to `_scv_extension_util::get_short_name() const' ./main.o:(.rodata._ZTV23scv_extension_callbacksIiE[_ZTV23scv_extension_callbacksIiE]+0x78): undefined reference to `_scv_extension_type_int::get_enum_details(std::list<char const*, std::allocator<char const*> >&, std::list<int, std::allocator<int> >&) const' ./main.o:(.rodata._ZTV23scv_extension_callbacksIiE[_ZTV23scv_extension_callbacksIiE]+0x148): undefined reference to `_scv_extension_rw_int::assign(std::string const&)' ./main.o:(.rodata._ZTV23scv_extension_callbacksIiE[_ZTV23scv_extension_callbacksIiE]+0x178): undefined reference to `_scv_extension_rw_int::get_string() const' ./main.o:(.rodata._ZTV23scv_extension_callbacksIiE[_ZTV23scv_extension_callbacksIiE]+0x248): undefined reference to `_scv_extension_util::_set_name(std::string const&)' ../build/systemc-2.3.2/lib-linux64/libscv.so: undefined reference to `sc_core::sc_api_version_2_3_2_cxx199711L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx199711L(sc_core::sc_writer_policy)'
  4. I can get the same errors if I only run with the shared objects. I have tried creating a static library only with the .a files, but this introduces more linking errors. ../build/systemc-2.3.2/lib-linux64/libscv.a(libscv_la-scv_constraint.o): In function `__static_initialization_and_destruction_0': /home/pmeyer/WORK/DA-Test/SW/SystemC/build/systemc-2.3.2/include/sysc/kernel/sc_ver.h:179: undefined reference to `sc_core::sc_api_version_2_3_2_cxx199711L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx199711L(sc_core::sc_writer_policy)' ../build/systemc-2.3.2/lib-linux64/libscv.a(libscv_la-scv_constraint_range.o): In function `__static_initialization_and_destruction_0': /home/pmeyer/WORK/DA-Test/SW/SystemC/build/systemc-2.3.2/include/sysc/kernel/sc_ver.h:179: undefined reference to `sc_core::sc_api_version_2_3_2_cxx199711L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx199711L(sc_core::sc_writer_policy)' ../build/systemc-2.3.2/lib-linux64/libscv.a(libscv_la-scv_debug.o): In function `__static_initialization_and_destruction_0': /home/pmeyer/WORK/DA-Test/SW/SystemC/build/systemc-2.3.2/include/sysc/kernel/sc_ver.h:179: undefined reference to `sc_core::sc_api_version_2_3_2_cxx199711L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx199711L(sc_core::sc_writer_policy)' ../build/systemc-2.3.2/lib-linux64/libscv.a(libscv_la-scv_expression.o): In function `__static_initialization_and_destruction_0': /home/pmeyer/WORK/DA-Test/SW/SystemC/build/systemc-2.3.2/include/sysc/kernel/sc_ver.h:179: undefined reference to `sc_core::sc_api_version_2_3_2_cxx199711L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx199711L(sc_core::sc_writer_policy)' ../build/systemc-2.3.2/lib-linux64/libscv.a(libscv_la-scv_introspection.o): In function `__static_initialization_and_destruction_0': /home/pmeyer/WORK/DA-Test/SW/SystemC/build/systemc-2.3.2/include/sysc/kernel/sc_ver.h:179: undefined reference to `sc_core::sc_api_version_2_3_2_cxx199711L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx199711L(sc_core::sc_writer_policy)' ../build/systemc-2.3.2/lib-linux64/libscv.a(libscv_la-scv_random.o):/home/pmeyer/WORK/DA-Test/SW/SystemC/build/systemc-2.3.2/include/sysc/kernel/sc_ver.h:179: more undefined references to `sc_core::sc_api_version_2_3_2_cxx199711L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx199711L(sc_core::sc_writer_policy)' follow ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x50): undefined reference to `_scv_extension_util::get_short_name() const' ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x78): undefined reference to `_scv_extension_type_int::get_enum_details(std::list<char const*, std::allocator<char const*> >&, std::list<int, std::allocator<int> >&) const' ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x148): undefined reference to `_scv_extension_rw_int::assign(std::string const&)' ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x178): undefined reference to `_scv_extension_rw_int::get_string() const' ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x248): undefined reference to `_scv_extension_util::_set_name(std::string const&)' ./main.o:(.rodata._ZTV19scv_extensions_baseIiE[_ZTV19scv_extensions_baseIiE]+0x50): undefined reference to `_scv_extension_util::get_short_name() const' ./main.o:(.rodata._ZTV19scv_extensions_baseIiE[_ZTV19scv_extensions_baseIiE]+0x78): undefined reference to `_scv_extension_type_int::get_enum_details(std::list<char const*, std::allocator<char const*> >&, std::list<int, std::allocator<int> >&) const' ./main.o:(.rodata._ZTV19scv_extensions_baseIiE[_ZTV19scv_extensions_baseIiE]+0x148): undefined reference to `_scv_extension_rw_int::assign(std::string const&)' ./main.o:(.rodata._ZTV19scv_extensions_baseIiE[_ZTV19scv_extensions_baseIiE]+0x178): undefined reference to `_scv_extension_rw_int::get_string() const' ./main.o:(.rodata._ZTV19scv_extensions_baseIiE[_ZTV19scv_extensions_baseIiE]+0x248): undefined reference to `_scv_extension_util::_set_name(std::string const&)' ./main.o:(.rodata._ZTV23scv_extension_callbacksIiE[_ZTV23scv_extension_callbacksIiE]+0x50): undefined reference to `_scv_extension_util::get_short_name() const' ./main.o:(.rodata._ZTV23scv_extension_callbacksIiE[_ZTV23scv_extension_callbacksIiE]+0x78): undefined reference to `_scv_extension_type_int::get_enum_details(std::list<char const*, std::allocator<char const*> >&, std::list<int, std::allocator<int> >&) const' ./main.o:(.rodata._ZTV23scv_extension_callbacksIiE[_ZTV23scv_extension_callbacksIiE]+0x148): undefined reference to `_scv_extension_rw_int::assign(std::string const&)' ./main.o:(.rodata._ZTV23scv_extension_callbacksIiE[_ZTV23scv_extension_callbacksIiE]+0x178): undefined reference to `_scv_extension_rw_int::get_string() const' ./main.o:(.rodata._ZTV23scv_extension_callbacksIiE[_ZTV23scv_extension_callbacksIiE]+0x248): undefined reference to `_scv_extension_util::_set_name(std::string const&)'
  5. Hi: Related question, but a different platform. On linux (x86_64): I've built systemC-2.3.2 with CXXFLAGS=' -std=c++11 ' I've built scv_2.0.1 with CXXFLAGS=' -std=c++11 --with-systemc=${myPath}/build/systemc-2.3.2 I have main.cpp that compiles. when I attempt to link: I get: g++-4.8 -g -Wall -ggdb -std=c++11 -O0 -D GCC48 -Wall ./main.o -lscv -lsystemc -lpthread -lm -L../build/systemc-2.3.2/lib-linux64 ../../CPP-NumericalMethods/libNumericalMethods.a ../build/systemc-2.3.2/lib-linux64/libscv.a ../build/systemc-2.3.2/lib-linux64/libsystemc.a -o testCMD ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x50): undefined reference to `_scv_extension_util::get_short_name() const' ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x78): undefined reference to `_scv_extension_type_int::get_enum_details(std::list<char const*, std::allocator<char const*> >&, std::list<int, std::allocator<int> >&) const' ./main.o:(.rodata._ZTV14scv_extensionsIiE[_ZTV14scv_extensionsIiE]+0x148): undefined reference to `_scv_extension_rw_int::assign(std::string const&)' etc..... ./main.o:(.rodata._ZTV23scv_extension_callbacksIiE[_ZTV23scv_extension_callbacksIiE]+0x248): undefined reference to `_scv_extension_util::_set_name(std::string const&)' ../build/systemc-2.3.2/lib-linux64/libscv.so: undefined reference to `sc_core::sc_api_version_2_3_2_cxx199711L<&sc_core::SC_DISABLE_VIRTUAL_BIND_UNDEFINED_>::sc_api_version_2_3_2_cxx199711L(sc_core::sc_writer_policy)' I can see the symbols defined in ../build/systemc-2.3.2/lib-linux64/libscv.so using the nm tool. What am I missing....? Thanks! Peter
×