Jump to content
johnnie.chan@gmail.com

bug during compilation with AMS POC 1.0

Recommended Posts

I'm getting the following error when trying to compile anything that includes the systemc-ams library:

#include <systemc-ams.h>

int sc_main(int argc, char* argv[])

{ return 0; }

The following error arises:

/tmp/ccWqxyVs.o: In function `sca_util::sca_implementation::sca_matrix_base<double>::~sca_matrix_base()':

/home/johnnie/systemc-ams-1.0/include/scams/impl/util/data_types/sca_matrix_base.h:172: undefined reference to `sca_util::sca_implementation::sca_matrix_base_typeless::~sca_matrix_base_typeless()'

/home/johnnie/systemc-ams-1.0/include/scams/impl/util/data_types/sca_matrix_base.h:172: undefined reference to `sca_util::sca_implementation::sca_matrix_base_typeless::~sca_matrix_base_typeless()'

/tmp/ccWqxyVs.o:(.rodata._ZTIN8sca_util18sca_implementation15sca_matrix_baseIdEE[_ZTIN8sca_util18sca_implementation15sca_matrix_baseIdEE]+0x10): undefined reference to `typeinfo for sca_util::sca_implementation::sca_matrix_base_typeless'

Can anyone help provide insight into what is going on?

Share this post


Link to post
Share on other sites

You are not passing the parameters in the right order to the compiler. Recent versions of g++ only include a library if one of its symbols is actually used in one of the preceding object files. Try the following command with the link libraries at the end of the compiler call:

g++ -Wall -DDEBUG -g -o main test/main.cpp -I/home/johnnie/systemc-2.3.0/include -I/home/johnnie/systemc-ams-1.0/include -Iinclude/ -L/home/johnnie/systemc-2.3.0/lib-linux64 -L/home/johnnie/systemc-ams-1.0/lib-linux64 -lsystemc-ams -lsystemc

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×