我无法编译这个简单的程序
#include<stdio.h>
#include<conio.h>
#include<spawn.h>
#include<process.h>
int main(){
printf("Spawning new process...\n");
spawnl(P_WAIT,"curl","www.google.co.in",NULL);
system("cls");
printf("Program execution completed somehow!\n");
getch();
return 0;
}
我尝试使用以下命令:
g++ filename.cpp -l -o filename.cpp
结果:ld.exe cannot find -l exit with status 1
g++ filename.cpp -o filename
结果:error: spawn.h No such file or directory.
我的 MinGW 安装有问题吗?我正在使用 Windows 7 32 位和 MinGW。