Undefined symbol 'logMsg'. help! - VxWorks

This is a discussion on Undefined symbol 'logMsg'. help! - VxWorks ; Hi guys, I've been trying to use the function logMsg defined in the logLib for our real time processing project. The complier always complaines this: dld: warning: Undefined symbol 'logMsg' in file 'PPC32diab_RTP_DEBUG/main.o' dld: error: Undefined symbols found - no ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Undefined symbol 'logMsg'. help!

  1. Undefined symbol 'logMsg'. help!

    Hi guys,

    I've been trying to use the function logMsg defined in the logLib for
    our real time processing project. The complier always complaines this:

    dld: warning: Undefined symbol 'logMsg' in file
    'PPC32diab_RTP_DEBUG/main.o'
    dld: error: Undefined symbols found - no output written

    The main.c was created in a RTP project with #include
    defined. Why can't I use the function logMsg in my RTP application?
    When I compile file main.c, the compiler has no error, but when I build
    the RTP project, the complier complains!!! I looked at the source code
    of logLib.c, logMsg requires msgQLib.h as well, which I also included.
    still got error. I can't use printf() because I have some ISR
    involved.

    Please help!!
    Thanks

    Ray


  2. Re: Undefined symbol 'logMsg'. help!

    By the way, I am using Workbench 2.4, VxWorks 6.2. I had the same
    problem when I used Workbench 2.3, VxWorks 6.1. This has nothing to do
    with VxWorks I think, I can use logMsg() function in the kernel shell.
    it's just that the compiler can't find the symbol while building the
    RTP project.


  3. Re: Undefined symbol 'logMsg'. help!

    Ray:

    logMsg should be defined when you load the .o under vxWorks. Sounds
    like you are missing a loader option that allows the link to procede
    with undefineds. All the vxWorks kernel and BSP calls are linked on
    the target, not on the host.


    Larry


  4. Re: Undefined symbol 'logMsg'. help!

    Ray:

    logMsg should be defined when you load the .o under vxWorks. Sounds
    like you are missing a loader option that allows the link to procede
    with undefineds. All the vxWorks kernel and BSP calls are linked on
    the target, not on the host.


    Larry


  5. Re: Undefined symbol 'logMsg'. help!

    The above replies are correct, the linking is dynamic when you load
    your module. (which is different that compiling).
    When you compile (and link) on VxWorks there are all kinds of undefined
    symbols in your .out then when you load the module the OS will perform
    dynamic linking to link all the undefines to symbols that exist in the
    OS.

    This message is telling you that when it dynamically links it can't
    find some symbols - this means that either another module that your
    module depends on isn't loaded, you didn't statically link (i.e.
    compile )in some code in your module that the module needs or the OS is
    missing some components that your module uses. (in your case it's the
    later)

    You need to add the logLib (or something like that) component to your
    OS. Just add the highest level component that your missing (i.e.
    logLib, not msgQLib) and Tornado will take care of the other components
    that are also needed.

    Good Luck,
    George


  6. Re: Undefined symbol 'logMsg'. help!

    Thanks for your comments guys. The problem still occurs though. We are
    not using a Downloadable Kernel Module Project. We are actually having
    this problem with Real-time Processing Project (no .out file built.
    only vxe and .o files built). There is no problem with all default
    setting using the DKM project. but once we used logMsg in the RTP
    project, the linker just can't link to the source code of it. We then
    tried manual specification on the RTP build proporties to link to the
    library we want, but still failed. sigh...fraustrating~~


  7. Re: Undefined symbol 'logMsg'. help!

    From the logLib documentation:

    CONFIGURATION
    To use the message logging library, configure VxWorks with the INCLUDE_LOGGING component.

    Basically, you have to turn it on. If you don't turn it on, you can't use it. How do you turn it on? I don't know, I asked my OS guy, and he did it for me. But it is part of the VxWorks image build process. So you have to rebuild your boot image with INCLUDE_LOGGING to be able to use logLib

  8. Re: Undefined symbol 'logMsg'. help!

    Unfortunately, logMsg() function is only available for kernel level projects. You can not use this function in RTP projects.

+ Reply to Thread