OS: Win2k
Compiler: Borland Turbo C++ v 4.52
Code:
#include <stdlib.h>
#include <stdio.h>
int main(void)
{
printf("About to spawn command.com and run a DOS command\n");
system("dir");
return 0;
}
Issue:
The above code compiles just fine. When I rebuild (which includes linking) I get the following error message:
Compiling TEST1.CPP:
Linking test1.exe:
Linker Warning: No module definition file specified: using defaults
Linker Error: Undefined symbol _system in module TEST1.CPP.
(Throws the same linker error for all of the "execl" series commands as well.)
I've changed the system command to system() and rebuilt. The error changes to a compile error "too few parameters in call to system(const *char)... like we would normally expect.
I have a feeling I'm missing something really simple here but, not having seen this before, I am at a loss.
Any kick in the right direction would be greatly appreciated.
Many thanks!
Dan