Re: compiler options wince 5.0 by Tom
Tom
Thu Dec 01 09:34:10 CST 2005
What to do about the error depends on where in the build it is occurring.
If it is not, as you indicated, coming from your BSP then it *may* be coming
from the PUBLIC tree somewhere, in which case you can avoid it by avoiding
recompiling the PUBLIC code, which you should not do anyhow.
Switch to using the other build commands as I've outlined below in text I
copied from my previous post in another thread. Then, if the error still
occurs, look at the build log and determine what component is being built
when the error is generated. Then you can look at the SOURCES and MAKEFILE
for that component, find out where the -Gf flag is being set, and change it.
If all else fails, lowering the warning level would be a workaround, but it
wouldn't be my first choice for a fix.
Some general build command guidelines:
- Use 'Sysgen' when you first create your OS project or after you change
your OS configuration, i.e. adding or removing OS catalog components to your
project.
- Use 'Build and Sysgen Current BSP' whenever you want to rebuild your
entire BSP, especially if your BSP uses configuration files that require
preprocessing for conditionals.
- Use 'Build and Sysgen' never ever! This recompiles and relinks all the
Public source code, attempting to rebuild the pre-built binaries that
Microsoft provides in PB. The end result is often a broken build
environment that requires a PB-reinstall to restore.
Knowing when to use the 'Clean Before Building' option can be helpful, but
may not always be intuitive. When in doubt, use it, especially when you
make changes to your OS configuraiton. If you know that you don't need to
clean before a build, turning this option off reduces the number of targets
that must be built and can reduce build time.
A useful alternative to the PB's main menu's 'Build OS' commands is to
right-click on your BSP or a particular component of your BSP in the
FileView tab of the Workspace window and select 'Build Current Project',
(or, for the BSP, 'Build and Sysgen Current Project' if your BSP uses
config files that need sysgen'd). If the 'Make Run-time Image After Build'
option in the context menu is checked, these commands will run makeimg after
compiling and linking to rebuild your nk.bin/nb0. This is the fastest way
to recreate your OS image file after modding a single driver, and the
fastest option for debugging if you're not using KITL to download your
driver from _FLATRELEASEDIR.
Tom Gensel (eMVP)