Question

I have a problem with my xcode. The thin is that my teacher can't execute my code just because I use C99. I've tried to change it but without any results, I have installed command line tool too whithout any result. Because of that I installed Netbeans IDE 7.4 and tried to program there. To test which standard the program used I tried with a loop (int i = 0; i< size; i++) and the program complained which is a good sign. Now two days later I got the same problem with Netbeans too and I am really near to just jump off the course because of this issue. I'm late with my assignment just because my teacher doesn't accept my assignments written with c99 standard etc. Someone who has have same issues and solved the problem? It doesn't really matter if it's on Netbeans or Xcode. I just wanna code.

If you can't help me, whats the difference between c99 and c90 etc? I know that with the for loop but are there any other things that makes the code unexecutable?

When I type gcc --version on the terminal I get this...

Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn) Target: x86_64-apple-darwin12.5.0 Thread model: posix John-MacBook-Air:~ johnBlunt$

Here is my settings The compiler is a Apple LLVM 5.0. I don

The C language dialect is c89 [-std= c89

And I have set the settings to treat the warnings as errors

Was it helpful?

Solution

Edit: updated to reflect updated question.

Clang and GCC shouldn't have any noticeable differences to most code aside from some default warnings IIRC. what is your specific problem? Is it that you are compiling a binary on a mac and your teacher is on windows? your teacher needs to tell you the errors if you want to fix them.

If you do want to use GCC with xcode you need to download and install it separately.

I dont know what CGG is, but you can change the setting by selecting your project/target in xcode then going to "build settings" then change the "c language dialect" setting.

AFIK there is no C90 do you mean C89? why in the world does your teacher insist on using that?! we are up to C11 now...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top