Porting C++ Code from NT to UNIX
By George F. Frazier, April 01, 1999
When porting large C++ programs from Windows to UNIX, it makes sense to use a tool that implements the Windows API natively on the target system. George uses MainSoft's MainWin XDE (eXtended Development Environment) 3.1 to port a major application from Windows NT to Solaris.
Apr99: Programmer's Toolchest
<b>(a)</b>
APP_CFLAGS = -Dmain=app_main - DWHAS_APP_MAIN
<b>(b)</b>
extern "C"
int main(int argc, char *argv[]);
{
...
}
Example 1: If you have main() defined, add this code to your makefile; (b) the file that then contains your definition of main() includes this.
Copyright © 1999, Dr. Dobb's Journal