I am unable to compile this simple program
#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;
}
I have tried using following command:
g++ filename.cpp -l -o filename.cpp
Result: ld.exe cannot find -l exit with status 1
g++ filename.cpp -o filename
Result: error: spawn.h No such file or directory.
Is there a problem with my MinGW installation? I am using Windows 7 32 bit and MinGW.