# VxWorks SDK header dependencies

**URL:** <https://forums.windriver.com/t/vxworks-sdk-header-dependencies/1091>\
**Category:** VxWorks SDK\
**Created:** [October 1, 2024, 9:52am UTC](https://forums.windriver.com/t/vxworks-sdk-header-dependencies/1091 "2024-10-01T09:52:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amigueti](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@amigueti](https://forums.windriver.com/u/amigueti)\
**Post date:** [October 1, 2024, 9:52am UTC](https://forums.windriver.com/t/vxworks-sdk-header-dependencies/1091/1 "2024-10-01T09:52:19Z")

</div>

I’m trying to migrate an app that was written for VxWorks 6.6 but I’m having some issues on the way.

I have a header file that uses “wdLib.h” to import “WDOG\_ID”. This is giving me the next error:

```auto
error: unknown type name 'WDOG_ID'

```

I’ve checked the file “wdLib.h” and realized that the definition has been moved to “types/vxWind.h”. Therefore I’ve included the “vxWind.h” header but the problem persists.

I’m using a makefile. If I include the path where “wdLib.h” and “vxWind.h” are located I even experience more errors like:

```auto
error: unknown type name '_Vx_SEM_ID'
    _Vx_SEM_ID condSemId; /* Vx sem associated with */
error: unknown type name '_Vx_OBJ_HANDLE'; did you mean 'OBJ_HANDLE'?
typedef _Vx_OBJ_HANDLE trace_id_t;

```

Could someone please give me a hand.

---

<div class="post-metadata">

**Author:** ![dan.milea](https://avatars.discourse-cdn.com/v4/letter/d/4bbf92/32.png) [@dan.milea](https://forums.windriver.com/u/dan.milea)\
**Post date:** [October 14, 2024, 7:50am UTC](https://forums.windriver.com/t/vxworks-sdk-header-dependencies/1091/2 "2024-10-14T07:50:51Z")

</div>

Hi @amigueti, welcome to the Wind River Labs forum!

The VxWorks SDKs use a compiler driver named wr-cc, along with its counterparts wr-ld, wr-ar, etc.

The watchdog API is available in kernel space, so the application will be a downloadable kernel module (DKM). Let’s start with this sample code and save it as test\_wdog.c.

```auto
#include <vxWorks.h>
#include <wdLib.h>

VX_WDOG(myWdog);
WDOG_ID myWdogId;

STATUS test_wdog()
    {
    if ((myWdogId = wdInitialize (myWdog)) == NULL)
        return (ERROR);
    else
        return (OK);
    }

```

This source file will be compiled as:

```auto
wr-cc -dkm -mcmodel=kernel test_wdog.c -o test_wdog.out

```

test\_wdog.out needs to be loaded on your target before calling its entry point routine.

E.g.

```auto
-> ld < test_wdog.out
-> test_wdog

```
