Building a YAWL Application

The installation on the CD-ROM comes with two YAWL libraries: libyawl.a (GCC) and yawl.lib (BCC32). YAWL is used for writing graphical Windows programs and stands for Yet Another Windows Library, and is discussed in Appendix B, “A Short Library Reference.” To build a YAWL program with GCC, you need to link with libyawl.a and the Mingw32 graphics device interface (GDI) import library:

C:gcc	est>c++ yhello.cpp libyawl.a –lgdi32 -lcomdlg32
					

You need the GDI library to glue YAWL to the underlying Windows application programming interface (API) graphics calls. In the Mingw32 lib directory of GCC, you find a large number of files like lib*.a, one of which is libgdi32.a. The name following the –l option in the command line is prepended with lib, and then .a is appended. For the preceding command-line example to work, libyawl.a must be in the current directory. It is most convenient to move it into c:gcclib (wherever GCC is located) because you can then access it as follows:

C:gcc	est>c++ yhello.cpp -lyawl –lgdi32 -lcomdlg32
					

This works, but the result has an interesting property. The resulting program has both a window and a text console. If the program is run from a command prompt, an extra console window is not generated. If the program is run from Windows Explorer, the extra console window can be irritating. (Sometimes it can be helpful to use the console for debug output.) So here is the final version of how to build a YAWL program, which you might want to make into a batch file:

C:gcc	est>c++ yhello.cpp -lyawl –lgdi32 -lcomdlg32 -mwindows
					

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.221.163.13