How to compile to c11 standard (ISO/IEC 9899:2011 (C11)) in codelite in C

2 Answers

0 votes
From Menu: Settings -> Build Settings... -> Compilets

On Build Settings Dialog: gnu gcc -> Compiler Option: Click On New... button and Add Switch: -std=c11

On Build Settings Dialog: gnu gcc -> Linker Options: Click On New... button and Add Switch: -std=c11

On Workspace -> Open Active Project Settings... (Alt-F7): Common Settings -> Compiler -> C Compiler Options: Click and Add -std=c11


answered Apr 21, 2015 by avibootz
edited May 18, 2015 by avibootz
0 votes

// Example: compile with -std=c11 switch

#include <stdio.h>

int main(int argc, char **argv) 
{
    int a = 20;
    
    printf("a = %d\n", a);
    
    int b = 30;
    
    printf("b = %d\n", b);
    
    int c = 30;
    
    printf("c = %d\n", c);
    
    return 0;
}


/*
run:

a = 20
b = 30
c = 30

*/


answered Apr 21, 2015 by avibootz

Related questions

2 answers 223 views
1 answer 260 views
1 answer 139 views
1 answer 176 views
1 answer 168 views
1 answer 156 views
156 views asked Apr 22, 2022 by avibootz
...