Jump to content
ViVo

unresolved external

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)
{
    ...
}

 

Share this post


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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×