c Debugging problem

Ahmad Sherif ahmad.sherif.public at gmail.com
Sat Dec 4 16:10:44 UTC 2010


Hi Ahmad,

I take it that you're using configure, so simply you need to execute this
./configure CFLAGS="-std=c99"
in the terminal. I think that should do it.

On Sat, Dec 4, 2010 at 5:57 PM, ahmedandkhaldboys ahmedandkhaldboys <
ahmedandkhaldboys at gmail.com> wrote:

> hey ahmed
>
> so i put
> CFLAGS="-std=c99"
> in terminal ? :D
>
> just take me step by step D:
>
> 2010/12/4 Ahmad Sherif <ahmad.sherif.public at gmail.com>
>
>> Well, it depends. I think if you're using configure then you can pass this
>> to configure
>> CFLAGS="-std=c99"
>> but again, it depends on what generates the make files.
>>
>> Hope it works :) ...
>>
>> Bests,
>> Ahmad Sherif
>>
>>
>> On Sat, Dec 4, 2010 at 4:49 PM, ahmedandkhaldboys ahmedandkhaldboys <
>> ahmedandkhaldboys at gmail.com> wrote:
>>
>>> hey ahmed, thank's for your reply
>>>
>>> i know the method of declaring it in the main function but i just want to
>>> use it in the local statement
>>>
>>> i don't know how to change the mode that's another problem :S
>>>
>>> thanks :)
>>> 2010/12/4 Ahmad Sherif <ahmad.sherif.public at gmail.com>
>>>
>>>> Hi Ahmad,
>>>>
>>>> Simply declare the variable you're using at the beginning of the scope
>>>> of main function, then you can initialize it in the for loop. In other
>>>> words, don't do this
>>>> for (int i = 0; i < 9; i++) { ... }
>>>> but do this
>>>> int main() {
>>>> int i;
>>>> ...
>>>> for (i = 0; i < 9; i++) { ... }
>>>>
>>>> Another solution is to change the mode from c89 to c99, but I don't know
>>>> how this will affect the rest of the project :).
>>>>
>>>> Bests,
>>>> Ahmad Sherif
>>>>
>>>> On Sat, Dec 4, 2010 at 4:44 AM, ahmedandkhaldboys ahmedandkhaldboys <
>>>> ahmedandkhaldboys at gmail.com> wrote:
>>>>
>>>>>  hello guys, i had a little problem here:
>>>>>
>>>>> make[1]: Entering directory
>>>>> `/home/ahmed/NetBeansProjects/CppApplication_1'
>>>>> main.c:5: error: ‘for’ loop initial declarations are only allowed in
>>>>> C99 mode
>>>>> "/usr/bin/make"  -f nbproject/Makefile-Debug.mk
>>>>> dist/Debug/GNU-Linux-x86/cppapplication_1
>>>>> main.c:5: note: use option -std=c99 or -std=gnu99 to compile your code
>>>>>
>>>>>
>>>>> --
>>>>> Ubuntu-eg mailing list
>>>>> Ubuntu-eg at lists.ubuntu.com
>>>>> Modify settings or unsubscribe at:
>>>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-eg
>>>>>
>>>>>
>>>>
>>>> --
>>>> Ubuntu-eg mailing list
>>>> Ubuntu-eg at lists.ubuntu.com
>>>> Modify settings or unsubscribe at:
>>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-eg
>>>>
>>>>
>>>
>>> --
>>> Ubuntu-eg mailing list
>>> Ubuntu-eg at lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-eg
>>>
>>>
>>
>> --
>> Ubuntu-eg mailing list
>> Ubuntu-eg at lists.ubuntu.com
>> Modify settings or unsubscribe at:
>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-eg
>>
>>
>
> --
> Ubuntu-eg mailing list
> Ubuntu-eg at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-eg
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-eg/attachments/20101204/6f7a51ca/attachment.html>


More information about the Ubuntu-eg mailing list