1

I'm using Eclipse and xCode to develop in C++.

The problem is in Eclipse I used the following statement:

unsigned asdf = -1;

In eclipse it worked fine, but in xcode is not letting you compile. How can I specify in Eclipses's settings to not let me compile if there is something like this?

user3468999
  • 239
  • 3
  • 7

2 Answers2

1

I believe this warning is -Wsign-conversion being used by Xcode. Obviously you are compiling under Eclipse without this warning. This is a good warning (most are) so the better solution is to fix the code and up the warnings in Eclipse to match Xcode.

I am not near my Mac at the moment so I cannot show you a screenshot of Xcode, however you should be able to find this warning and disable it in your project settings, if you don't wish to fix the code.

trojanfoe
  • 120,358
  • 21
  • 212
  • 242
  • That is what I want. Match the warnings. But I don't know where is it in Eclipse. – user3468999 Aug 28 '14 at 13:05
  • @user3468999 Look at the answer to this question: http://stackoverflow.com/questions/14131939/turn-off-eclipse-errors-that-arent-really-errors – trojanfoe Aug 28 '14 at 13:07
0

The error should be the fact that you don't declare what the type of variable, try

unsigned int asdf = -1;

LS_
  • 6,763
  • 9
  • 52
  • 88