Compiler errors on sysLib.h inclusion - VxWorks

This is a discussion on Compiler errors on sysLib.h inclusion - VxWorks ; Hi all I am trying to write a simple driver for an X86-platform to turn on one of 8 LEDs on address 0x0300. the toggle() function is something like void LED::toggle(unsigned char number) { status = status ^ (1 sysOutByte(LED_PORT_ADDRESS, ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Compiler errors on sysLib.h inclusion

  1. Compiler errors on sysLib.h inclusion

    Hi all

    I am trying to write a simple driver for an X86-platform to turn on one
    of 8 LEDs on address 0x0300. the toggle() function is something like

    void LED::toggle(unsigned char number)
    {
    status = status ^ (1< sysOutByte(LED_PORT_ADDRESS, ~status);
    }

    Until now (not VxWorks) I have been using _outp() from conio.h, but
    this does not seem to be implemented for VxWorks. So I use
    sysOutByte().

    Now, in order to use sysOutByte, I need to include . When I
    do this, I get 100+ compiler errors (examples shown below). The errors
    are in files bootLib.h and drv/timer/timerDev.h and seem to be
    something with the the symbols IMPORT and STATUS not having been
    defined.

    I have a "main" cpp file that includes LED.h, which again includes
    sysLib.h. What am I doing wrong? I am convinced that it has something
    to do with the include files (or their order?) Any help is GREATLY
    appreciated, as this is a real showstopper!

    Errors:
    (btw: The combined use of slashes/backslashes in file names look funny
    - is this of importance?)

    c:/WindRiverClient/vxworks-6.2\target\h/bootLib.h", line 74: error
    (etoa:4020):
    identifier "IMPORT" is undefined
    IMPORT STATUS bootBpAnchorExtract (char * string, char **
    pAnchorAdrs);
    ^
    "c:/WindRiverClient/vxworks-6.2\target\h/bootLib.h", line 74: error
    (etoa:4065):
    expected a ";"
    IMPORT STATUS bootBpAnchorExtract (char * string, char **
    pAnchorAdrs);
    ^
    "c:/WindRiverClient/vxworks-6.2\target\h/bootLib.h", line 75: error
    (etoa:4020):
    identifier "IMPORT" is undefined
    IMPORT STATUS bootLeaseExtract (char * string, u_long * pLeaseLen,


  2. Re: Compiler errors on sysLib.h inclusion

    This post is outdated. Please disregard. Thank you.

    Troels Jensen


  3. Re: Compiler errors on sysLib.h inclusion

    Hi:

    Trying #include "vxworks.h"

    I think IMPORT is "extern" in that file.

    lc
    Troels Jensen wrote:
    > This post is outdated. Please disregard. Thank you.
    >
    > Troels Jensen



  4. Re: Compiler errors on sysLib.h inclusion

    You know how sometimes you think you have tried EVERYTHING, and then
    the solution is sooo simple? Thanks a lot, Larry - IOU1

    LarryC wrote:
    > Hi:
    >
    > Trying #include "vxworks.h"
    >
    > I think IMPORT is "extern" in that file.
    >
    > lc
    > Troels Jensen wrote:
    > > This post is outdated. Please disregard. Thank you.
    > >
    > > Troels Jensen



  5. Re: Compiler errors on sysLib.h inclusion

    glad to help. lc
    Troels Jensen wrote:
    > You know how sometimes you think you have tried EVERYTHING, and then
    > the solution is sooo simple? Thanks a lot, Larry - IOU1
    >
    > LarryC wrote:
    > > Hi:
    > >
    > > Trying #include "vxworks.h"
    > >
    > > I think IMPORT is "extern" in that file.
    > >
    > > lc
    > > Troels Jensen wrote:
    > > > This post is outdated. Please disregard. Thank you.
    > > >
    > > > Troels Jensen



+ Reply to Thread