Jump to content

ib64/libsystemcd.so.3.0.0_pub_rev_20231124: undefined reference to `sc_main' linking error when building simple program with Intel Compiler for SystemC


Recommended Posts

Posted

Hello,

I'm trying to build a simple synthesizable state machine in SystemC and trying to compile it to System Verilog with the Intel Compiler for SystemC.  I'm getting this linking error, ib64/libsystemcd.so.3.0.0_pub_rev_20231124: undefined reference to `sc_main'.  I installed the compiler on RHEL 8.9 and during the lengthy (hours) installation were were a few warnings.  Does anyone have any idea on how I might track this down?

The three key files (source & CMake list) are attached.  Thanks.

 

afrmain.cpp AllForRyan.h CMakeLists.txt

Posted

Hello @sprl111,

Can you share the exact error you are observing?

If you are only observing the sc_main undefined reference then probably some source is not picked up by the build.

Regards,

Ameya Vikram Singh

Posted

Hello @sprl111,

Probably a typo in 'afrmain.cpp':

// main()
// int sc_main(int sc_argc, char **sc_argv()) //< probably should be following:
int sc_main(int sc_argc, char **sc_argv)
{
	Tb tb("tb");
   sc_start();
   return 0;
}

Regards,

Ameya Vikram Singh

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...