hi,

I have a wince BSP 4.2 which i have to ,igrate to wince 5.0.On following the
steps i did build and sysgen but for one of the driver it gave me error some
what like this
"use \GF insted of /Gf as is not suitable for future versions of visual VC++"
upon reading msdn i found that it is issue of compiler migration
can anybody please tell me where and how can i set the compiler options
please let me know
waiting for the reply

Re: compiler options wince 5.0 by Tom

Tom
Wed Nov 30 07:44:31 CST 2005

Any sources file can override the default compiler flags (defined in
makefile.def) by setting WINCE_OVERRIDE_CFLAGS. Try searching your BSP
source tree for sources file that contain WINCE_OVERRIDE_CFLAGS and are
setting the -Gf compiler flag.

Tom Gensel (eMVP)



Re: compiler options wince 5.0 by Sangel

Sangel
Wed Nov 30 22:10:02 CST 2005

hi,
thanks for ypur reply .But as you told i searched for the
"WINCE_OVERRIDE_CFLAGS" in my BSP but it is not present there ,then i
searched in whole wince500 and i found in the following path
"E:\WINCE500\PUBLIC\COMMON\OAK\MISC" and that to it was like this

!IF "$(WINCE_OVERRIDE_CFLAGS)" != ""
CDEBUG_FLAGS=$(WINCE_OVERRIDE_CFLAGS)
!ENDIF
but for -gf i found in the same file following line

# Pass name of PDB file to both compiler and linker
CDEBUG_FLAGS=$(CDEBUG_FLAGS) -GF -Zi -Fd$(TARGET_PDB_NAME)

now please can u tell me what to do for this


"Tom Gensel (eMVP)" wrote:

> Any sources file can override the default compiler flags (defined in
> makefile.def) by setting WINCE_OVERRIDE_CFLAGS. Try searching your BSP
> source tree for sources file that contain WINCE_OVERRIDE_CFLAGS and are
> setting the -Gf compiler flag.
>
> Tom Gensel (eMVP)
>
>
>

Re: compiler options wince 5.0 by Tom

Tom
Thu Dec 01 00:14:14 CST 2005

The file is MAKEFILE.DEF, and *nothing* needs done to it. It is setting
the -GF flag in CDEBUG_FLAGS, which is later incorporated into CFLAGS.
WINCE_OVERRIDE_CFLAGS, if set, is used instead of these.

There is nothing wrong with using the -GF flag, which pools identical
strings together as read-only. The message you quoted in your original post
is telling you to use the -GF flag *instead of* the -Gf flag, which pools
identical strings as read-write and can cause problems if one of the pooled
strings is written.

I noticed also that your original posts states you are trying to do a Build
and Sysgen. If this means you are using Platform Builder's "Build and
Sysgen" build command, DON'T. This command tries to rebuild the Microsoft
pre-built binaries from the source code in the PUBLIC tree. There is no
reason to do this (since you shouldn't be modifying any of the source in
these folders directly), and it is easy to break your build system by doing
so (requiring a PB reinstall) and wastes an enormous amount of time in the
process. Stick with the other build commands and avoid this one.

I searched my CE 5.0 PUBLIC tree for occurances of "-Gf" and found no
matches. Even if there were any, they shouldn't concern you unless they
appear in a file that you clone into your project, in which case you'd want
to change them to "-GF".

Tom Gensel (eMVP)



Re: compiler options wince 5.0 by Sangel

Sangel
Thu Dec 01 00:30:03 CST 2005


hi,
thanks again for your fast reply,really i wansn't expecting it so early so
thanks again i was really in need

SO can u tell me what can i do to remove that error.I searched the error
code in MSDN they told to lower the warning level current level i see is
Level 3 and if i make it Level 2 ,error goes .But is this safe

Also one more important thing u told me that i should avoid Build and sysgen
in IDE ,so what u suggest i should do because if I dont do that how can i get
NK.bin and what do u suggest for avoiding build and sysgen.Like how to build
the new platform from start,in MSDN they gave build and sysgen ,any shortcut
you know

can u reply fast ,because as u told i also guessed that i am really wasting
more than 40 min in build and sysgen only



"Tom Gensel (eMVP)" wrote:

> The file is MAKEFILE.DEF, and *nothing* needs done to it. It is setting
> the -GF flag in CDEBUG_FLAGS, which is later incorporated into CFLAGS.
> WINCE_OVERRIDE_CFLAGS, if set, is used instead of these.
>
> There is nothing wrong with using the -GF flag, which pools identical
> strings together as read-only. The message you quoted in your original post
> is telling you to use the -GF flag *instead of* the -Gf flag, which pools
> identical strings as read-write and can cause problems if one of the pooled
> strings is written.
>
> I noticed also that your original posts states you are trying to do a Build
> and Sysgen. If this means you are using Platform Builder's "Build and
> Sysgen" build command, DON'T. This command tries to rebuild the Microsoft
> pre-built binaries from the source code in the PUBLIC tree. There is no
> reason to do this (since you shouldn't be modifying any of the source in
> these folders directly), and it is easy to break your build system by doing
> so (requiring a PB reinstall) and wastes an enormous amount of time in the
> process. Stick with the other build commands and avoid this one.
>
> I searched my CE 5.0 PUBLIC tree for occurances of "-Gf" and found no
> matches. Even if there were any, they shouldn't concern you unless they
> appear in a file that you clone into your project, in which case you'd want
> to change them to "-GF".
>
> Tom Gensel (eMVP)
>
>
>

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)