程序在dev上编译没有问题,在vs上不行,求大神告知原因

void MyStr:: Set(int _len){
char ch[_len];
cin>>ch;
error C2057: 应输入常量表达式
1>d:\c++编程\vs2008\projects\实验九\实验九\mystr.cpp(43) : error C2466: 不能分配常量大小为 0 的数组
1>d:\c++编程\vs2008\projects\实验九\实验九\mystr.cpp(43) : error C2133: “ch”: 未知的大小
在dev上编译没有问题,在vs上不行,求大神告知原因

2个回答

因为dev使用的是GCC编译器,该编译器是允许使用变长数组的
而VS里的编译器是不允许变长数组的,数组的长度必须是个常量,可以使用new或者malloc来替代
PS:使用变长数组也要小心,有不少坑

VC++ 2008不支持变量作为数组大小,你需要用new代替
char * ch = new char[_len];

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
小白求教C语言,跪求大神解答!
我在笔记本电脑上用VS2015编写了一个与数学有关的C程序,并将编译的exe文件复制,拿到家里的台式机上试试,却不能用,提示缺少什么dll文件。。同样我用Dev c++ 编译出的C程序确能在上面正常运行!求教为什么,我该怎么做vs2015编译出的也能在别的没有安装vs2015的机子上运行编译出的exe文件?求各路大神详细解答。
devc++编译运行的程序出现Error216该如何解决?
在使用devc++之后,忽然有一天不知道发生了什么,编译出来的东西无法运行了 如图: ![图片说明](https://img-ask.csdn.net/upload/201908/13/1565660889_452505.png) 遇到这种情况该如何解决? 感觉是某个设置的问题,dev重装/mingw都试过没有用 求大神帮忙
关于C++语言的编译问题,我用的Dev,求大神指点代码的问题
#include <iostream> #include <string.h> #include <stdlib.h> #include <fstream> using namespace std; typedef struct Infor { char name[10]; char infor[100]; }Infor; typedef struct { int arcs[50][50]; int vexnum,arcnum; }Mgraph; typedef struct { char password[6]; char n_password[6]; }PassWord; int LocateVex(Mgraph &G,char a[10]) { for(int i=0;i<G.vexnum;i++) { if(strcmp(G.vexs[i].name,a)==0) { return i; } } cout<<"输入有误!"<<endl; return -1; } void Creategraph(Mgraph &G,PassWord &pw) { ifstream inFile("graph.txt"); char v1[10],v2[10]; int i,j,k,w; inFile>>G.vexnum>>G.arcnum; for(i=0;i<G.vexnum;i++) { inFile>>G.vexs[i].name; inFile>>G.vexs[i].infor; } for(i=0;i<50;i++) { for(int j=0;j<50;j++) { G.arcs[i][j]=10000; } } for(k=0;k<G.arcnum;k++) { inFile>>v1>>v2>>w; i=LocateVex(G,v1); j=LocateVex(G,v2); if(i==j) { G.arcs[i][j]=0; } else { G.arcs[i][j]=w; G.arcs[j][i]=G.arcs[i][j]; } } for(int m=0;m<6;m++) { inFile>>pw.password[m]; } } void infor(Mgraph &G) { char a[10]; int b=1; while(b) { for(int i=0;i<G.vexnum;i++) { cout<<G.vexs[i].name<<endl; } cout<<"请输入要查找的景点信息"<<endl; cin>>a; for(i=0;i<G.vexnum;i++) { if(strcmp(G.vexs[i].name,a)==0) { cout<<G.vexs[i].infor<<endl; b=0; } } if(b!=0) { cout<<"输入错误请重新输入!!"<<endl; } cout<<"返回前台系统按0,继续查找按1"<<endl; cin>>b; } } void ShortestPath (Mgraph G)//最短路径 { char a[10],d[10]; int b=1,i,j,v,v0,w; int Dist[100],S[100],Path[100]; int n=G.vexnum; while(b) { for(i=0;i<G.vexnum;i++) { cout<<G.vexs[i].name<<endl; } for(i=0;i<100;i++) { Dist[i]=9999; S[i]=0; Path[i]=-1; } cout<<"请输入要查询路径的两个景点"<<endl; cin>>a; cin>>d; v0=LocateVex(G,a); j=LocateVex(G,d); for(v=0;v<n;v++) { S[v]=0; Dist[v]=G.arcs[v0][v]; if(Dist[v]<9999) Path[v]=v0; else Path[v]=-1;//v无前趋 } Dist[v0]=0; S[v0]=1; for(i=1;i<n;i++) { int min=9999; for(w=0;w<n;w++) if(!S[w]&&Dist[w]<min) { v=w; min=Dist[w]; }//w顶点离v1顶点更近 S[v]=1; for(w=0;w<n;w++)//更新当前最短路径及距离 if(!S[w]&&(Dist[v]+G.arcs[v][w]<Dist[w])) { Dist[w]=Dist[v]+G.arcs[v][w]; Path[w]=v; }//end if }//end for cout<<"距离为:"<<endl; cout<<Dist[j]<<endl; cout<<"要经过"<<endl; int f=Path[j],e[100]; i=0; while(f!=-1) { e[i]=f; f=Path[f]; i++; } for(v=i-1;v>=0;v--) { cout<<G.vexs[e[v]].name<<"---->"; } cout<<G.vexs[j].name<<endl; cout<<"返回后台系统按0,继续删除按1"<<endl; cin>>b; } } void reception(Mgraph &G)//前台 { int n; while(1) { system("cls");//清屏 cout<<"*********************欢迎使用前台系统************************"<<endl; cout<<"(1)景点信息查询"<<endl; cout<<"(2)问路查询"<<endl; cout<<"(0)返回上一级菜单"<<endl; cin>>n; switch(n) { case 1: infor(G); break; case 2: ShortestPath (G); break; case 0: return; break; default: cout<<"您的输入有误,任意键继续..."<<endl; getch(); } } } void WriteTXT(Mgraph G,PassWord pw)//将更改后的信息写如graph.txt { int i,j; ofstream outFile("graph.txt"); if(!outFile) { cerr<<"cannot open my.txt"<<endl; exit(1); } outFile<<G.vexnum<<" "<<G.arcnum<<endl; for(i=0;i<G.vexnum;i++) { outFile<<G.vexs[i].name<<" "<<G.vexs[i].infor<<endl; } for(i=0;i<G.vexnum;i++) { for(j=0;j<G.vexnum;j++) { if(G.arcs[i][j]!=10000) { outFile<<G.vexs[i].name<<" "<<G.vexs[j].name<<" "<<G.arcs[i][j]<<endl; G.arcs[j][i]=10000; } } } Creategraph(G,pw); } void ChangeP(Mgraph &G,PassWord pw)//修改一个已有景点的相关信息 { char a[10]; int b=1,i; while(b) { for(i=0;i<G.vexnum;i++) { cout<<G.vexs[i].name<<endl; } cout<<"请输入要修改的景点的信息"<<endl; cin>>a; for(i=0;i<G.vexnum;i++) { if(strcmp(a,G.vexs[i].name)==0) { cout<<G.vexs[i].infor<<endl; cout<<"请输入该景点的修改后的信息"<<endl; cin>>G.vexs[i].infor; cout<<"修改成功!!!!"<<endl; b=0; } } if(b!=0) { cout<<"error!输入有误!"<<endl; } cout<<"保存请按1,不保存请按2"<<endl; int c; cin>>c; if(c==1) { WriteTXT(G,pw); } cout<<"返回后台系统按0,继续修改按1"<<endl; cin>>b; } } void deleteP(Mgraph &G,PassWord pw)//删除景点信息 { char a[10]; int b=1,i,j,k; while(b) { for(i=0;i<G.vexnum;i++) { cout<<G.vexs[i].name<<endl; } cout<<"请输入要删除的景点的信息"<<endl; cin>>a; for(i=0;i<G.vexnum;i++) { if(strcmp(a,G.vexs[i].name)==0) { for(j=i;j<G.vexnum-1;j++) { G.vexs[j]=G.vexs[j+1]; for(k=0;k<G.vexnum-1;k++) G.arcs[k][j]=G.arcs[k][j+1]; } for(j=i;j<G.vexnum-1;j++) { for(k=0;k<G.vexnum-1;k++) G.arcs[j][k]=G.arcs[j+1][k]; } G.vexnum--; G.arcnum=0; for(i=0;i<G.vexnum;i++) { for(j=0;j<G.vexnum;j++) { if(G.arcs[i][j]!=10000) G.arcnum++; } } G.arcnum=G.arcnum/2; b=0; cout<<"删除成功!!!!"<<endl; } } if(b!=0) { cout<<"输入有误!请看清楚!"<<endl; } cout<<"是否要保存?保存按1,不保存按2"<<endl; int c; cin>>c; if(c==1) { WriteTXT(G,pw); } cout<<"返回后台系统按0,继续删除按1"<<endl; cin>>b; } } void deleteL(Mgraph &G,PassWord pw)//删除路径 { char a[10],d[10]; int b=1,i,j; while(b) { for(i=0;i<G.vexnum;i++) { for(j=0;j<G.vexnum;j++) { if(G.arcs[i][j]!=10000) { cout<<G.vexs[i].name<<" "<<G.vexs[j].name<<" "<<G.arcs[i][j]<<endl; } } } cout<<"请输入要删除的路径连接的两个景点名"<<endl; cin>>a; cin>>d; i=LocateVex(G,a); j=LocateVex(G,d); if(G.arcs[i][j]!=10000) { G.arcs[i][j]=10000; G.arcs[j][i]=10000; b=0; cout<<"删除成功!!"<<endl; G.arcnum--; } if(b!=0) { cout<<"输入有误!!"<<endl; } cout<<"保存请按1,不保存请按2"<<endl; int c; cin>>c; if(c==1) { WriteTXT(G,pw); } cout<<"返回后台系统按0,继续删除按1"<<endl; cin>>b; } } ///////////////////////////////////选作////////////////////////// void Add(Mgraph &G,PassWord &pw)//增加景点 { cout<<"请输入景点名称:"<<endl; cin>>G.vexs[G.vexnum].name; cout<<"请输入景点信息:"<<endl; cin>>G.vexs[G.vexnum].infor; for(int i=0;i<G.vexnum;i++) G.arcs[G.vexnum][i]=10000; for(i=0;i<G.vexnum;i++) G.arcs[i][G.vexnum]=10000; G.arcs[G.vexnum][G.vexnum]=0; G.vexnum++; cout<<"增加成功!"<<endl; cout<<endl; WriteTXT(G,pw); system("pause");system("cls"); } //////////////////////////////////////////////// bool password(PassWord &pw)//判断密码 { char p[6]; cout<<"请输入6位密码:"<<endl; for(int e=0;e<6;e++) { p[e]=getch(); cout<<"*"; cout.flush(); } cout<<endl; for(e=0;e<6;e++) { if(p[e]!=pw.password[e])return false; } cout<<endl; return true; } void backstage(Mgraph &G,PassWord pw)//后台函数 { int n; while(1) { system("cls"); cout<<"*********************欢迎使用后台系统************************"<<endl; cout<<"(1)修改一个已有景点的相关信息"<<endl; cout<<"(2)删除一个景点及其相关信息"<<endl; cout<<"(3)删除一条路径"<<endl; cout<<"(4)增加景点"<<endl; cout<<"(0)返回上一级菜单"<<endl; cin>>n; switch(n) { case 1: ChangeP(G,pw); break; case 2: deleteP(G,pw); break; case 3: deleteL(G,pw); break; case 4: Add(G,pw); break; case 0: return; break; default: cout<<"您的输入有误,任意键继续..."<<endl; getch(); } } } //////////////////////////////////////////////////////////////////////////////////////////////// void main()//主函数 { Mgraph G; PassWord pw; Creategraph(G,pw); int n,m=1; while(m) { system("cls"); cout<<"*********************欢迎使用北林游览系统************************"<<endl; cout<<"(1)前台服务(游客身份登陆)"<<endl; cout<<"(2)后台服务(管理员身份登陆)"<<endl; cout<<"(0)退出"<<endl; cin>>n; switch(n) { case 1: reception(G); break; case 2: if(password(pw)==true) { backstage(G,pw);//后台函数,并调用 } else cout<<"密码输入错误!!"; break; case 0: m=0; break; default: cout<<"您的输入有误,任意键继续..."<<endl; getch(); } } } ![图片说明](https://img-ask.csdn.net/upload/201706/03/1496468402_744084.png)
在C++中使用shellapi.h报错,在线等!
# 求大神指点:在C++中使用shellapi.h报错 这个是在Dev-c++里面运行的一个头文件,是我比较喜欢用的,但是今天用着的时候突然就给我跳转到头文件的编译区,一下子把我整懵啦!我的这个头文件是C++库中的一个头文件:shellapi.h 还是先来说一下这个头文件吧:这个头文件我只要是用来配合着不用cmd打开网页,但是今天遇到这个问题的时候我又试了一下cmd,发现:**cmd竟然没有报错!** 但是在我试shellapi.h的时候**报错了!**,所以我需要得到各位大佬们的帮助,我会把我的错误的一小段截取的代码写在下面,~~但我也希望能够通过我这次的经历,来帮助大家不要再自己的程序里面犯我的这种错误~~ ,但是话说回来,我还是需要大佬的~~援助~~ (好像因该是“帮助”)这个就是我错误代码那一行的截图:→![Alt](https://img-blog.csdnimg.cn/20200314182209860.png#pic_center =600x60) 再来看一下我截取的一段代码吧: ```cpp const TCHAR szOperation[] = _T("open"); const TCHAR szURL[] = _T("https://www.baidu.con/");//这里我就用百度举个例吧 int WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR lpCmd, int nShow); { HINSTANCE hRslt = ShellExecute(NULL, szOperation,szURL, NULL, NULL, SW_SHOWNORMAL); assert(hRslt > (HINSTANCE)HINSTANCE_ERROR); } ``` 在这段代码之前我用的头文件也给大佬看一下吧: ```cpp #include <tchar.h> #include <assert.h> #include <shellapi.h> #include <iostream> #include <stdio.h> #include <unistd.h> #include <windows.h> ``` 最后报错的是头文件的不知道什么东西,就~~莫名其妙的~~ 弹出来了 ![在这里插入图片描述](https://img-blog.csdnimg.cn/202003141843435.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2R4ZmpkdnNpamRmaGl2,size_16,color_FFFFFF,t_70#pic_center =500x) 报错的代码就是:(如下) ```cpp DECLARE_HANDLE (HDROP); ``` emm...这个是头文件<shellapi.h>里面报错的,还请各位大佬解读一下,我在线等!
dev点击编译跳出Compile Progress框
![图片说明](https://img-ask.csdn.net/upload/201801/23/1516713728_50875.png) 我每次编译时会跳出这个 然后运行的时候就提示没有编译 不知道为什么会这样 哪位大神可以给我解答一下
用C语言解决一元多项式求导的问题,要求用单链表解决,为什么我这个的输出这么奇怪?
实验要求 (1)输人说明:以指数递降方式输人多项式非零项系数和指数(绝对值均为不超过1000的整数)。数字间以空格分隔。 (2)输出说明:以与输入相同的格式输出导数多项式非零项的系数和指数。数字间以空格分隔,但结尾不能有多余空格。 (3)测试用例:![图片说明](https://img-ask.csdn.net/upload/202003/20/1584665236_660724.png) 这是我的代码: ``` #include <stdio.h> #include <stdlib.h> #include <malloc.h> typedef struct Link{ int c; int e; struct Link *next; }LinkNode; void InitList(LinkNode *&L){ L=(LinkNode *)malloc(sizeof(LinkNode)); L->next=NULL; }//建立头结点 void CreateListF(LinkNode *&L,int n) { void InitList(LinkNode *&L); InitList(L); LinkNode *s,*r; int i; L=(LinkNode *)malloc(sizeof(LinkNode)); r=L; for (i=0;i<n;i++){ s=(LinkNode *)malloc(sizeof(LinkNode)); r->next=s; r=s; scanf("%d %d ",&s->c,&s->e); } r->next=NULL; }//建立链表 void change(LinkNode *L){ LinkNode *p=L; while(p!=NULL){ p=p->next; p->c=(p->e)*(p->c); p->e=(p->e)-1; if(p->next==NULL){ p->c=0; p->e=-1; } } free(p); }//求导函数 void DispList(LinkNode *L,int n){ int i=0; LinkNode *p=L->next; printf("求导后的系数和指数"); while (i<n) { printf("%d %d ",p->c,p->e); p=p->next; i++; } printf("\n"); }//输出链表 void DestroyList(LinkNode *&L){ LinkNode *pre=L,*p=L->next; while (p!=NULL) { free(pre); pre=p; p=pre->next; } free(pre); }//销毁链表函数 int main(void) { void CreateListF(LinkNode *&L,int n); void DispList(LinkNode *L,int n); void change(LinkNode *L); void InitList(LinkNode *&L); void DestroyList(LinkNode *&L); int m; LinkNode *L; InitList(L); printf("输入系数与指数总数:"); scanf("%d",&m); printf("输入系数和指数:"); CreateListF(L,m/2); DispList(L,m/2-1); DestroyList(L); return 0; } ``` 结果运行出来是这样: 输入系数与指数总数:4 输入系数和指数:1,1,1,0, 求导后的系数和指数1 0 要么就是: 输入系数与指数总数:6 输入系数和指数:1,2, 求导后的系数和指数1 0 7738368 0 求大神解答,弄了一下午了,本人将万分感激 用的编译器是DeV.C++
用dev编译器编译一个C语言贪吃蛇的小游戏
自己编译的总是运行不了 如果哪位大神能帮我,我将万分感谢。最好能什么修改背景图的。
[Dev-C++项目]一个程序错误
个人自行编译的一个五子棋小程序,想给程序变得高大上些,把程序放进了项目里面,加个图标,但编译之后程序变出了问题。 ↓如图所示↓ ![图片说明](https://img-ask.csdn.net/upload/201908/15/1565835140_56284.png) 注:代码行没有错误 再配张图说明下 ![图片说明](https://img-ask.csdn.net/upload/201908/15/1565835243_653702.png) 小白一枚,求大神指教!
急!!!Dev-c++在编译时突然未响应了
急!!!Dev-c++在编译时突然未响应了,可是代码还未保存,有好几百行啊,还有挽救的办法吗???请各位大神帮忙啊!谢谢
CCF CSP测试 16-12-01 源代码如下 为什么会编译错误?dev正常跑?求大神看看
问题描述   在一个整数序列a1, a2, …, an中,如果存在某个数,大于它的整数数量等于小于它的整数数量,则称其为中间数。在一个序列中,可能存在多个下标不相同的中间数,这些中间数的值是相同的。   给定一个整数序列,请找出这个整数序列的中间数的值。 输入格式   输入的第一行包含了一个整数n,表示整数序列中数的个数。   第二行包含n个正整数,依次表示a1, a2, …, an。 输出格式   如果约定序列的中间数存在,则输出中间数的值,否则输出-1表示不存在中间数。 样例输入 6 2 6 5 6 3 5 样例输出 5 #include stdio.h> #include stdlib.h> #include string.h> int main() //因为某种原因 编译出错 { int d; int i; int j; int cargo; int cargo2; int cargo3; int count; int count2; float k; count=0; count2=0; scanf("%d",&d); int a[d]={}; for(i=0;i<d;i++)//(0,1,2,...d-1)d个 { scanf("%d",&a[i]); } for(i=0;i<d;i++) //两个循环排序 大的往后放 for(j=i+1;j<d;j++) {if (a[i]>a[j]) { cargo=a[j]; a[j]=a[i]; a[i]=cargo; } } if(d%2==0)//如果是偶数 { cargo=int(d/2); cargo2=a[cargo]; cargo=cargo-1; cargo3=a[cargo]; if(cargo2!=cargo3)//如果路中间两个数不相等,就没有中间数 printf("-1"); else//否则就测试大于和小于的数 { for(i=0;i<d;i++) {if(a[i]<cargo2) count=count+1; if(a[i]>cargo2) count2=count2+1; } if(count==count2) printf("%d ",cargo2); } } if(d%2!=0)//printf("输入的是奇数") ; { cargo=int((d-1)/2);//找到中间的数 cargo2=a[cargo]; for(i=0;i<d;i++) {if(a[i]<cargo2) count=count+1; if(a[i]>cargo2) count2=count2+1; } if(count==count2) printf("%d ",cargo2); else printf("-1"); } return 0; }
想要实现样式的条件编译,用的vue+element ui
### js的条件编译 + 安装 ``` npm i -D js-conditional-compile-loader ``` + 配置webpack webpack.base.conf.js文件中在rules配置编译条件如下 ``` module: { rules: [ { test: /\.js$/, include: [resolve('src'), resolve('test')], use: [ //step-2 'babel-loader?cacheDirectory', //step-1 { loader: 'js-conditional-compile-loader', options: { isDebug: process.env.NODE_ENV === 'development', // optional, this is default isHK: process.env.npm_config_hk, // any name, used for /* IFTRUE_isHK ...js code... FITRUE_isHK */ } }, ] }, //other rules ] } ``` + 项目中使用 插件支持IFDEBUG和IFTRUE两个条件编译指令。用法是:在js代码的任意地方以/*IFDEBUG或/*IFTRUE_xxx开头,以FIDEBUG*/或FITRUE_xxx*/结尾,中间是被包裹的js代码。xxx是在webpack中指定的条件属性名,如上面的isHK。 在项目代码中设置如下 ``` { name: '用户部门', value: 'usrDepartId' }, /* IFTRUE_isHK */ { name: '舱门管理', value: 'id' }, /* FITRUE_isHK */ { name: '手机号', value: 'telphone' }, ``` + 编译执行 在终端输入**npm run dev –hk** 可以看到舱门管理 在终端输入**npm run dev** 可以看到舱门管理被隐藏 ### 样式的条件编译 问题来了,样式的条件编译我想用以下两个方式实现,都遇到了问题,请大神指点: 对vue接触时间较短,框架底层不了解,不知道怎么进行设置,在线等 #### 1. 类似js条件编译,在webpack中进行配置 进行如下设置后,样式的条件编译无法实现 ``` { test: /\.(css|html|vue)(\?.*)?$/, // loader: 'style-loader!css-loader', include: [resolve('src'), resolve('test'), resolve('node_modules/webpack-dev-server/client')], use: [ //step-2 'babel-loader?cacheDirectory', //step-1 { loader: 'css-loader', options: { isDebug: process.env.NODE_ENV === 'development', // optional, this is default envTest: process.env.ENV_CONFIG === 'test', isHK: process.env.npm_config_hk, isNT: process.env.npm_config_nt, // any name, used for /* IFTRUE_ntFlag ...js code... FITRUE_ntFlag */ npm run build-demo --nt } }, ] }, ``` #### 2. 设置全局变量,通过条件渲染以实现不同效果 比如设置全局变量 *versionType为1或2* 执行 **npm run dev --hk** 时versionType为1 执行 **npm run dev --nt** 时versionType为2 问题来了,在终端执行 **npm run dev –hk** 时,在哪设置全局变量versionType=1(执行不同分支代码,实现1hk、2nt) 以下代码为全局变量,需要在哪设置: ``` /* IFTRUE_isHK */ Var versionType=1, /* FITRUE_isHK */ /* IFTRUE_isNT */ Var versionType=2, /* FITRUE_isNT */ ``` 想要实现样式的条件编译,用的vue+element ui 比如同一套代码,有个列表显示数据不一致,修改内容的时候文本框内容不一致 --- 更新,找了一些资料,最终解决方案是设置 **全局变量**,然后通过条件渲染实现样式的条件编译
Python3.5安装pyav时出现[WinError 2],如何解决?
**环境: ** Windows10 x64 Python3.5.0 pip与setuptools均为最新版 已根据GitHub上的requirements.txt安装所有依赖 ffmpeg-shared与ffmpeg-dev的版本均为4.0-win32 **安装内容: ** av(pyav) 简介:Python上的ffmpeg接口 版本:7.0.0(别的版本也尝试过) **尝试过的安装方式:** 1 . PyPI ``` pip install av==7.0.0 REM 系统自动尝试两次,每次均报错 ``` 2 . setuptools ``` python setup.py build --ffmpeg-dir=D:\ffmpeg-win32 REM 这↑句发生错误 python setup.py install REM 这句因为编译发生错误所以没有被执行 ``` **报错信息:** ``` ...(过长省略) running cythonize building 'av.buffer' extension error: [WinError 2] 系统找不到指定的文件。 ``` 望大神指教
一个简单的单独编译测试。用的ide是dev C++,第一次成功,但后来几次打开都编译失败,求大神赐教
![图片说明](https://img-ask.csdn.net/upload/201907/27/1564207401_574590.png) ![图片说明](https://img-ask.csdn.net/upload/201907/27/1564207304_154157.png) //golf.h #ifndef GOLF_H_ #define GOLF_H_ const int length=20; struct golf { char fullname[length]; int handicap; }; void setgolf(golf &,const char*,int); int setgolf(golf &); void handicap(golf &,int); void showgolf(const golf &); #endif //golf.cpp #include<iostream> #include<cstring> #include"golf.h" static int i; void setgolf(golf & g,const char* name,int hc) { for(i=0;i<strlen(name);i++) g.fullname[i]=name[i]; g.handicap=hc; } int setgolf(golf & g) { std::cout<<"Enter your name:"; std::cin.getline(g.fullname,length); if(g.fullname[0]) { std::cout<<"Enter your num:"; if(std::cin>>g.handicap) { std::cin.get(); return 1; } else return 0; } else return 0; } void handicap(golf & g,int hc) { g.handicap=hc; } void showgolf(const golf & g) { using namespace std; cout<<"FULLNAME "; for(i=0;i<strlen(g.fullname);i++) cout<<g.fullname[i]; cout<<endl<<"HANDICAP "<<g.handicap<<endl; } //execute_golf #include"golf.h" const int size=10; /*void setgolf(golf &,const char*,int); int setgolf(golf &); void handicap(golf &,int); void showgolf(const golf &);*/ int main() { int i; golf *pc=new golf[size]; for(i = 0;i < size;i++) { if(!setgolf(*(pc+i))) break; } for(int j=0;j<i;j++) showgolf(*(pc+j)); }
哈夫曼编码译码程序出现问题 求大神解答
这两个分别是我在DEV c++ 和VC6.0运行的结果,在VC运行时就出现了程序终止的画面,而且这个程序在编码和译码的时候都不能对空格进行编码和译码 译码在超过一定长度的时候就会不进行译码 求大神解答 ```#include<stdio.h> #include<stdlib.h> #include<string.h> #include<limits.h> #define N 28 #define MAX 100 typedef struct{ double weight; unsigned int parent,lchild,rchild; }HTNode,*HuffmanTree; typedef char * * HuffmanCode; void Select(const HuffmanTree &HT,int n,int &s1,int &s2);//找出权值最小的两个节点 void HuffmanCreat(HuffmanTree &HT,HuffmanCode &HC,double *w,int n);//建立哈夫曼树 void HuffmanCoding(HuffmanCode &HC,char *key,int n);//编码 void HuffmanDecoding(HuffmanCode &HC,char *key,int n);//译码 int main() { int i; char choice,flag=1; char key[N]={'0',' ','E','T','O','A','N','I','R','S','H','D','L','C','U','F','M','P','Y','W','G','B','V','K','X','J','Q','Z'}; double w[N]={0,0.2,0.105,0.071,0.0644,0.063,0.059,0.054,0.053,0.052,0.047,0.035,0.029,0.023,0.0225,0.0221,0.021,0.0175,0.012,0.011,0.0105,0.008,0.003,0.002,0.001,0.001}; //w权数组,key关键字数组 HuffmanTree HT; HuffmanCode HC; HuffmanCreat(HT,HC,w,N-1); while(flag) { printf("\n"); printf(" **************************************"); printf("\n **1---------------显示编码**"); printf("\n **2---------------进行编码**"); printf("\n **3---------------进行译码**"); printf("\n **4---------------退出 **\n"); printf(" ****************************************"); printf("\n"); printf(" 请输入选择的编号:"); scanf("%c",&choice); switch(choice) { case '1':{ printf("\n"); for(i=1;i<N;i++) printf("%c:%s\n",key[i],HC[i]); printf("\n按任意键返回..."); getchar(); };break; case '2':{ printf("请输入要编译的字符(以#号结束):\n"); HuffmanCoding(HC,key,N-1); printf("\n按任意键返回..."); getchar(); };break; case '3':{ printf("请输入编码(以#号结束):"); HuffmanDecoding(HC,key,N-1); printf("\n按任意键返回..."); getchar(); };break; case '4':flag=0;break; default:system("cls"); } } return 0; } void Select(const HuffmanTree &HT,int n,int &s1,int &s2){ int i; s1=s2=0; double min1=INT_MAX;//最小值 double min2=INT_MAX;//次小值 for(i=1;i<=n;i++) { if(HT[i].parent==0) { if(HT[i].weight<min1) { min2=min1; s2=s1; min1=HT[i].weight; s1=i; } else if((HT[i].weight>=min1)&&(HT[i].weight<min2)) { min2=HT[i].weight; s2=i; } else{ ; } } } }//选择两个无父的权值最小的节点 其序号为s1,s2 void HuffmanCreat(HuffmanTree &HT,HuffmanCode &HC,double *w,int n)//建立哈夫曼树 { int s1,s2; int m=2*n-1;//n个叶子节点的哈夫曼树有2n-1个节点 if(n<=1)return; int i,c,f; char *cd; HT=(HuffmanTree)malloc((m+1)*sizeof(HTNode)); for(i=1;i<=n;i++){ HT[i].weight=w[i]; HT[i].lchild=0; HT[i].rchild=0; HT[i].parent=0; }//初始化前n个节点 for(i=n+1;i<=m;i++){ HT[i].weight=0; HT[i].lchild=0; HT[i].rchild=0; HT[i].parent=0; }//初始化后n-1个节点 for(i=n+1;i<=m;i++){ Select(HT,i-1,s1,s2); HT[s1].parent=i; HT[s2].parent=i; HT[i].lchild=s1; HT[i].rchild=s2; HT[i].weight=HT[s1].weight+HT[s2].weight; } HC=(HuffmanCode)malloc((n+1)*sizeof(char *));//分配n个字符编码的头指针变量 cd=(char * )malloc(n*sizeof(char));//分配求编码的存储空间 cd[n-1]='\0';//编码结束符 for(i=1;i<=n;i++){ int start=n-1;//编码结束符位置 for(c=i,f=HT[i].parent;f!=0;c=f,f=HT[f].parent){ if(HT[f].lchild==c) cd[--start]='0'; else cd[--start]='1'; } HC[i]=(char *)malloc((n-start)*sizeof(char)); strcpy(HC[i],&cd[start]);//从cd复制编码到HC } free(cd); } void HuffmanCoding(HuffmanCode &HC,char *key,int n)//编码 问题 不接收空格 { char string[MAX]; int i,j; scanf("%s",string); for(i=0;string[i]!='#';i++) { for(j=1;j<=n;j++) { if(string[i]==key[j]) { printf("%s",HC[j]); break; } } } return; } void HuffmanDecoding(HuffmanCode &HC,char *key,int n)//译码 问题 空格符 v以后不再输出 { char copy[MAX],code[MAX];//copy用来提取code中的字符串 int i,j,k; scanf("%s",code); for(i=2;code[0]!='#';i++) { strncpy(copy,code,i); for(j=1;j<=n;j++) { if(strcmp(copy,HC[j])==0) { printf("%c",key[j]); for(k=0;code[k-1]!='#';k++) { code[k]=code[k+i];//删除已经比对过的字符串 copy[k]=copy[k+i];//初始化copy数组 } i=1; break; } } } return; } ``` (https://img-ask.csdn.net/upload/201606/14/1465910048_999009.png)说明](https://img-ask.csdn.net/upload/201606/14/1465910033_309322.png)
为什么在codeblocks里运行正常的程序,在devc++中却出现[Error] ld returned 1 exit status?
我照着教材在dev c++中打了一个自定义数组的库,第一次对头文件点编译图标毫无反应,对cpp文件点运行说源文件未编译。我只好把dev c++卸载了重装。 第二次再对头文件点编译无误。但对实现头文件的cpp点编译报[Error] ld returned 1 exit status。对应用的cpp点编译也是同一个错,点运行还是说源文件未编译。 我把相同的代码复制到codeblocks里,完全正常。 代码应该没问题。因为从没运行成功过,所以也不存在后台运行未关闭。我的电脑也没有装杀毒软件。马上机考只能用dev c++,但我实在不知道问题出在哪。求各位大神帮帮小弟! ![图片说明](https://img-ask.csdn.net/upload/202001/03/1578045503_233989.png) 代码如下 array.h ``` #ifndef _array_h #define _array_h struct doublearray { int low,high; double *storage; }; bool initialize(doublearray &arr,int low,int high); bool insert(const doublearray &arr,int index,double value); bool fetch(doublearray &arr,int index,double &value); void cleanup(const doublearray &arr); #endif ``` array.cpp ``` #include <iostream> using namespace std; #include "array.h" bool initialize(doublearray &arr,int low,int high) { arr.low=low; arr.high=high; arr.storage=new double[high-low+1]; if(arr.storage!=NULL) return true; else return false; } bool insert(const doublearray &arr,int index,double value) { if(index<arr.low||index>arr.high) return false; arr.storage[index-arr.low]=value; return true; } bool fetch(doublearray &arr,int index,double &value) { if(index<arr.low||index>arr.high) return false; value=arr.storage[index-arr.low]; return true; } void cleanup(const doublearray &arr) { if(arr.storage) delete []arr.storage; } ``` arrayapply.cpp ``` #include "array.h" #include <iostream> using namespace std; int main() { doublearray array; double value; int low,high; cout<<"low high"<<endl; cin>>low>>high; if(!initialize(array,low,high)) { cout<<"get space failed"<<endl; return 1; } for(int i=low;i<=high;i++) { cout<<"array["<<i<<"]= "<<endl; cin>>value; insert(array,i,value); } int j; cout<<"第几个元素?"<<endl; cin>>j; if(fetch(array,j,value)) cout<<"array["<<j<<"]= "<<value<<endl; else cout<<"下标越界"<<endl; cleanup(array); return 0; } ```
PTA上的错误分析,求大神指点(#>д<)ノ
求解求解: 最近在PTA上刷题,先从简单的开始吧。。写一道题时在DEV上编译没什么问题,但是在PTA上提交之后说编译有错误,不知道怎么回事。 代码如下: #include <stdio.h> void printfN(int N); int main() { int N; printf("Inpute an positive number:"); scanf("%d",&N); printfN(N); return 0; } void printfN(int N) { if(N<1) printf("Ivalid Input!\n"); else { for(int i=1;i<=N;i++) printf("%d\n",i); } } 错误如是说: a.c:16:5: error: redefinition of 'main' int main() ^ a.c:4:5: note: previous definition of 'main' was here int main () ^ a.c: In function 'main': a.c:8:7: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%d", &N); ^ a.c: In function 'main': a.c:20:7: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result] scanf("%d",&N); ^
求大神们解释一下流程?从下午1点到晚上1点始终没捋清!!!
编译器是DEV 我是以个小白,希望大神们能解释的详细点!!! 在此跪谢了!![图片说明](https://img-ask.csdn.net/upload/201910/12/1570812965_844752.png) ![图片说明](https://img-ask.csdn.net/upload/201910/12/1570812992_868294.png) 代码第二次换了一下位置,结果无限输入和输出
求助大神 Linux下蓝牙搜索不到其他蓝牙设备的问题
在Linux下测试蓝牙,用的2.6.28内核,蓝牙模块是三星的swb-b23,其实内部是bcm4329模块,用的串口方式进行通信。在配置好内核驱动后,上层根据网上的教程交叉编译了bluez-lib、bluez-utils,然后将必要的文件移植到板子对应的目录下,现在hciattch也能连接上,hciconfig后也能收到本地蓝牙的地址,但就是搜索不到外部蓝牙设备同时外部设备也搜不到它,电路以前有同事做过应该没有问题,因为他是在Android上用的,参考意义有限。程序上也暂时没有发现问题,感觉好奇怪,觉得好像是自己的命令没有用正确。下面是蓝牙模块上电后的命名执行,有哪位大神看看帮帮忙啦,搞了好久了没有进展啊 ./hciattach -s 115200 /dev/ttySAC1 any 连接到对应的串口(用的串口1,波特率115200) ./hciconfig hci0 up 打开设备 ./hciconfig 查看参数 ./hciconfig hci0 iscan 配置蓝牙可被搜索到 ./hcitool scan 搜索蓝牙设备(搜不到啊!)
MinGw编译GMP库时出错,跪求大神解答
![出错截图](https://img-ask.csdn.net/upload/201512/11/1449818918_325729.jpg) Config.log如下: This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by GNU MP configure 6.1.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ ./configure CPPGLAGS=-D_USE_MINGW_ANSI_STDIO=0--enable-static --disable-shared ## --------- ## ## Platform. ## ## --------- ## hostname = Mr-Chen uname -m = i686 uname -r = 1.0.17(0.48/3/2) uname -s = MINGW32_NT-6.1 uname -v = 2011-04-24 23:39 /usr/bin/ uname -p = unknown /bin/ uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: . PATH: /usr/local/bin PATH: /mingw/bin PATH: /bin PATH: /d/ActivePerl/site/bin PATH: /d/ActivePerl/bin PATH: /c/Program Files (x86)/NVIDIA Corporation/PhysX/Common PATH: /c/Windows/system32 PATH: /c/Windows PATH: /c/Windows/System32/Wbem PATH: /c/Windows/System32/WindowsPowerShell/v1.0/ PATH: %QUARTUS_ROOTDIR%/bin PATH: /c/Program Files (x86)/Common Files/Ulead Systems/MPEG PATH: /c/Program Files (x86)/Microsoft SQL Server/80/Tools/Binn/ PATH: /d/Latex/CTEX/UserData/miktex/bin PATH: /d/Latex/CTEX/MiKTeX/miktex/bin PATH: /d/Latex/CTEX/CTeX/ctex/bin PATH: /d/Latex/CTEX/CTeX/cct/bin PATH: /d/Latex/CTEX/CTeX/ty/bin PATH: /d/Latex/CTEX/Ghostscript/gs9.05/bin PATH: /d/Latex/CTEX/GSview/gsview PATH: /d/Latex/CTEX/WinEdt PATH: /c/Program Files/Microsoft SQL Server/110/Tools/Binn/ PATH: /c/MinGW/bin/ PATH: /d/ActivePerl/site/bin/ PATH: /d/ActivePerl/bin/ PATH: /c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn/ PATH: /c/Program Files/Microsoft SQL Server/100/Tools/Binn/ PATH: /c/Program Files/Microsoft SQL Server/100/DTS/Binn/ PATH: /d/VS2010/VC/bin/ PATH: /d/MinGw/bin ## ----------- ## ## Core tests. ## ## ----------- ## configure:3055: checking build system type configure:3069: result: sandybridge-pc-mingw32 configure:3089: checking host system type configure:3102: result: sandybridge-pc-mingw32 configure:3139: checking for a BSD-compatible install configure:3207: result: /bin/install -c configure:3218: checking whether build environment is sane configure:3273: result: yes configure:3424: checking for a thread-safe mkdir -p configure:3463: result: /bin/mkdir -p configure:3470: checking for gawk configure:3486: found /bin/gawk configure:3497: result: gawk configure:3508: checking whether make sets $(MAKE) configure:3530: result: yes configure:3559: checking whether make supports nested variables configure:3576: result: yes configure:3705: checking whether to enable maintainer-specific portions of Makefiles configure:3714: result: no User: ABI= CC= CFLAGS=(unset) CPPFLAGS=(unset) MPN_PATH= GMP: abilist=64 x32 32 cclist=gcc icc cc configure:5749: gcc 2>&1 | grep xlc >/dev/null configure:5752: $? = 1 configure:5806: checking compiler gcc -O2 -pedantic -fomit-frame-pointer -m64 Test compile: configure:5820: gcc -O2 -pedantic -fomit-frame-pointer -m64 conftest.c >&5 conftest.c:1:0: sorry, unimplemented: 64-bit mode not compiled in configure:5823: $? = 1 failed program was: int main () { return 0; } configure:6909: result: no configure:5727: cc -c conftest.c >&5 configure:5730: $? = 0 configure:5733: checking whether cc is gcc configure:5735: result: yes configure:5749: cc 2>&1 | grep xlc >/dev/null configure:5752: $? = 1 configure:5806: checking compiler cc -O2 -pedantic -fomit-frame-pointer -m64 Test compile: configure:5820: cc -O2 -pedantic -fomit-frame-pointer -m64 conftest.c >&5 conftest.c:1:0: sorry, unimplemented: 64-bit mode not compiled in configure:5823: $? = 1 failed program was: int main () { return 0; } configure:6909: result: no configure:5749: gcc 2>&1 | grep xlc >/dev/null configure:5752: $? = 1 configure:5806: checking compiler gcc -O2 -pedantic -fomit-frame-pointer -mx32 Test compile: configure:5820: gcc -O2 -pedantic -fomit-frame-pointer -mx32 conftest.c >&5 cc1.exe: error: unrecognized command line option '-mx32' configure:5823: $? = 1 failed program was: int main () { return 0; } configure:6909: result: no configure:5727: cc -c conftest.c >&5 configure:5730: $? = 0 configure:5733: checking whether cc is gcc configure:5735: result: yes configure:5749: cc 2>&1 | grep xlc >/dev/null configure:5752: $? = 1 configure:5806: checking compiler cc -O2 -pedantic -fomit-frame-pointer -mx32 Test compile: configure:5820: cc -O2 -pedantic -fomit-frame-pointer -mx32 conftest.c >&5 cc1.exe: error: unrecognized command line option '-mx32' configure:5823: $? = 1 failed program was: int main () { return 0; } configure:6909: result: no configure:5749: gcc 2>&1 | grep xlc >/dev/null configure:5752: $? = 1 configure:5806: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer Test compile: configure:5820: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 configure:5823: $? = 0 configure:5828: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 5829: ./a.out: No such file or directory ./configure: line 5829: ./b.out: No such file or directory configure:5831: $? = 0 Test compile: function pointer return configure:5874: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 configure:5877: $? = 0 configure:5882: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 5883: ./a.out: No such file or directory ./configure: line 5883: ./b.out: No such file or directory configure:5885: $? = 0 Test compile: cmov instruction configure:5930: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 configure:5933: $? = 0 configure:5938: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 5939: ./a.out: No such file or directory ./configure: line 5939: ./b.out: No such file or directory configure:5941: $? = 0 Test compile: double -> ulong conversion configure:5987: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 configure:5990: $? = 0 configure:5995: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 5996: ./a.out: No such file or directory ./configure: line 5996: ./b.out: No such file or directory configure:5998: $? = 0 Test compile: double negation configure:6042: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 configure:6045: $? = 0 configure:6050: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 6051: ./a.out: No such file or directory ./configure: line 6051: ./b.out: No such file or directory configure:6053: $? = 0 Test compile: double -> float conversion configure:6098: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 configure:6101: $? = 0 configure:6106: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 6107: ./a.out: No such file or directory ./configure: line 6107: ./b.out: No such file or directory configure:6109: $? = 0 Test compile: gnupro alpha ev6 char spilling configure:6183: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 configure:6186: $? = 0 configure:6191: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 6192: ./a.out: No such file or directory ./configure: line 6192: ./b.out: No such file or directory configure:6194: $? = 0 Test compile: __builtin_alloca availability configure:6234: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libmingw32.a(main.o): In function `main': C:\MinGW\msys\1.0\src\mingwrt/../mingw/main.c:73: undefined reference to `WinMain@16' collect2: ld returned 1 exit status configure:6237: $? = 1 failed program was: int k; int foo () { __builtin_alloca (k); } Test compile: abs int -> double conversion configure:6358: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 configure:6361: $? = 0 configure:6366: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 6367: ./a.out: No such file or directory ./configure: line 6367: ./b.out: No such file or directory configure:6369: $? = 0 Test compile: long long reliability test 1 configure:6423: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 conftest.c:6:23: warning: ISO C90 does not support 'long long' [-Wlong-long] configure:6426: $? = 0 configure:6431: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 6432: ./a.out: No such file or directory ./configure: line 6432: ./b.out: No such file or directory configure:6434: $? = 0 Test compile: long long reliability test 2 configure:6484: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 conftest.c: In function 'f': conftest.c:7:26: warning: ISO C90 does not support 'long long' [-Wlong-long] configure:6487: $? = 0 configure:6492: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 6493: ./a.out: No such file or directory ./configure: line 6493: ./b.out: No such file or directory configure:6495: $? = 0 Test compile: freebsd hacked gcc configure:6545: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 configure:6548: $? = 0 configure:6553: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 6554: ./a.out: No such file or directory ./configure: line 6554: ./b.out: No such file or directory configure:6556: $? = 0 Test compile: mpn_lshift_com optimization configure:6644: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 configure:6647: $? = 0 configure:6652: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 6653: ./a.out: No such file or directory ./configure: line 6653: ./b.out: No such file or directory configure:6655: $? = 0 Test compile: mpn_lshift_com optimization 2 configure:6752: gcc -m32 -O2 -pedantic -fomit-frame-pointer conftest.c >&5 configure:6755: $? = 0 configure:6760: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 6761: ./a.out: No such file or directory ./configure: line 6761: ./b.out: No such file or directory configure:6763: $? = 0 configure:6909: result: yes configure: testlist sizeof-long-4 configure:7084: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer has sizeof(long)==4 configure:7097: gcc -m32 -O2 -pedantic -fomit-frame-pointer -c conftest.c >&5 configure:7100: $? = 0 configure:7105: result: yes configure:7423: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge Test compile: configure:7437: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge conftest.c >&5 conftest.c:1:0: error: bad value (sandybridge) for -mtune= switch configure:7440: $? = 1 failed program was: int main () { return 0; } configure:8526: result: no configure:7423: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 Test compile: configure:7437: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 configure:7440: $? = 0 configure:7445: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7446: ./a.out: No such file or directory ./configure: line 7446: ./b.out: No such file or directory configure:7448: $? = 0 Test compile: function pointer return configure:7491: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 configure:7494: $? = 0 configure:7499: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7500: ./a.out: No such file or directory ./configure: line 7500: ./b.out: No such file or directory configure:7502: $? = 0 Test compile: cmov instruction configure:7547: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 configure:7550: $? = 0 configure:7555: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7556: ./a.out: No such file or directory ./configure: line 7556: ./b.out: No such file or directory configure:7558: $? = 0 Test compile: double -> ulong conversion configure:7604: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 configure:7607: $? = 0 configure:7612: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7613: ./a.out: No such file or directory ./configure: line 7613: ./b.out: No such file or directory configure:7615: $? = 0 Test compile: double negation configure:7659: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 configure:7662: $? = 0 configure:7667: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7668: ./a.out: No such file or directory ./configure: line 7668: ./b.out: No such file or directory configure:7670: $? = 0 Test compile: double -> float conversion configure:7715: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 configure:7718: $? = 0 configure:7723: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7724: ./a.out: No such file or directory ./configure: line 7724: ./b.out: No such file or directory configure:7726: $? = 0 Test compile: gnupro alpha ev6 char spilling configure:7800: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 configure:7803: $? = 0 configure:7808: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7809: ./a.out: No such file or directory ./configure: line 7809: ./b.out: No such file or directory configure:7811: $? = 0 Test compile: __builtin_alloca availability configure:7851: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libmingw32.a(main.o): In function `main': C:\MinGW\msys\1.0\src\mingwrt/../mingw/main.c:73: undefined reference to `WinMain@16' collect2: ld returned 1 exit status configure:7854: $? = 1 failed program was: int k; int foo () { __builtin_alloca (k); } Test compile: abs int -> double conversion configure:7975: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 configure:7978: $? = 0 configure:7983: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7984: ./a.out: No such file or directory ./configure: line 7984: ./b.out: No such file or directory configure:7986: $? = 0 Test compile: long long reliability test 1 configure:8040: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 conftest.c:6:23: warning: ISO C90 does not support 'long long' [-Wlong-long] configure:8043: $? = 0 configure:8048: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 8049: ./a.out: No such file or directory ./configure: line 8049: ./b.out: No such file or directory configure:8051: $? = 0 Test compile: long long reliability test 2 configure:8101: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 conftest.c: In function 'f': conftest.c:7:26: warning: ISO C90 does not support 'long long' [-Wlong-long] configure:8104: $? = 0 configure:8109: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 8110: ./a.out: No such file or directory ./configure: line 8110: ./b.out: No such file or directory configure:8112: $? = 0 Test compile: freebsd hacked gcc configure:8162: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 configure:8165: $? = 0 configure:8170: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 8171: ./a.out: No such file or directory ./configure: line 8171: ./b.out: No such file or directory configure:8173: $? = 0 Test compile: mpn_lshift_com optimization configure:8261: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 configure:8264: $? = 0 configure:8269: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 8270: ./a.out: No such file or directory ./configure: line 8270: ./b.out: No such file or directory configure:8272: $? = 0 Test compile: mpn_lshift_com optimization 2 configure:8369: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 conftest.c >&5 configure:8372: $? = 0 configure:8377: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 8378: ./a.out: No such file or directory ./configure: line 8378: ./b.out: No such file or directory configure:8380: $? = 0 configure:8526: result: yes configure:7423: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=sandybridge Test compile: configure:7437: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=sandybridge conftest.c >&5 conftest.c:1:0: error: bad value (sandybridge) for -march= switch configure:7440: $? = 1 failed program was: int main () { return 0; } configure:8526: result: no configure:7423: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 Test compile: configure:7437: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 configure:7440: $? = 0 configure:7445: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7446: ./a.out: No such file or directory ./configure: line 7446: ./b.out: No such file or directory configure:7448: $? = 0 Test compile: function pointer return configure:7491: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 configure:7494: $? = 0 configure:7499: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7500: ./a.out: No such file or directory ./configure: line 7500: ./b.out: No such file or directory configure:7502: $? = 0 Test compile: cmov instruction configure:7547: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 configure:7550: $? = 0 configure:7555: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7556: ./a.out: No such file or directory ./configure: line 7556: ./b.out: No such file or directory configure:7558: $? = 0 Test compile: double -> ulong conversion configure:7604: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 configure:7607: $? = 0 configure:7612: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7613: ./a.out: No such file or directory ./configure: line 7613: ./b.out: No such file or directory configure:7615: $? = 0 Test compile: double negation configure:7659: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 configure:7662: $? = 0 configure:7667: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7668: ./a.out: No such file or directory ./configure: line 7668: ./b.out: No such file or directory configure:7670: $? = 0 Test compile: double -> float conversion configure:7715: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 configure:7718: $? = 0 configure:7723: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7724: ./a.out: No such file or directory ./configure: line 7724: ./b.out: No such file or directory configure:7726: $? = 0 Test compile: gnupro alpha ev6 char spilling configure:7800: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 configure:7803: $? = 0 configure:7808: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7809: ./a.out: No such file or directory ./configure: line 7809: ./b.out: No such file or directory configure:7811: $? = 0 Test compile: __builtin_alloca availability configure:7851: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../libmingw32.a(main.o): In function `main': C:\MinGW\msys\1.0\src\mingwrt/../mingw/main.c:73: undefined reference to `WinMain@16' collect2: ld returned 1 exit status configure:7854: $? = 1 failed program was: int k; int foo () { __builtin_alloca (k); } Test compile: abs int -> double conversion configure:7975: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 configure:7978: $? = 0 configure:7983: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 7984: ./a.out: No such file or directory ./configure: line 7984: ./b.out: No such file or directory configure:7986: $? = 0 Test compile: long long reliability test 1 configure:8040: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 conftest.c:6:23: warning: ISO C90 does not support 'long long' [-Wlong-long] configure:8043: $? = 0 configure:8048: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 8049: ./a.out: No such file or directory ./configure: line 8049: ./b.out: No such file or directory configure:8051: $? = 0 Test compile: long long reliability test 2 configure:8101: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 conftest.c: In function 'f': conftest.c:7:26: warning: ISO C90 does not support 'long long' [-Wlong-long] configure:8104: $? = 0 configure:8109: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 8110: ./a.out: No such file or directory ./configure: line 8110: ./b.out: No such file or directory configure:8112: $? = 0 Test compile: freebsd hacked gcc configure:8162: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 configure:8165: $? = 0 configure:8170: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 8171: ./a.out: No such file or directory ./configure: line 8171: ./b.out: No such file or directory configure:8173: $? = 0 Test compile: mpn_lshift_com optimization configure:8261: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 configure:8264: $? = 0 configure:8269: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 8270: ./a.out: No such file or directory ./configure: line 8270: ./b.out: No such file or directory configure:8272: $? = 0 Test compile: mpn_lshift_com optimization 2 configure:8369: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 conftest.c >&5 configure:8372: $? = 0 configure:8377: ./a.out || ./b.out || ./a.exe || ./a_out.exe || ./conftest ./configure: line 8378: ./a.out: No such file or directory ./configure: line 8378: ./b.out: No such file or directory configure:8380: $? = 0 configure:8526: result: yes configure:7423: checking compiler gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 -mno-cygwin Test compile: configure:7437: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 -mno-cygwin conftest.c >&5 cc1.exe: error: unrecognized command line option '-mno-cygwin' configure:7440: $? = 1 failed program was: int main () { return 0; } configure:8526: result: no configure:8679: checking for gcc configure:8706: result: gcc configure:8935: checking for C compiler version configure:8944: gcc --version >&5 gcc.exe (GCC) 4.6.2 Copyright (C) 2011 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. configure:8955: $? = 0 configure:8944: gcc -v >&5 Using built-in specs. COLLECT_GCC=c:\MinGW\bin\gcc.exe COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.6.2/lto-wrapper.exe Target: mingw32 Configured with: ../gcc-4.6.2/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw Thread model: win32 gcc version 4.6.2 (GCC) configure:8955: $? = 0 configure:8944: gcc -V >&5 gcc.exe: error: unrecognized option '-V' gcc.exe: fatal error: no input files compilation terminated. configure:8955: $? = 1 configure:8944: gcc -qversion >&5 gcc.exe: error: unrecognized option '-qversion' gcc.exe: fatal error: no input files compilation terminated. configure:8955: $? = 1 configure:8975: checking whether the C compiler works configure:8997: gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7 D:\gmp-6.1.0 conftest.c >&5 c:/mingw/bin/../lib/gcc/mingw32/4.6.2/../../../../mingw32/bin/ld.exe: cannot find D:\gmp-6.1.0: Permission denied collect2: ld returned 1 exit status configure:9001: $? = 1 configure:9039: result: no configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "GNU MP" | #define PACKAGE_TARNAME "gmp" | #define PACKAGE_VERSION "6.1.0" | #define PACKAGE_STRING "GNU MP 6.1.0" | #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html" | #define PACKAGE_URL "http://www.gnu.org/software/gmp/" | #define PACKAGE "gmp" | #define VERSION "6.1.0" | #define WANT_ASSEMBLY 1 | #define WANT_FFT 1 | #define HAVE_HOST_CPU_sandybridge 1 | #define HOST_DOS64 1 | #define HAVE_SPEED_CYCLECOUNTER 2 | #define HAVE_CALLING_CONVENTIONS 1 | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:9044: error: in `/d/gmp-6.1.0': configure:9046: error: C compiler cannot create executables See `config.log' for more details ## ---------------- ## ## Cache variables. ## ## ---------------- ## ac_cv_build=sandybridge-pc-mingw32 ac_cv_env_ABI_set= ac_cv_env_ABI_value= ac_cv_env_CCC_set= ac_cv_env_CCC_value= ac_cv_env_CC_FOR_BUILD_set= ac_cv_env_CC_FOR_BUILD_value= ac_cv_env_CC_set= ac_cv_env_CC_value= ac_cv_env_CFLAGS_set= ac_cv_env_CFLAGS_value= ac_cv_env_CPPFLAGS_set= ac_cv_env_CPPFLAGS_value= ac_cv_env_CPP_FOR_BUILD_set= ac_cv_env_CPP_FOR_BUILD_value= ac_cv_env_CPP_set= ac_cv_env_CPP_value= ac_cv_env_CXXCPP_set= ac_cv_env_CXXCPP_value= ac_cv_env_CXXFLAGS_set= ac_cv_env_CXXFLAGS_value= ac_cv_env_CXX_set= ac_cv_env_CXX_value= ac_cv_env_LDFLAGS_set=set ac_cv_env_LDFLAGS_value='D:\gmp-6.1.0' ac_cv_env_LIBS_set= ac_cv_env_LIBS_value= ac_cv_env_LT_SYS_LIBRARY_PATH_set= ac_cv_env_LT_SYS_LIBRARY_PATH_value= ac_cv_env_M4_set= ac_cv_env_M4_value= ac_cv_env_YACC_set= ac_cv_env_YACC_value= ac_cv_env_YFLAGS_set= ac_cv_env_YFLAGS_value= ac_cv_env_build_alias_set= ac_cv_env_build_alias_value= ac_cv_env_host_alias_set= ac_cv_env_host_alias_value= ac_cv_env_target_alias_set= ac_cv_env_target_alias_value= ac_cv_host=sandybridge-pc-mingw32 ac_cv_path_install='/bin/install -c' ac_cv_path_mkdir=/bin/mkdir ac_cv_prog_AWK=gawk ac_cv_prog_ac_ct_CC=gcc ac_cv_prog_make_make_set=yes am_cv_make_support_nested_variables=yes ## ----------------- ## ## Output variables. ## ## ----------------- ## ABI='32' ACLOCAL='${SHELL} /d/gmp-6.1.0/missing aclocal-1.15' AMTAR='$${TAR-tar}' AM_BACKSLASH='\' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' AM_DEFAULT_VERBOSITY='1' AM_V='$(V)' AR='' AS='' ASMFLAGS='' AUTOCONF='${SHELL} /d/gmp-6.1.0/missing autoconf' AUTOHEADER='${SHELL} /d/gmp-6.1.0/missing autoheader' AUTOMAKE='${SHELL} /d/gmp-6.1.0/missing automake-1.15' AWK='gawk' CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo' CC='gcc' CCAS='' CC_FOR_BUILD='' CFLAGS='-m32 -O2 -pedantic -fomit-frame-pointer -mtune=corei7 -march=corei7' CPP='' CPPFLAGS='' CPP_FOR_BUILD='' CXX='' CXXCPP='' CXXFLAGS='' CYGPATH_W='echo' DEFN_LONG_LONG_LIMB='/* #undef _LONG_LONG_LIMB */' DEFS='' DLLTOOL='' DSYMUTIL='' DUMPBIN='' ECHO_C='' ECHO_N='-n' ECHO_T='' EGREP='' ENABLE_STATIC_FALSE='' ENABLE_STATIC_TRUE='' EXEEXT='' EXEEXT_FOR_BUILD='' FGREP='' GMP_LDFLAGS='' GMP_LIMB_BITS='' GMP_NAIL_BITS='0' GREP='' HAVE_CLOCK_01='' HAVE_CPUTIME_01='' HAVE_GETRUSAGE_01='' HAVE_GETTIMEOFDAY_01='' HAVE_HOST_CPU_FAMILY_power='0' HAVE_HOST_CPU_FAMILY_powerpc='0' HAVE_SIGACTION_01='' HAVE_SIGALTSTACK_01='' HAVE_SIGSTACK_01='' HAVE_STACK_T_01='' HAVE_SYS_RESOURCE_H_01='' INSTALL_DATA='${INSTALL} -m 644' INSTALL_PROGRAM='${INSTALL}' INSTALL_SCRIPT='${INSTALL}' INSTALL_STRIP_PROGRAM='$(install_sh) -c -s' LD='' LDFLAGS='D:\gmp-6.1.0' LEX='' LEXLIB='' LEX_OUTPUT_ROOT='' LIBCURSES='' LIBGMPXX_LDFLAGS='' LIBGMP_DLL='' LIBGMP_LDFLAGS='' LIBM='' LIBM_FOR_BUILD='' LIBOBJS='' LIBREADLINE='' LIBS='' LIBTOOL='' LIPO='' LN_S='' LTLIBOBJS='' LT_SYS_LIBRARY_PATH='' M4='' MAINT='#' MAINTAINER_MODE_FALSE='' MAINTAINER_MODE_TRUE='#' MAKEINFO='${SHELL} /d/gmp-6.1.0/missing makeinfo' MANIFEST_TOOL='' MKDIR_P='/bin/mkdir -p' NM='' NMEDIT='' OBJDUMP='' OBJEXT='' OTOOL64='' OTOOL='' PACKAGE='gmp' PACKAGE_BUGREPORT='gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html' PACKAGE_NAME='GNU MP' PACKAGE_STRING='GNU MP 6.1.0' PACKAGE_TARNAME='gmp' PACKAGE_URL='http://www.gnu.org/software/gmp/' PACKAGE_VERSION='6.1.0' PATH_SEPARATOR=':' RANLIB='' SED='' SET_MAKE='' SHELL='/bin/sh' SPEED_CYCLECOUNTER_OBJ='pentium.lo' STRIP='' TAL_OBJECT='' TUNE_LIBS='' TUNE_SQR_OBJ='' U_FOR_BUILD='' VERSION='6.1.0' WANT_CXX_FALSE='' WANT_CXX_TRUE='' WITH_READLINE_01='' YACC='' YFLAGS='' ac_ct_AR='' ac_ct_CC='gcc' ac_ct_CXX='' ac_ct_DUMPBIN='' am__EXEEXT_FALSE='' am__EXEEXT_TRUE='' am__isrc='' am__leading_dot='.' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' bindir='${exec_prefix}/bin' build='sandybridge-pc-mingw32' build_alias='' build_cpu='sandybridge' build_os='mingw32' build_vendor='pc' datadir='${datarootdir}' datarootdir='${prefix}/share' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' dvidir='${docdir}' exec_prefix='NONE' gmp_srclinks='' host='sandybridge-pc-mingw32' host_alias='' host_cpu='sandybridge' host_os='mingw32' host_vendor='pc' htmldir='${docdir}' includedir='${prefix}/include' infodir='${datarootdir}/info' install_sh='${SHELL} /d/gmp-6.1.0/install-sh' libdir='${exec_prefix}/lib' libexecdir='${exec_prefix}/libexec' localedir='${datarootdir}/locale' localstatedir='${prefix}/var' mandir='${datarootdir}/man' mkdir_p='$(MKDIR_P)' mpn_objects='' mpn_objs_in_libgmp='' oldincludedir='/usr/include' pdfdir='${docdir}' prefix='NONE' program_transform_name='s,x,x,' psdir='${docdir}' sbindir='${exec_prefix}/sbin' sharedstatedir='${prefix}/com' sysconfdir='${prefix}/etc' target_alias='' ## ----------- ## ## confdefs.h. ## ## ----------- ## /* confdefs.h */ #define PACKAGE_NAME "GNU MP" #define PACKAGE_TARNAME "gmp" #define PACKAGE_VERSION "6.1.0" #define PACKAGE_STRING "GNU MP 6.1.0" #define PACKAGE_BUGREPORT "gmp-bugs@gmplib.org, see https://gmplib.org/manual/Reporting-Bugs.html" #define PACKAGE_URL "http://www.gnu.org/software/gmp/" #define PACKAGE "gmp" #define VERSION "6.1.0" #define WANT_ASSEMBLY 1 #define WANT_FFT 1 #define HAVE_HOST_CPU_sandybridge 1 #define HOST_DOS64 1 #define HAVE_SPEED_CYCLECOUNTER 2 #define HAVE_CALLING_CONVENTIONS 1 configure: exit 77
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
卸载 x 雷某度!GitHub 标星 1.5w+,从此我只用这款全能高速下载工具!
作者 | Rocky0429 来源 | Python空间 大家好,我是 Rocky0429,一个喜欢在网上收集各种资源的蒟蒻… 网上资源眼花缭乱,下载的方式也同样千奇百怪,比如 BT 下载,磁力链接,网盘资源等等等等,下个资源可真不容易,不一样的方式要用不同的下载软件,因此某比较有名的 x 雷和某度网盘成了我经常使用的工具。 作为一个没有钱的穷鬼,某度网盘几十 kb 的下载速度让我...
20道你必须要背会的微服务面试题,面试一定会被问到
写在前面: 在学习springcloud之前大家一定要先了解下,常见的面试题有那块,然后我们带着问题去学习这个微服务技术,那么就会更加理解springcloud技术。如果你已经学了springcloud,那么在准备面试的时候,一定要看看看这些面试题。 文章目录1、什么是微服务?2、微服务之间是如何通讯的?3、springcloud 与dubbo有哪些区别?4、请谈谈对SpringBoot 和S...
讲真,这两个IDE插件,可以让你写出质量杠杠的代码
周末躺在床上看《拯救大兵瑞恩》 周末在闲逛的时候,发现了两个优秀的 IDE 插件,据说可以提高代码的质量,我就安装了一下,试了试以后发现,确实很不错,就推荐给大家。 01、Alibaba Java 代码规范插件 《阿里巴巴 Java 开发手册》,相信大家都不会感到陌生,其 IDEA 插件的下载次数据说达到了 80 万次,我今天又贡献了一次。嘿嘿。 该项目的插件地址: https://github....
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
有网友说:2020年还不懂Spring就放弃Java吧?
前言 Spring这个词对于开发者想必不会陌生,可能你每天都在使用Spring,享受着Spring生态提供的服务,理所当然的用着SpringIOC和SpringAOP去实现老板交给你的功能 ,唔 它就是这样使用的(类声明为Bean组件,然后注入),没错 能完成老板任务,没毛病。如果向你提问什么是Spring,Spring有什么核心功能呢,你会想:这太简单了,Spring就是框架嘛,Spring核...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
2020 年,大火的 Python 和 JavaScript 是否会被取而代之?
Python 和 JavaScript 是目前最火的两大编程语言,但是2020 年,什么编程语言将会取而代之呢? 作者 |Richard Kenneth Eng 译者 |明明如月,责编 | 郭芮 出品 | CSDN(ID:CSDNnews) 以下为译文: Python 和 JavaScript 是目前最火的两大编程语言。然而,他们不可能永远屹立不倒。最终,必将像其他编程语言一...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
没用过这些 IDEA 插件?怪不得写代码头疼
使用插件,可以提高开发效率。对于开发人员很有帮助。这篇博客介绍了IDEA中最常用的一些插件。
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
最全最强!世界大学计算机专业排名总结!
我正在参与CSDN200进20,希望得到您的支持,扫码续投票5次。感谢您! (为表示感谢,您投票后私信我,我把我总结的人工智能手推笔记和思维导图发送给您,感谢!) 目录 泰晤士高等教育世界大学排名 QS 世界大学排名 US News 世界大学排名 世界大学学术排名(Academic Ranking of World Universities) 泰晤士高等教育世界大学排名 中国共...
《java面试宝典》三 类初始化和类实例化顺序
前言: 社长,4年api搬运工程师,之前做的都是一些框架的搬运工作,做的时间越长,越发感觉自己技术越菜,有同感的社友,可以在下方留言。现侧重于java底层学习和算法结构学习,希望自己能改变这种现状。 为什么大厂面试,更侧重于java原理底层的提问,因为通过底层的提问,他能看出一个人的学习能力,看看这个人的可培养潜力。随着springboot的流行,大部分的开发,起步就是springboot。也...
一份王者荣耀的英雄数据报告
咪哥杂谈本篇阅读时间约为 6 分钟。1前言前一阵写了关于王者的一些系列文章,从数据的获取到数据清洗,数据落地,都是为了本篇的铺垫。今天来实现一下,看看不同维度得到的结论。2环境准备本次实...
工作十年的数据分析师被炒,没有方向,你根本躲不过中年危机
2020年刚刚开始,就意味着离职潮高峰的到来,我身边就有不少人拿着年终奖离职了,而最让我感到意外的,是一位工作十年的数据分析师也离职了,不同于别人的主动辞职,他是被公司炒掉的。 很多人都说数据分析是个好饭碗,工作不累薪资高、入门简单又好学。然而今年34的他,却真正尝到了中年危机的滋味,平时也有不少人都会私信问我: 数据分析师也有中年危机吗?跟程序员一样是吃青春饭的吗?该怎么保证自己不被公司淘汰...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
张朝阳回应迟到 1 分钟罚 500:资本家就得剥削员工
loonggg读完需要2分钟速读仅需 1 分钟大家我,我是你们的校长。前几天,搜狐的董事局主席兼 CEO 张朝阳和搜狐都上热搜了。原因很简单,就是搜狐出了“考勤新规”。一封搜狐对员工发布...
一个程序在计算机中是如何运行的?超级干货!!!
强烈声明:本文很干,请自备茶水!???? 开门见山,咱不说废话! 你有没有想过,你写的程序,是如何在计算机中运行的吗?比如我们搞Java的,肯定写过这段代码 public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } ...
【蘑菇街技术部年会】程序员与女神共舞,鼻血再次没止住。(文末内推)
蘑菇街技术部的年会,别开生面,一样全是美女。
那个在阿里养猪的工程师,5年了……
简介: 在阿里,走过1825天,没有趴下,依旧斗志满满,被称为“五年陈”。他们会被授予一枚戒指,过程就叫做“授戒仪式”。今天,咱们听听阿里的那些“五年陈”们的故事。 下一个五年,猪圈见! 我就是那个在养猪场里敲代码的工程师,一年多前我和20位工程师去了四川的猪场,出发前总架构师慷慨激昂的说:同学们,中国的养猪产业将因为我们而改变。但到了猪场,发现根本不是那么回事:要个WIFI,没有;...
立即提问