| Microware OS-9 Support Links | ||||||
|---|---|---|---|---|---|---|
| Home | Training | Resources | TECH-CHECK | History | Registered Support | Logout |
Last updated: 03/06/2006 .
General Issues
Which module edition numbers should I be seeing?
If you are on a DOS or UNIX system, type "xcc". If you are on a resident system, type in "cc". You should see a message that looks like this:
Under DOS, type in "ident -e <module>" to see the edition number. On other hosts, simply type "ident <module>". The correct compiler edition numbers should be:
| Module | 1.3 | 2.0 | 2.1 | 2.2 | 2.3 | 2.4 | 2.5 | 2.6 | 2.7 | 2.8 | 2.9 | 2.10 |
| cc / xcc | 35 | 52 | 57 | 64 | 68 | 93 | ||||||
| old_cc | N/A | 51 | N/A | N/A | N/A | |||||||
| cpfe | 2 | 13 | 22 | 26 | 33 | 55 | ||||||
| cfe | 334 | 339 | N/A | N/A | N/A | |||||||
| ilink | 6 | 10 | 10 | 11 | 11 | 17 | ||||||
| iopt | 60 | 74 | 79 | 89 | 98 | 113 | ||||||
| be68k | 45 | 55 | 61 | 62 | 62 | |||||||
| be386 | 33 | 41 | 42 | N/A | 43 | |||||||
| beppc | 39 | 52 | 54 | N/A | 59 | |||||||
| bearm | N/A | 40 | 55 | N/A | 62 | |||||||
| besparc | N/A | N/A | 12 | N/A | 16 | |||||||
| besh | N/A | N/A | 143 | N/A | 155 | |||||||
| opt68k | 23 | 33 | 41 | N/A | 65 | |||||||
| opt386 | 26 | 33 | 41 | N/A | 66 | |||||||
| optppc | 26 | 33 | 41 | N/A | 66 | |||||||
| optarm | N/A | 33 | 41 | N/A | 65 | |||||||
| optsparc | N/A | N/A | 41 | N/A | 63 | |||||||
| optsh | N/A | N/A | 41 | N/A | 65 | |||||||
| r68 | 187 | 198 | 200 | 202 | 205 | |||||||
| a386 | 45 | 53 | 58 | N/A | 64 | |||||||
| appc | 40 | 47 | 50 | N/A | 57 | |||||||
| aarm | N/A | 47 | 50 | N/A | 57 | |||||||
| asparc | N/A | N/A | 50 | N/A | 54 | |||||||
| ash | N/A | N/A | 50 | N/A | 54 | |||||||
| l68 | 126 | 145 | 147 | 147 | 153 | |||||||
| l386 | 129 | 145 | 147 | N/A | 153 | |||||||
| linker | 127 | 145 | 147 | N/A | 153 | |||||||
| prelink | 7 | 9 | 9 | 9 | 9 | 11 | ||||||
| idump | 3 | 3 | 4 | 5 | 5 | |||||||
| rdump | 23 | 27 | 28 | 29 | 30 | |||||||
| libgen | 23 | 28 | 32 | 33 | 34 | |||||||
| pic | ?? | 4 | 4 | N/A | N/A | |||||||
| EditMod | 14 | 52 | 56 | 57 | 60 | |||||||
| DPSplit | 7 | 2 | 2 | 2 | 3 | |||||||
| deasm | 7 | 7 | 8 | 8 | 8 | |||||||
| decode | 7 | 7 | 8 | 8 | 8 | |||||||
| iclist | ?? | 7 | 8 | N/A | N/A |
N/A = Not Available in that release. Newer compiler components may not be available for older package releases.
The easiest way is to use the linker's new "-gu=<group>.<user>" option. From the command line, you would say something like "cc test.c -olgu=1.0". From Hawk, you can choose Project->Properties, hit the "Link" tab, choose the "Customization" category, and use the "owner" box to set the correct value.
The default stack size is not enough for your program. You have 2 options. Recompile the program and add the '-olM=[K] option to the command line. Optionally, you can increase the stack size of your program when you start it by adding '#' to the command line.
Example:
Does Ultra-C support a #pack pragma?
No. Ultra-C was designed as a strict ANSI compiler, and does not support non-ANSI #pragma extensions.
C Issues
How do I get Ultra C to provide warnings about missing prototypes and other ANSI violations?
Starting with version 1.3 of the compiler, you can check for ANSI warnings and errors. Add "-qp -a=warn" to your compiler arguments. This will force the compiler to compile all files in C++ mode, and this will enforce strict ANSI compliance.
"-cw" will also enable warnings, although this mode is quite verbose.
Can I use C++ style //comments in non-C++ files?
Older versions of Ultra-C would only allow C++ style comments when compiling C++ code. The current version of Ultra-C now allows C++ style comments in C mode by default, but a command line option can turn this behavior off.
C++ Issues
How do I de-mangle C++ variable names?
Use the decode utility. It takes in variable names through standard input.
Don't use CFront compatability mode unless you are certain that you have very old C++ code that will not compile with the default ANSI C++ mode.
Place the _asm() calls in a C function, then add that function's prototype to your C++ code, with extern "C" { } around it.
Example:
/* test.cpp */
extern "C" { void asmfunc(); }
int main()
{
asmfunc();
/* End of test.cpp */
/* test.c */
void asmfunc()
{
_asm("...");
}
/* End of test.c */
Object Code Linker Issues
What does the error "non-remote data allocation exceeds xxx bytes" mean?
You have exceeded the maximum amount of non-remote memory allowed for that processor. (To see the amount allowed, see the appropriate processor-specific chapter in the "Using Ultra C/C++ manual".)
If you are using Hawk: Select the Properties Option underneath the Project tab Click the "Source" tab Choose "Processor" for your category In the settings, try changing the references to a higher setting and re-compile.
If you are using Fastrak: In the Makefile Editor, click the "Ultra C/C++" button Use the Settings and Options boxes to change the references to a higher setting Save the makefile and re-compile.
If you are compiling on a command line: Use the appropriate sub-option (You can find them by typing in "xcc -t?") For example, when compiling for 68k, you would use the "-tp=68k,ld,lc" option.
Note: If global usage of this setting is not desirable (from an optimization perspective), you can use the rdump utility to take a look at your .r files and identify which file(s) use large amounts of non-remote data. Then apply this setting as required (e.g. in Hawk, apply only at the component or unit level).
There are several possibilities:
Make sure you are including the appropriate libraries. (Use -l=<library> on the command line, or include the correct o-code libraries in Fastrak/Hawk)
Check the "Ultra C/C++ Library Reference" manual to make sure that the function you are calling is available in your environment. For example, the function _os_sleep() is not available on a 68k system.
Depending on which target CPU you are compiling for, the compiler may default to using 16 bit (word) code accesses.
Use: 'cc -t?' or 'xcc -t?' to see if this is the default for your target.
To change this, add "lc" to your target processor compiler argument. Then rebuild *all* of your code using the "lc" option.
Example: Compiling for a 68000 target, with 32 bit code access:
cc -tp=68000,lc
The compiler may default to use 16 bit data references.
Use: 'cc -t?' or 'xcc -t?' to see if this is the default for your target.
To change this, add "ld" to your target processor compiler arguments. Then rebuild *all* of your code using the "ld" option.
Example: Compiling for a PowerPC 821 target with 32 bit data access:
cc -tp=821,ld
Example: Compiling for a 68000 target, requiring 32 code and data access:
cc -tp=68000,lc,ld
Why do I get "duplicate symbol" linker errors when I-Coding my program and using the "-iom" option?
-iom can be a dangerous option. In general, it is best to avoid using -iom unless you are certain of the contents of every psect that your program will use and link with.
FAQ: Microware Ultra C/C++ Compiler