undefined reference.. - VxWorks

This is a discussion on undefined reference.. - VxWorks ; Hi I am getting a strange undefined reference error while linking ..via a tornado. C:\Tornado2.0ppc\host\x86-win32\bin\makeSymTbl PPC tmp.o > symTbl.c ccppc -c -fdollars-in-identifiers -O2 -mcpu=860 -ansi -nostdinc - DRW_MULTI_THREAD -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope - fno-exceptions -fcheck-new -DNDEBUG -DCIRRUS_CODEBASE=1 -ID:/Root/VIP/ Workplace/current/products/Vip -ID:\Root\VIP\Workplace\current/source/ ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: undefined reference..

  1. undefined reference..

    Hi
    I am getting a strange undefined reference error while linking ..via a
    tornado.

    C:\Tornado2.0ppc\host\x86-win32\bin\makeSymTbl PPC tmp.o > symTbl.c
    ccppc -c -fdollars-in-identifiers -O2 -mcpu=860 -ansi -nostdinc -
    DRW_MULTI_THREAD -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -
    fno-exceptions -fcheck-new -DNDEBUG -DCIRRUS_CODEBASE=1 -ID:/Root/VIP/
    Workplace/current/products/Vip -ID:\Root\VIP\Workplace\current/source/
    OS/VxWorks/CI867BSP -IC:\Tornado2.0ppc/target/h -IC:\Tornado2.0ppc/
    target/config/comps/src -IC:\Tornado2.0ppc/target/src/drv -DCPU=PPC860
    -DPRJ_BUILD -DCIRRUS_CODEBASE -I. -IC:\Tornado2.0ppc/target/config/all
    -IC:\Tornado2.0ppc/target/h -IC:\Tornado2.0ppc/target/src/config -IC:
    \Tornado2.0ppc/target/src/drv -ID:\Root\VIP\Workplace\current -ID:\Root
    \VIP\Workplace\current/components/include -ID:\Root\VIP\Workplace
    \current/imports/CirrusSDK/components/include -ID:\Root\VIP\Workplace
    \current/source/OS/VxWorks/drv/serial -ID:\Root\VIP\Workplace\current/
    source/OS/VxWorks/drv/timers -ID:\Root\VIP\Workplace\current/source/OS/
    VxWorks/drv/watchdog symTbl.c -o symTbl.o
    ldppc -X -N -Map VIP.map -T ..\VIP.cmd -e Program -Ttext 00002200
    VIP.o ..\..\..\components\vxworks\860\release\OSVIP.o ..\..\..
    \components\vxworks\860\release\prdFWRoot.o ..\..\..\components\vxworks
    \860\release\VIPApplication.o ..\..\..\components\vxworks\860\release
    \config.a ..\..\..\imports\CirrusSDK\components\vxworks\860\ release
    \CirrusSDK.a ctdt.o symTbl.o -o VIP
    ...\..\..\components\vxworks\860\release\VIPApplic ation.o: In function
    `AsadTask(void)':
    d:\Root\Vip\Workplace\current\source\VIPApplicatio n/.
    \VIPApplication.cpp(166) : undefined reference to `clientStart(void)'
    make: *** [VIP] Error 0x1
    make: Leaving directory `d:\Root\Vip\Workplace\current\products\Vip
    \release'
    VIP : error PRJ0002 : error result returned from 'c:\docume~1\asad
    \locals~1\temp\bat000020.bat'.


    This is strange since here the VIP project is trying to link it frm a
    differnt .o file(a different project altogether which links
    properly) ..

    here is the code whr im getting the error msg:

    #include "eipclien.h" //here the function is declared as extern and is
    defined in eipclien.cpp.
    void AsadTask ()
    {
    unsigned char cChk;
    taskDelay(100);
    while(TRUE)
    {
    printf("\n.....Chk 123");
    taskDelay(1000);
    cChk=clientStart(); <<<- undefined ref
    }

    }

  2. Re: undefined reference..

    On Dec 19, 11:55 am, asad.kha...@gmail.com wrote:
    > Hi
    > I am getting a strange undefined reference error while linking ..via a
    > tornado.
    >
    > C:\Tornado2.0ppc\host\x86-win32\bin\makeSymTbl PPC tmp.o > symTbl.c
    > ccppc -c -fdollars-in-identifiers -O2 -mcpu=860 -ansi -nostdinc -
    > DRW_MULTI_THREAD -D_REENTRANT -fvolatile -fno-builtin -fno-for-scope -
    > fno-exceptions -fcheck-new -DNDEBUG -DCIRRUS_CODEBASE=1 -ID:/Root/VIP/
    > Workplace/current/products/Vip -ID:\Root\VIP\Workplace\current/source/
    > OS/VxWorks/CI867BSP -IC:\Tornado2.0ppc/target/h -IC:\Tornado2.0ppc/
    > target/config/comps/src -IC:\Tornado2.0ppc/target/src/drv -DCPU=PPC860
    > -DPRJ_BUILD -DCIRRUS_CODEBASE -I. -IC:\Tornado2.0ppc/target/config/all
    > -IC:\Tornado2.0ppc/target/h -IC:\Tornado2.0ppc/target/src/config -IC:
    > \Tornado2.0ppc/target/src/drv -ID:\Root\VIP\Workplace\current -ID:\Root
    > \VIP\Workplace\current/components/include -ID:\Root\VIP\Workplace
    > \current/imports/CirrusSDK/components/include -ID:\Root\VIP\Workplace
    > \current/source/OS/VxWorks/drv/serial -ID:\Root\VIP\Workplace\current/
    > source/OS/VxWorks/drv/timers -ID:\Root\VIP\Workplace\current/source/OS/
    > VxWorks/drv/watchdog symTbl.c -o symTbl.o
    > ldppc -X -N -Map VIP.map -T ..\VIP.cmd -e Program -Ttext 00002200
    > VIP.o ..\..\..\components\vxworks\860\release\OSVIP.o ..\..\..
    > \components\vxworks\860\release\prdFWRoot.o ..\..\..\components\vxworks
    > \860\release\VIPApplication.o ..\..\..\components\vxworks\860\release
    > \config.a ..\..\..\imports\CirrusSDK\components\vxworks\860\ release
    > \CirrusSDK.a ctdt.o symTbl.o -o VIP
    > ..\..\..\components\vxworks\860\release\VIPApplica tion.o: In function
    > `AsadTask(void)':
    > d:\Root\Vip\Workplace\current\source\VIPApplicatio n/.
    > \VIPApplication.cpp(166) : undefined reference to `clientStart(void)'
    > make: *** [VIP] Error 0x1
    > make: Leaving directory `d:\Root\Vip\Workplace\current\products\Vip
    > \release'
    > VIP : error PRJ0002 : error result returned from 'c:\docume~1\asad
    > \locals~1\temp\bat000020.bat'.
    >
    > This is strange since here the VIP project is trying to link it frm a
    > differnt .o file(a different project altogether which links
    > properly) ..
    >
    > here is the code whr im getting the error msg:
    >
    > #include "eipclien.h" //here the function is declared as extern and is
    > defined in eipclien.cpp.
    > void AsadTask ()
    > {
    > unsigned char cChk;
    > taskDelay(100);
    > while(TRUE)
    > {
    > printf("\n.....Chk 123");
    > taskDelay(1000);
    > cChk=clientStart(); <<<- undefined ref
    > }
    >
    >
    >
    > }- Hide quoted text -
    >
    > - Show quoted text -


    Hi got the solution ...
    i was trying to include the .h file ... so as to not get undefined ref
    when the function name was already in symbol table ... so now when i
    include the linker was trying to search the function-name symbol
    somewhr outside as it was extern ....

    after removing the # include i got the linker linking
    properly.


    regards,
    Asad

+ Reply to Thread