![]() |
Snug HTTP server - Compiling
BeOS, BeIDEThis short tutorial are based on BeIDE found in the BeOS Developer Edition 1.1.Start BeIDE. Open the File menu and choose New Project. Choose BeApp under x86 and deselect Create Folder. A new window will appear, go to the source directory for the Snug HTTP server source code. Enter SnugBeOS.proj in the text area and click Save. Another window will appear, open the Project menu and choose Add Files. Select main.c and click Add. Open the Edit menu and choose Project Settings. Select x86 ELF Project and change File Name to SnugBeOS. Click Save when prompted and then Cancel to get back to the project window. Open up options.h and make sure #define USEBEOS and #define USEUNIX is uncommented. Open the Project menu and choose Run. This will compile the code and in the end make the executable. Other versions of BeIDE may differ but the above description should work approximatively. If you encounter 'end of file not at end of a line; newline inserted', try decreasing the optimization level one or two steps and try again (Edit/Project Settings/x86 Code Generation). Details may differ. Linux, UNIX, GCCCompiling with GCC is a one-banana job. Make sure #define USEUNIX is uncommented in main.c. Type gcc -Wall -ansi -pedantic -o snug main.c and hit enter. Some source code modifications may be needed depending on your system.Microsoft Windows, BCC 5.02Borland BCC 5.02 was used both for SnugW16.exe and the SnugW32.exe. Compiling for Win32 targets is easy. Simply uncomment #define USEWIN32 in main.c, right click anywhere on main.c and select TargetExpert and compile for the Win32 Plattform as a Console Application.Compiling for Windows for Workgroups 3.11 involves a little more effort. Make sure #define USEWIN16 is uncommented in main.c. You have to create a project and add the appropriate lib files for WfW 3.11. However, a ready made project file named SnugW16.ide should exist in the src directory. Also, open the Options/Project menu and select the 80386 instruction set under 16-bit Compiler/Processor. The picture below pretty much says it all. ![]() OS/2, Open Watcom 1.3Create a OW project and add files by right-clicking on the surface and choose New Source and add main.c. Make sure #define USEOS2 and #define BSD_SELECT is uncommented in main.c. I used the include and lib-files found in the toolkit directory on the Warp 4 CD to compile this program. See the screenshot below how to add them to the project. Fiddle around with OS/2 Linking Switches and select things like no debug information and other usefull stuff. The lib files should be placed in the appropriate directory, which happends to be C:\WATCOM\lib386\os2 on my system. Press F5 to Make All and you will end up with SnugOS2.exe.![]() AROS, AmiDevCpp 0.9 |