#Manx 5.0 problems
4 messages in this thread
I've been having an awful time with Aztec C 5.0. In fact, my experience has
been so bad that I was sure that I must be doing something grossly wrong.
Manx wouldn't release a product that worked that poorly.
I'm trying to use 16-bit integers and Motorola floating point with small
code and data models. Naturally I link with the c16.lib and mf16.lib
libraries and use sdbf for debugging. My compiler options are set as
follows.
CCOPTS = -ps -a -ff -ss -su -sf -wl -wp (output of Manx set command)
After a week of frustration, I realized that for some reason the compiler
(and probably the assembler and linker) aren't aware of the setting of
CCOPTS. If I explicitly set the switches when I invoke the compiler, then
the programs work better but still not perfectly. If I rely on the settings
in CCOPTS then everything goes to Hell.
My Amiga 1000 has a fairly oddball system software configuration. What I
need to know is exactly what the Manx set command does. Where are the
environment variables stored and how does the compiler access them?
Even with all the switches set in the compiler invocation, I believe that
pointers are still screwed up in my programs. If I pass some arguments to a
program on the command line, the pointers argv[1], argv[2], etc seem messed
up. Argv[0] points to the program name but, argv[2] points to the first
argument. Argv[1] points off into the ozone. It seems line like the
pointers are passed as 32-bits and the program is expecting pointers to be
16-bit.
On another subject, what's with all of the BPTR'S in the Amiga Dos section
of functions.h? The compiler complains about these pointers and the Manx
manual describes the functions using pointers to the appropriate data
structures. HELP!
Are you running under an official release of AmigaDOS? If so what version?
Be sure to check your CCOPTS using the set command by itself. Also there is
another set command flying around out there, could be conflicting. The data
for the set command is stores in a "library" called environment. You can
see it by using the adl command in the debugger. As far as argv goes it
looks like you may not be declaring main correctly. If you say
main(argc,argv) int argc; char *argv[]; scratch that….. Try declaring it
like void main(short argc, char *argv[]), it might work. The functions.h
file is screwed up in a number of places. Some of the things that have BPTR
are not BCPL pointers, but others are. There are also some bugs in the code
generator, I think. Have fun. -BOB
Are you really sure you're using the Manx set command? I've talked to a
bunch of people who were using other ones that didn't work correctly. How
are you declaring argc/argv for your main? It sounds like you may be
declaring them wrong. There are some problems w/ functions.h regarding
BPTR's for the DOS functions. Hopefully, I'll have a fixed version
available in the near future. In the meantime, you should change them to
reflect how you're using them (if your code works now, you're probably
doing it right anyway 😎