Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / April 2006

Tip: Looking for answers? Try searching our database.

Silencing compiler warning D9025

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Harris - 11 Apr 2006 15:27 GMT
We have some C++ code that has a makefile which contains both /W2 and /W3.  
Due to the way the makefiles are written to be shared across multiple
projects, it's not trival to eliminate the duplicate compiler warning-level
directives.  I'm trying to find a way to silence the following warning
displayed by Visual Studio 2005 for each file compiled:

cl : Command line warning D9025 : overriding '/W2' with '/W3'

One would think you could add '/wd9024' to the build rules to silence this.  
But no - this option just adds a second warning to each file compiled:

cl : Command line warning D9014 : invalid value '9025' for '/wd'; assuming
'4999'

Any suggestions other then just removing one of /W3 or /W2 from the options
list?

Thanks for any tips you can share.

-----
John Harris
Bruno van Dooren - 11 Apr 2006 16:05 GMT
> We have some C++ code that has a makefile which contains both /W2 and /W3.  
> Due to the way the makefiles are written to be shared across multiple
[quoted text clipped - 9 lines]
> cl : Command line warning D9014 : invalid value '9025' for '/wd'; assuming
> '4999'

/wd is used to silence compiler warning. i.e. Cxxxx. Since C9025 does not
exist, It defaults to C4999, which is defined as 'Unknown warning'

> Any suggestions other then just removing one of /W3 or /W2 from the options
> list?
>
> Thanks for any tips you can share.

I have not used makefiles on windows, but I have done some projects on linux
that used makefiles. what we did there is specifying settings like that as
variables.
doing that makes it easy to supply default settings that can be changed.

As long as you use only that variable for specifying that setting, you will
not get duplicate /WX specifications.
VAR=/W3
VAR=/W2   //override previous

Another construct that might be useful is that in makefiles (at least on
linux) you can use a special construct that only assigns value to VAR if VAR
did not yet exist until that point. I think it was @= or $= (too long ago)

I don't know your build infrastructure, but by using these things you should
be able to achieve builds with only a single /W specification

Signature

Kind regards,
   Bruno.
   bruno_nos_pam_van_dooren@hotmail.com
   Remove only "_nos_pam"


Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.