Jump to content

creation of dll of systemc


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



Link to comment
Share on other sites

  • 11 months later...

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.

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