Tuesday, 15 December 2009

Switching target OS from project to project

Ho ho ho and joyous Season Greetings,

from time to time I come across the situation to help out in projects with different Operating Systems. And guess what... sometimes one of the Operating Systems is a Microsoft Windows CE / Windows Mobile / MS Auto etc. Now assume that first such a switch of the target OS from one project to the other is happening and that second it is most likely that both Operating Systems are mainly developed in C/C++.

So we have compilers, linkers and other parts of the tool chain including make tool, etc. Thus we all (including you) run into issues that the environment variables of the development host have most likely the same naming even if we switch the compilers, linkers, etc.

You probably just came across such a situation if e.g. the Visual Studio Platform Builder Plugin for Windows CE 6.0 Rx behaves like that:

Starting Build: blddemo -q

Some output in Build Output window during sysgen phase but less than expected... There were build errors and build.log just says

Starting sysgen phase for project ( common )
Found localized resources for Languages ( 0404 0407 0409 040C 0410 0411 0412 0413 0416 0419 041D 0804 0C0A)

Microsoft (R) Program Maintenance Utility Version CE-6.00.1893.0
Copyright (C) Microsoft Corporation. All rights reserved.

NMAKE : fatal error U1065: invalid option '-'
Windows CE Version (Release) (Built on Jun 30 2006 16:52:46)

So what can possibly go wrong at that early build phase? If this is correlated to the same reason I am thinking of then this will happen in all your BSP building solutions yet.

The failure results from an nmake sysgen invoked in C:\WINCE600\PUBLIC\COMMON\CESYSGEN. Having a short look into the makefile reveals that from included cesysgen.mak the rules preproc and postproc described in makefile should be executed.

But where's this !"§$ option of that nmake error message above coming from? You never set that option?

On build console (build window) do a set MAKE. Probably you get something like:


This could have been set up by other build environments and is normally or most likely not used in a Windows CE / Windows Mobile environment. If you clearly identify this to belong to some other target operating system than Windows CE / Windows Mobile and it is not used right now then remove this environment variable and run your build command again.

blddemo -q

This is most likely doing the trick...

To wish you the special gifts of this holiday season - Peace, Joy, Lasting Happiness and a working tool chain to build your favorite OS.

-- Oliver

No comments: