Personal Note:Eclipse IDE for C/C++ Developers

MinGW-w64 - for 32 and 64 bit Windows

url:http://sourceforge.net/projects/mingw-w64/
mingw-w64-install.exe
C:\Users\leo>gcc --version
gcc (i686-posix-dwarf-rev1, Built by MinGW-W64 project) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Eclipse IDE for C/C++ Developers:

url:http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers/lunasr1
download:eclipse-cpp-luna-SR1-win32.zip
Package Description
An IDE for C/C++ developers with Mylyn integration.
This package includes:
    C/C++ Development Tools
    Eclipse Git Team Provider
    Mylyn Task List
    Remote System Explorer
Detailed features list

问题:Unresolved inclusion: <stdio.h>
解决办法:Project->Properties->C/C++ Build->Environment
Add:
name:Path
value:C:\Program Files\mingw-w64\i686-4.9.2-posix-dwarf-rt_v3-rev1\mingw32\bin
问题:"This file requires compiler and library support for the ISO C++ 2011 standard." 需要支持C++11
解决办法:Project->Properties->C/C++ Build->Settings->Tool Settings->Cross GCC Complier->Miscellaneous->Other flags:
        添加: -std=c++11 "-c -fmessage-length=0 -std=c++11"; GCC在make时, 添加C++11的特性.
        

'for' loop initial declarations are only allowed in C99 or C11 mode
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    int len =10;
    int arr[len];

    for(int i=0;i<len;i++){    //'for' loop initial declarations are only allowed in C99 or C11 mode
        printf("index:%d arr:%d \n",i,arr[i]);
    }

return EXIT_SUCCESS;
}

#include <stdio.h>
#include <stdlib.h>

int main(void)
{
    int len =10;
    int i;
    int arr[len];

    for(i=0;i<len;i++){
        printf("index:%d arr:%d \n",i,arr[i]);
    }

return EXIT_SUCCESS;
}

A program file was not specified in the launch configuration.

.exe未指定


/*
 * array.c
 *
 *  Created on: 2015年2月21日
 *      Author: leo
 */

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>

int main(void)
{
    int32_t len =10;
    int32_t i;
    int32_t a;
    int32_t arr[len];

    for(a=0;a<len;a++){
        arr[a]=0;
    }

    for(i=0;i<len;i++){
        printf("index:%d arr:%d \n",i,arr[i]);
    }

return EXIT_SUCCESS;
}

index:0 arr:0
index:1 arr:0
index:2 arr:0
index:3 arr:0
index:4 arr:0
index:5 arr:0
index:6 arr:0
index:7 arr:0
index:8 arr:0
index:9 arr:0

leo_618@2015-02-21
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值