Jump to content

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?

Link to comment
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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...