C (96/178)

From:Allan Odgaard
Date:22 Jul 2000 at 16:04:31
Subject:Re: I am going OO nuts !!!

On 16-Jul-00, Colin Wenzel wrote:

> However, I would be interested in finding out exactly where
> your compiler gets to know about MUIMakeObjectA()

Dammit... MUI_MakeObjectA() is in the muimaster.library, and the
compiler knows by having seen the proper 'pragma'-definition, thus
inserts something like "move.l MUIMasterBase(a4), a6; jsr
_LVOMUI_MakeObjectA(a6)". MUI_MakeObject() on the other hand is the
variable argument variation, where thee compiler needs to build the
argument list on the stack, and pass a pointer to this to the former
function. Most compilers can do this on-the-fly (again by seeing proper
pragma-stuff), but if it can't, you need either a link library (which
declare a stub function) or you simply declare the stub function
yourself, as I did in my second reply...

>> I don't understand why you don't just change compiler,
> Because if I change compiler at the same time I am trying new
> stuff, I get into the situation of not knowing where the fault is,
> and have no way of resolving problems.

> As it is now, the files I have would not compile anyway,
> because I am obviously missing something,

Your compiler lacks the ability to generate stubs on the fly, so you
would be able to compile with another compiler.

> [...]
> So, if you have any suggestions, I would really like to hear them....

Personally I wouldn't take someone elses source and compile it with my
favourite compiler, cause it often leads to tons of errors, and it's
quite tedious to spend your time fixing these. Instead write something
yourself, line by line -- it's fine with copy'n'paste, but take only
small portions at a time, that'll ensure that each time you get a
compiler error, you should only get one, and you should know exactly
which line has caused the problem...

Regards Allan

------------------------------------------------------------------------
The Most Expensive Thing You Can Haul Is An Empty Trailer.
http://click.egroups.com/1/5776/1/_/451227/_/964281480/
------------------------------------------------------------------------