Jump to content

creation of dll of systemc


swetas

Recommended Posts

I want to create a .dll during the build of systemc through visual studio 2010 but it reports an error 

 

sc_main_main.obj : error LNK2019: unresolved external symbol _sc_main referenced in function _sc_elab_and_sim
1>Debug\SystemC.dll : fatal error LNK1120: 1 unresolved externals
 
I do not want to have .lib but .dll.
 
Link to post
Share on other sites

You need to keep out "sc_main_main.cpp" (and "sc_main.cpp", providing the main() function) from your DLL building project.
Windows DLLs do not support unresolved symbols, unlike ELF shared objects do.

 

You then need to add (a library containing) sc_main(_main).cpp/obj to your application, to provide a main and to properly initialize the kernel via "sc_elab_and_sim".  Of course you can adjust the implementation of this function to not call (the unresolved) sc_main function but add another mechanism to enter the user model at this point.

 

hth,
Philipp

Link to post
Share on other sites
  • 11 months later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...