I'm sure that myfile.cpp compiles correctly - I made it very simple since I was just experimenting, trying to get the other program to compile it. I've tried compiling from the command line myself, but get the same message as when the program does it. It compiles and runs without error if I compile it using Dev-C++.
Here's a simple example of the files in question:
myfile.cpp:
Code:
//myfile.cpp - test program to be compiled by testprog.exe
#include<iostream.h>
#include<stdlib.h>
int main()
{
cout << "Why has my compiler forsaken me?";
system("pause");
return 0;
}
testprog.exe:
Code:
//testprog.cpp - test program to compile myfile.cpp
#include<stdlib.h>
#include<iostream.h>
int main()
{
system("c:\\dev-c++\\bin\\gcc -o myfile myfile.cpp"); **see note below
system("pause");
return 0;
}
**I get the same error (see previous post) when I include the full paths (c:\\dev-c++\\myfile and c:\\dev-c++\\myfile.cpp) in the system() command.
testprog compiles, but when it runs, I get the 'gcc: installation...' error, as if I'm not using gcc (or g++ if I try that) correctly.
Decrypt