Dev-C++编译时出现collect2.exe: error: ld returned 1 exit status错误?

代码:
#include <windows.h>
#include <stdio.h>
#include <iostream>
#include <fstream>
#include <cstdlib>
#include <string>
#include <ctime>
#define NUM_THREADS 5
#pragma comment(lib,"WinMM.Lib")
using namespace std;
void* qiansebian(void* args)
{
int y,t,y2;
cout<<"1";
for(;;)
{
t=rand()%5+1;
cout<<endl<<"vvv"<<t<<"time"<<endl;
Sleep(t*100);
y=rand()%15;
y2=rand()%15;
string se[16]={"1","2","3","4","5","6","7","8","9","0","A","B","C","D","E","F"};
string cmd="color "+se[y]+se[y2];
cout<<cmd;
system(cmd.c_str());
}
}
int main()
{
system("title 视觉盛宴2.0");
srand((int)time(0));
int i;
pthread_t tids[NUM_THREADS];
pthread_create(&tids[i], NULL, qiansebian, NULL);
//---------------------------------------------------------------------------------------------------------
PlaySound("d:\\录音输出\\江南.wav",NULL,SND_FILENAME|SND_ASYNC);
//---------------------------------------------------------------------------------------------------------
int ci,xci,x1;
i=0;
ci=0;
xci=0;
//视觉盛宴
ci=0;//开始报告
cout<<"------------------\n";
while(ci<600)
{
cout<<"视觉盛宴开始!\n" ;
ci++;
}
while(ci<1750)
{
ci++;
cout<<" ----------------------- -----------------------\n";
cout<<" ---- -----\n";
cout<<" --- ------\n";
cout<<" ---------- ---\n";
cout<<" ------------\n";
cout<<" --- -----\n";
cout<<" ------ ------\n";
cout<<" --- ---\n";
cout<<" ----- -----\n";
cout<<" ----------------------\n";
cout<<" -----------------------\n";
cout<<" ------------------\n";
cout<<" ---------\n";
cout<<" ----------- ------\n";
cout<<" -------- ----\n";
cout<<" ------------ -----------\n";
cout<<" ----------- ----------\n";
cout<<" ------------ ------------------\n";
cout<<" ------------ -----------\n";
cout<<" ------------ --------------\n";
cout<<" ------------ ---------------\n";
cout<<" ----- -------\n";
}
Sleep(500000);
return 0;
}
程序并没有打开,任务管理器里也没有进程,新开了一个cpp任然报错,大神们,求解啊!

在编译代码时,Dev-C++编译时出现collect2.exe: error: ld returned 1 exit status错误,请关闭以前运行程序后没有关闭的运行窗口(小黑窗)。然后再重新尝试编译。如果仍不行,请关闭编译器后,再次运行、编译试试。
温馨提示:答案为网友推荐,仅供参考
相似回答