F) vbcc-WarpOS ============== Note: You should read c.txt first. This document only describes the differences of vbcc-WarpOS to StormC, concerning c.txt ... If StormC is too expansive for you, there is now a different option: Using vbcc-WarpOS. vbcc exists in Versions for both ppc.library and WarpOS, the WarpOS version is only in Beta-Testing currently, though. Principially StormC is much more comfortable to use, and also StormC is more stable and gives better code quality, but then you pay nothing for vbcc-WarpOS. It is Freeware !!! And of course it will still get better, when Frank Wille is making more progress with it. Better Code-Quality and all that... still it will be a CLI-Based Compiler, no GUI like in StormC. You will have to write makefiles and all that... vbcc is a C-only compiler, though, no C++. And as i said currently only a Beta-Version exists, which is not publicly available. And also it has the same problems all Beta-Software has. A public release will be done when the compiler is acceptable for the public. The author is frank@phoenix.owl.de. With vbcc you can compile programs for both ppc.library and WarpUP (see below) without any additional work (nearly, at least). Now, as to the differences to the stuff discussed in c.txt: - vbcc is, concerning Typing, even STRICTER than StormC. In most cases it only produces a warning, not an error, though. But it is ABSOLUTELY strict, that you go for 100% ANSI-conformity, like already discussed in c.txt. Try to do this. - OS-Includes are handled a bit differently. Like in StormC, you don't include any pragma/pragmas/proto-files. So you principially can just compile StormC-programs with vbcc without changes. A difference is in the way you compile. The normal compilation works like: vc +warpos -amiga-align -lm -lamiga -+ main.c A different option exists for ppc.library, but i don't care about it. Now, if you want to use "special" libraries not contained in amiga.lib, then you have to create a .lib-file for them, using the tool fd2libWarp, which is available at the author of vbcc. Example for prelude.library (you need a .fd-file !!!) fd2libWarp prelude.fd vc +warpos -amiga-align -c #?.s join #?.o as vlibwos:prelude.lib Then you can compile your program by: vc +warpos -amiga-align -lm -lamiga -lprelude -+ main.c vbcc comes already with cgfx.lib for CyberGraphX. vbcc uses the following assigns: vbcc: (and a path to vbcc:bin) vincludewos: vlibwos: If you also want to support ppc.library, there would be two more assigns and some more files. Additionally to the Includes provided by the vbcc-WarpOS Beta you need standard OS Includes. I simply used the ones of StormC, worked fine (just be careful that you do not overwrite some of the special includes of vbcc... for example it handles stdio.h differently to StormC). BTW: amiga.lib of vbcc also includes lowlevel.library, different to StormC where a Stub had to be created for it. I recommend putting -+ into the vbcc:warpos config file, so that you don't get problems if you forget it (-+ allows // C++ style commenting). fd2lib currently only supports 68k-Functions, not PPC-Native functions. The only PPC Native Library supported by vbcc currently is powerpc.library. So you cannot use the PPC Native functions of rtgmaster currently, only the 68k rtgmaster functions (after a rtg.lib has been created... rtg.lib is available on request from me - MagicSN@Birdland.es.bawue.de - or Frank Wille). We are trying to find a solution, so that rtgmaster.library PPC Functions also can be soon used from vbcc. Frank might create a tool to create stubs for PPC Functions in the future, as the compiler already supports it. It is only a question of the Stub-Generator. vbcc handles BeginIO normally, the StormC adaption is not needed here (nor would it work... as the adaption uses StormC-specific stuff...). It uses __PPC__ like StormC does, though. "Function-Contextswitches" like in StormC are not supported (so to create Mixed Binaries you need StormC). A possible solutions to 68k/PPC problems would be to call the Contextswitch by using the according powerpc.library functions manually and link together 68k and PPC Stuff then. But Mixed Binaries of StormC are of course the much more elegant solution. genppcstub is of course not needed for vbcc, fd2libWarp takes it's place. The ASM timer replacement of course does not work like that with vbcc, as vbcc's Assembler, pASM, uses GNU Syntax. i recommend having a look at pASM.doc for this. I won't handle pASM in this document. Okay, now some last notes: Linking together StormC/StormPowerASM and vbcc/pASM stuff: Yes, it is possible. But the symbolnames in amiga.lib, m.lib and such are different. for example printf is _printf in StormC, but ___v0printf in vbcc. So you have to define a function called __v0printf to make the linked together code working (i only got this working by linking with StormLink, i did not get it working by linking with vlink...). One word about ASM Optimization: StormPowerASM and pASM Code looks much different. This document only handles StormPowerASM, not pASM. And about creation of Includes: OS-Includes of vbcc just contain Prototypes, nothing special in there. So you can use any SAS/C Includes or such. Throw away the pragmas, though. About WarpOS/ppc.library parallel developpement: As long as you do not use ASM Optimization you just have to recompile with different parameters and different Includes/.lib i guess... (never tried it...). But if ASM is involved it is more work. pASM can handle both, PowerOpen and System 4. But the ASM Source will look much different. Well, that's it. Well, and as i said above, vbcc-Includes for rtgmaster are available from me, and will be included in the next version of rtgmaster (currently only 68k-functions supported by vbcc, will hopefully change soon...). And well, i don't know when vbcc-WarpOS will be released to the public. BTW: "unixlib" does not yet compile on vbcc-WarpOS. Work in progress. Hopefully then soon there will also be a public release of UnixLib (for both StormC and vbcc-WarpOS).