G++ macro redefinition warning

This is a discussion on G++ macro redefinition warning within the General Discussions forums, part of the Community Boards category; I'm using both wxWidgets and gsoap-generated web proxy classes in one of my projects, and they both define macros like ...

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    2,144

    G++ macro redefinition warning

    I'm using both wxWidgets and gsoap-generated web proxy classes in one of my projects, and they both define macros like HAVE_SNPRINTF (and many others), and they don't wrap them in #ifndef/#endif, which causes lots of compiler warnings about the redefinition. I've been searching google for a half hour or so for a way to disable this warning, but no solution seems to present itself. I know for a fact that the values of these macros is the same, because gsoap and wxWidgets were built on the same machine, with the same toolchain, and because I have visually verified their values.

    is there a gcc/g++ command line (-Wno-<something>) option to disable this specific warning?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    The list of all the options would be Option Summary - Using the GNU Compiler Collection (GCC) (changing 4.6.1 in the URL as appropriate). I don't see one that looks exactly like what you want, though.

  3. #3
    Registered User
    Join Date
    Oct 2006
    Posts
    2,144
    I saw the same page, and that was my finding as well. oh well, I guess I just have to put up with hundreds of warnings from a few of my source files

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 14
    Last Post: 07-14-2009, 08:16 AM
  2. redefinition
    By goran00 in forum C Programming
    Replies: 6
    Last Post: 03-21-2008, 12:05 PM
  3. Replies: 2
    Last Post: 01-20-2004, 04:33 PM
  4. WHAT redefinition?
    By CodeMonkey in forum C++ Programming
    Replies: 11
    Last Post: 02-09-2003, 05:35 PM
  5. redefinition of an int
    By The Gweech in forum C++ Programming
    Replies: 3
    Last Post: 07-16-2002, 04:02 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21