Apparently (it's been a little while since I did it, had to check), I made some alterations to the virtualgcc program to get it to run the right tools and recompiled it.
Code: Select all
--- virtualgcc_old.cpp 1999-06-17 15:52:30.000000000 +1200
+++ virtualgcc.cpp 2007-06-10 21:33:14.579125000 +1200
@@ -72,6 +72,7 @@
#include <string.h>
#include <assert.h>
#include <stdarg.h>
+#include <ctype.h>
typedef enum{DEBUG_NONE=0,DEBUG_COFF,DEBUG_CSEVEN}Debug_type;
char Source_filename[_MAX_PATH];
@@ -331,12 +332,12 @@
char DebugLevelString[32];
char ChecksumString[64];
-void main (int argc, char *argv[])
+int main (int argc, char *argv[])
{
output(\"Virtual GCC Compiler layer for Descent 3\\n\");
output(\"Copyright 1999 Outrage Entertainment\\n\");
if(!CollectArguments(argc,argv))
- return;
+ return 0;
STARTUPINFO si = {0};
// Make child process use this app's standard files.
@@ -367,7 +368,7 @@
}
if(missing_variables){
- return;
+ return 0;
}
if(Level_DLL_build){
@@ -431,6 +432,8 @@
output(\"Done.\");
SetCurrentDirectory(old_path);
+
+ return 1;
}
bool Step1(STARTUPINFO *si)
@@ -451,7 +454,7 @@
MakePath(output_dllinit,Working_directory,filename,NULL);
//build script
- sprintf(command_line,\"gcc.exe -I. -I%s -mwindows -o %s -c %s %s %s %s\",Working_directory,output_object,Source_filename,WarningLevelString,ChecksumString,DebugLevelString);
+ sprintf(command_line,\"c++.exe -I. -I%s -mwindows -o %s -c %s %s %s %s\",Working_directory,output_object,Source_filename,WarningLevelString,ChecksumString,DebugLevelString);
bRet = CreateProcess (NULL, command_line, NULL, NULL, TRUE, 0, NULL, NULL, si, &pi);
if (bRet){
WaitForSingleObject (pi.hProcess, INFINITE);
@@ -468,7 +471,7 @@
}
//add dllinit function
- sprintf(command_line,\"gcc.exe -I. -I%s -mwindows -o %s -c %s %s %s\",Working_directory,output_dllinit,DLLInit_filename,WarningLevelString,DebugLevelString);
+ sprintf(command_line,\"c++.exe -I. -I%s -mwindows -o %s -c %s %s %s\",Working_directory,output_dllinit,DLLInit_filename,WarningLevelString,DebugLevelString);
bRet = CreateProcess (NULL, command_line, NULL, NULL, TRUE, 0, NULL, NULL, si, &pi);
if (bRet){
WaitForSingleObject (pi.hProcess, INFINITE);
@@ -495,7 +498,7 @@
// build up the command line
char command_line[256];
- sprintf(command_line,\"dllwrap.exe --export-all --def %s -o %s %s %s -mwindows\",Def_filename,Output_filename,output_object,output_dllinit);
+ sprintf(command_line,\"dllwrap.exe --driver-name c++ --export-all --def %s -o %s %s %s -mwindows\",Def_filename,Output_filename,output_object,output_dllinit);
bRet = CreateProcess (NULL, command_line, NULL, NULL, TRUE, 0, NULL, NULL, si, &pi);