この単純なプログラムをコンパイルできません
#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 を使用しています。