Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with BSP include(s) and WINCEOEM=1 / _OEMINCPATHs

77 views
Skip to first unread message

gknigh_t

unread,
Nov 22, 2009, 7:41:01 PM11/22/09
to
I am having trouble building a routine included with a BSP I added into my
installation of Platform Builder. I know the problem is relating to the
include directories the complier is reading during a build.

For example (using command line debug build):
cd C:\WINCE600\PLATFORM\TI_EVM_3530\SRC\TEST\SHELL
build -c

returns the error:
BUILD: [01:0000000026:ERRORE]
C:\WINCE600\PLATFORM\TI_EVM_3530\SRC\TEST\SHELL\.\shell.cxx(1322) : error
C2065: 'DEVMODE' : undeclared identifier

Basically, the compiler can't find the header file, in this case (wingdi.h)
which contains the typedef declarations for DEVMODE.

In the root of C:\WINCE600\PLATFORM\TI_EVM_3530, there is a sources.cmn file.
This file contains:
WINCEOEM=1
...
...
...
_OEMINCPATH=$(SG_OUTPUT_ROOT)\sdk\inc
_OEMINCPATH=$(_OEMINCPATH);$(SG_OUTPUT_ROOT)\oak\inc
_OEMINCPATH=$(_OEMINCPATH);$(SG_OUTPUT_ROOT)\ddk\inc

_ISVINCPATH=$(_WINCEROOT)\public\common\sdk\inc
...

where SG_OUTPUT_ROOT=C:\WINCE600\public\CEBASE\cesysgen.
Scanning the 3 _OEMINCPATHs, no header is found with a definition for DEVMODE.
However, it is found in _ISVINCPATH=$(_WINCEROOT)\public\common\sdk\inc
inside of wingdi.h

The WINCEOEM=1 flag inside sources.cmn tells the compiler to use
_OEMINCPATH. Meaning it will never include _ISVINCPATH see wingdi.h hence
the error I am seeing.

If I append sources.cmn to also include
_OEMINCPATH=$(SG_OUTPUT_ROOT)\sdk\inc;$(_WINCEROOT)\public\common\sdk\inc;$(_WINCEROOT)\public\common\oak\inc;$(_WINCEROOT)\public\common\ddk\inc
I will get unresolved external link errors.

Is there a away around this?

Bruce Eitman [eMVP]

unread,
Nov 22, 2009, 10:22:14 PM11/22/09
to
Based on what you wrote, it is in fact finding all of the header files that
the code is including. If it didn't the error message would indicate that
it can't find an included file.

Instead the error is telling you that after including all of the files, it
can't find the definition for DEVMODE. That is different. That indicates
that either you haven't included the right files, or the files that it finds
aren't right.

You can set INCLUDES in your sources file, but that won't necessarily fix
your real problem.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT Eurotech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

Eurotech Inc.
www.Eurotech.com

"gknigh_t" <gkni...@discussions.microsoft.com> wrote in message
news:BBAE60A6-C092-4A20...@microsoft.com...

gknigh_t

unread,
Nov 22, 2009, 11:16:02 PM11/22/09
to
Hi Bruce,

You are correct. The problem is that the header files it is including do
not contain the right definitions for DEVMODE (part of GDI/display found in
wingdi.h.

The sources.cmn in the top room of the BSP folder has WINCEOEM=1 set. The
important lines from sources.cmn are:

_OEMINCPATH=$(SG_OUTPUT_ROOT)\sdk\inc
-->C:\WINCE600\public\CEBASE\cesysgen\sdk\inc
_OEMINCPATH=$(_OEMINCPATH);$(SG_OUTPUT_ROOT)\oak\inc -->
C:\WINCE600\public\CEBASE\cesysgen\oak\inc
_OEMINCPATH=$(_OEMINCPATH);$(SG_OUTPUT_ROOT)\ddk\inc -->
C:\WINCE600\public\CEBASE\cesysgen\ddk\inc
_ISVINCPATH=$(_WINCEROOT)\public\common\sdk\inc -->
C:\WINCE600\public\common\sdk\inc

Because of WINCEOEM=1, the compiler is looking at wingdi.h from
\public\CEBASE\cesysgen\sdk\inc
The definition for DEVMODE is in the wingdi.h found in
\public\common\sdk\inc and for as long as WINCEOEM is defined, the compiler
will never care about the _ISVINCPATH variable.

"Bruce Eitman [eMVP]" wrote:

> .
>

Bruce Eitman [eMVP]

unread,
Nov 23, 2009, 8:37:40 AM11/23/09
to
$(SG_OUTPUT_ROOT) does not evaluate to C:\WINCE600\public\CEBASE\cesysgen.
It evaluates to your OSDesign's CESYSGEN folder.

You should take a look at the build.log file to see which folders are
actually being used when that folder is built. Then check to see if you
have a wingdi.h in a different folder.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT Eurotech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

Eurotech Inc.
www.Eurotech.com

"gknigh_t" <gkn...@discussions.microsoft.com> wrote in message
news:36FF4F20-EFDC-4688...@microsoft.com...

0 new messages