GraphApp for Windows

What files are included in the distribution?

There are several folders within the distributions, containing source code and other files:

	fonts/		# contains the portable fonts GraphApp uses
	src/		# contains all source code
		win32/	# contains MS-Windows specific code
		x11/	# contains X-Windows specific code

To install the package, you should place these folders in C:\Apps\app\ so that the fonts directory is located at C:\Apps\app\fonts\ - this ensures GraphApp can find the fonts.

How do I build a version of the library for my compiler?

First you will have to compile and run the apptypes.c program in the src folder. This will create an important file called apptypes.h which contains definitions which other source files need to compile correctly.

Then you create a library project in your compiler, called App and add all C source code files in all sub-folders, such as win32, graphics, libpng, etc, except for x11 which is only used on Linux or Unix systems.

Ensure the project will produce a library, not an executable application.

Compile the project. This should produce a library called App.lib or some such name. This library is what you need to link to all applications which use GraphApp functions.

What compilers can I use?

Any compiler which can produce Windows EXE files. Borland C version 3.0 or higher should work, and Microsoft C should also work. The library works best in the '32-bit Memory Model'. If compiling for 16-bit Windows, you should use the 'Large Memory Model'.

What about TURBO C? Turbo C probably won't work because it is an older compiler which pre-dates Windows.

Windows ports of GCC will probably also work. I have no experience with these compilers so you're on your own there.

What if I get this error message...?

Linker Error: Fixup overflow at _TEXT:00B1, target = WINMAIN

This error is probably caused by not using the correct memory model. Use the '32-bit Memory Model' when compiling and linking with GraphApp. If compiling for 16-bit Windows, use the 'Large Memory Model'.

Linker Error: Missing function MAIN in module INIT

This means you've probably tried to compile the library into an EXE without having a program with a main function.

You should compile the source files into a library, not an EXE. Check the "Librarian options" from the Options menu in your compiler, and read the help file. Find out how to create a library, instead of an EXE file.

If you have created the library, you can only run it by linking it to a program. Try making a project which contains App.lib and tester.c and then compile into an EXE. Remember to use the same memory model both when making the library, and also when making the EXE. Use '32-bit' as the memory model, and make a 'GUI' application, not a 'Console' app.