home *** CD-ROM | disk | FTP | other *** search
/ APDL Public Domain 1 / APDL_PD1A.iso / program / c / gnu_c / riscos / RiscOS / FAQs < prev    next >
Encoding:
Text File  |  1995-03-06  |  4.2 KB  |  113 lines

  1. known problems and FAQs:
  2. -----------------------
  3.  
  4.  
  5. - GCC produces very inefficient code: use -O or -O2 option (optimize)
  6.  
  7.  
  8. - template.h: replace 'template' in typedef struct ... template through e.g. 'template_t';
  9.   don't forget to change it all over the file
  10.  
  11.  
  12. - you get an extensive list of undefined external(s) with C++? Use '-+' option with mulink.
  13.  
  14.  
  15. - the same as above but with AOF style compiling (-+ option not available for AOF):
  16.   use the extern "C" feature with your standard C header files. For instance:
  17.  
  18.     extern "C" {
  19.     #include "stdlib.h"
  20.     #include "stdio.h"
  21.     }
  22.  
  23.   this will tell the compiler that all the functions prototyped in the included libraries
  24.   are C-style functions not C++ functions. You can use this feature with assembler
  25.   functions too.
  26.  
  27.  
  28. - you still get an extensive list of undefined external(s)? Are you sure you are linking
  29.   your obj with the MUPROS version of all other objs? Remember that mulink does link objects
  30.   it finds in the files you mention. If there are no valid objects in a file mulink sometimes
  31.   does not complain.
  32.  
  33.  
  34. - you get the message 'undefined external(s): __divsi3, __udivsi3, __modsi3, __umodsi3'? You
  35.   are using stubs without the GNU C/C++ extension. Look for the file o.div-fast in the risclib
  36.   directory and append it to stubsmu or run makelibs (rebuilds stubsmu and oslib_mu).
  37.   if you are using AOF you have to link the libary clib:o.gccext with your application.
  38.  
  39.  
  40. - you have no gccext library: run (amu) the makeAOF file in the risclib directory.
  41.  
  42.  
  43. - your application does not startup at all? You have probably converted your AOF stubs to
  44.   MUPROS stubs (aofconvert) without applying option -O. If you do so, MULINK will not link
  45.   some unreferenced areas (e.g. RTSK). But those areas are absolutely necessary.
  46.  
  47.  
  48. - any messages as '...!scrap.scrapdir.x0287400s: 76: error: bla bla bla'? Some incompatibility
  49.   between compiler and assembler occured. Contact me (see below).
  50.  
  51.  
  52. - the same but in floating point context: remember that floating point arithmetic is not
  53.   supported at the moment. Contact me to get the latest version (or check your other software
  54.   sources).
  55.  
  56.  
  57. - just don't read the linker message 'undefined external(s): __root_stack_size, __RelocCode'.
  58.   These symbols are weak external bindings in stubs. As MUPROS does not support weak bindings
  59.   the linker will show the warning though the application will work correctly.
  60.  
  61.  
  62. - do skip the message 'double defined public variable(s): C$$Code' too.
  63.  
  64.  
  65. - your desktop application does not startup: link stubsmu before oslib_mu
  66.  
  67.  
  68. - GCC terminates fast but does not do anything obviously: increase your memory allocation
  69.   either for 'next' or for the task gcc is started by
  70.  
  71.  
  72. - beware of redefining an initializer in a child class, e.g.:
  73.     class a { a(); };
  74.     class b: public a { a(); };
  75.   sometimes this will cause GCC to hang.
  76.  
  77.  
  78. - You would like to use another library than Stubs or RISC_OSlib, e.g. UNIXLIB
  79.   and Desklib (by the way: phantastic, those two libs!)? You can convert them
  80.   as it is done by 'makelibs': use libfile (not supplied with GCC) to split
  81.   the libaries into object files, then convert them with aofconvert and reappend
  82.   them with fappend.
  83.   With revision > B that problem is obsolete: you can use AOF/ALF files now.
  84.  
  85.  
  86. - Your application behaves strange / does not startup at all: have you linked with
  87.   stubsmu and does your application use more than 4kBytes of local variables (stack)?
  88.   Include the line 
  89.     int __root_stack_size = 16384;
  90.   into one of your source files (adjust stack size; could be more or less than 16384
  91.   too).
  92.   GCC does not produce any stack checking code. So automatic stack extension can not
  93.   be done and the stack must be as big as needed from the beginning.
  94.  
  95.  
  96. - you get a number of errors mentioning a conflict with built-in functions:
  97.   change in your string.h header file the prototypes for memcmp, memcpy and strlen
  98.   to
  99.     extern int memcmp(const void * /*s1*/, const void * /*s2*/, long unsigned int  /*n*/);
  100.     extern void *memcpy(void * /*s1*/, const void * /*s2*/, long unsigned int /*n*/);
  101.     extern long unsigned int strlen(const char * /*s*/);
  102.  
  103.  
  104. - you are not able to compile some templates: no solution yet.
  105.  
  106.  
  107. Thomas Aeby
  108. Graeffet 406
  109. 1735 Giffers
  110. Switzerland
  111. Tel. 037/38 16 00
  112. EMail: aeby@uropax.contrib.de
  113.