Jump to content

unresolved external


ViVo

Recommended Posts

Hi,

i'm getting "error LNK2019: unresolved external symbol " for method well defined (as fat as i can tell..). the only difference from other blocks is the template of the module (so what??). the outline of the code is supplemented. hope someone can shade some light...

V


1>  Generating Code...
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall lzd_unit<48,3>::thread0(void)" (?thread0@?$lzd_unit@$0DA@$02@@QAEXXZ) referenced in function "public: __thiscall lzd_unit<48,3>::lzd_unit<48,3>(class sc_core::sc_module_name)" (??0?$lzd_unit@$0DA@$02@@QAE@Vsc_module_name@sc_core@@@Z)
1>C:\workarea\Projects\SystemC\libs\awgn\lzd_unit\Debug\lzd_unit.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

 

lzd_unit.h
___________

template <unsigned in_width, unsigned x_pe16>
SC_MODULE(lzd_unit) {
    ...
    ...
    void            thread0(void);

    SC_CTOR(lzd_unit) : pin_ext("pin"), vin("vin"), pout_ext("pout"), vout("vout")
    {
        SC_METHOD(thread0)                                                                ;
        sensitive << pin_ext                                                            ;
        ...
        ...
    }
}

 

lzd_unit.cpp
___________

template <unsigned in_width, unsigned x_pe16>
void lzd_unit<in_width, x_pe16>::thread0(void)
{
    ...
}

 

Link to comment
Share on other sites

Hi Philipp,

thank you for promptly responding. as it is, i read this web page top to bottom, i still could not figure out the problem.

i comment out the declaration SC_METHOD(thread0) and the compiler succeeded .. so the declaration is the problem? how can i distinguish between METHOD, THREAD and CTHREAD without this macro.. obviously, i have no clue what is going on here..

V

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