Thread: G++ macro redefinition warning

  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    3,445

    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,336
    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
    3,445
    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, 05:33 PM
  4. WHAT redefinition?
    By CodeMonkey in forum C++ Programming
    Replies: 11
    Last Post: 02-09-2003, 06:35 PM
  5. redefinition of an int
    By The Gweech in forum C++ Programming
    Replies: 3
    Last Post: 07-16-2002, 04:02 PM