If you start Zeus, select the Templates panel from the navigator on the left, select the C/C++ Document Type
from the list at the top and double click on the Application (Windows) option.
That will create a simple Win32 application. Save that code to the c:\temp\winapp.cpp file.
If you compile this using the Compiler, Compile menu you'll most likely get this error message:
Code: Select all
winapp.cpp:(.text+0x75): undefined reference to `_imp__GetStockObject@4'
winapp.cpp:(.text+0x202): undefined reference to `_imp__SetBkMode@8'
winapp.cpp:(.text+0x249): undefined reference to `_imp__SetTextColor@8'
winapp.cpp:(.text+0x281): undefined reference to `_imp__TextOutA@20'
These are stock standard Win32 functions and they live in the gdi32 and user32 windows libraries.
So what is needed is add these libraries to the command line using the -l option so that the linker can resolve these functions.
To do this just change the command line to be as follows:
Code: Select all
g++.exe -x c++ -Wall -std=c++11 "$fn" -lgdi32 -luser32 -o "$fdd$fb.exe"
Running this executable will display the Hello Windows Win32 GUI application shown below.
Cheers Jussi