maybe you included the same header file more than once and left out the code guards.
Ancient Dragon
Retired & Loving It
30,043 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,341
>Is this valid?.. #pragma warning(disable:'warn code') ..:p
If you don't know what's causing a warning, you'd be a fool to disable it. I only know of one warning, on any compiler that I've ever used, where I'm 100% sure that it can be safely disabled. The correct response to a warning is understanding it and then fixing it.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
>I just trying to set the flag not to understand it and fix it
Clearly. That's why I felt the need to tell you that disabling a warning without understanding it is the height of stupidity. You're not stupid, are you?
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
That attitude isn't likely to make you any friends.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
The problem could be the result of several different things, and no one can tell you specifically without seeing the code. Another possible cause, besides the ones I already mentioned previously, is putting the implementation code in a header file. In that case it will be duplicated in every *.cpp file that uses the header file, thus the duplicate error message(s). The solution is to put the implementation code in one *.cpp file, leaving only the class declaration in the header file.
Ancient Dragon
Retired & Loving It
30,043 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,341
why not just fix the problem instead of trying to hide it.
Ancient Dragon
Retired & Loving It
30,043 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,341
Probably -- I've already mentioned three things that you should look at. Could be one of them or none of them. But can't tell you if you don't post the code.
Ancient Dragon
Retired & Loving It
30,043 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,341
Assuming that the warnings are ok and they are arising out of so many different files, is there a way to supress them in the Makefile so that they dont pop up?
Consult the compiler documentation.
mitrmkar
Posting Virtuoso
1,809 posts since Nov 2007
Reputation Points: 1,105
Solved Threads: 395