[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference hydra::amiga_v1

Title:AMIGA NOTES
Notice:Join us in the *NEW* conference - HYDRA::AMIGA_V2
Moderator:HYDRA::MOORE
Created:Sat Apr 26 1986
Last Modified:Wed Feb 05 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:5378
Total number of notes:38326

2732.0. "Need help compiling VT100 with Manx C" by LOWLIF::DAVIS (That's not a BUG, it's a FEATURE!) Thu Jul 13 1989 04:37

Hi all,

I'm having a bit of a problem trying to compile the VT100 utility.  (Go easy
on me - I'm just starting Amiga programming; fortunately I'm experienced with
VAX C)  Anyway, I'm modifying part of VT100 (remote.c) to make it emulate a
Basic Four terminal instead of a VT100, so...

When I 'make' the makefile (Manx C), both init.c and vt100.c complain that
ConsoleDevice is a multiply defined symbol.  Great, so I go looking and found
that it is defined in intuition/intuitionbase.h as:

	APTR ConsoleDevice

and in VT100.C and INIT.C as:

	struct IOStdReq *ConsoleDevice

Hmmmm.  Very weird.  I think, "how could this have ever compiled?"  So then
I changed all occurrances of ConsoleDevice to Console_Device.  Now it will
compile, but the linker errs out saying that ConsoleDevice is undefined.  I
don't get it.  Nothing even references a ConsoleDevice variable anymore - 
they've all been changed to Console_Device!

Is severe brain damage setting in here or (probably) is there something real
simple that I am missing????

...richard
T.RTitleUserPersonal
Name
DateLines
2732.1some suggestionsMSBIS2::LANDINGHAMGuy M.,BXB1-1/F11,293-5297Thu Jul 13 1989 14:2357
>================================================================================
>Note 2732.0           Need help compiling VT100 with Manx C           No replies
>LOWLIF::DAVIS "That's not a BUG, it's a FEATURE!"    27 lines  13-JUL-1989 00:37
>--------------------------------------------------------------------------------
>
>Hi all,
>
>I'm having a bit of a problem trying to compile the VT100 utility.  (Go easy
>on me - I'm just starting Amiga programming; fortunately I'm experienced with
>VAX C)  Anyway, I'm modifying part of VT100 (remote.c) to make it emulate a
>Basic Four terminal instead of a VT100, so...
>
>When I 'make' the makefile (Manx C), both init.c and vt100.c complain that
>ConsoleDevice is a multiply defined symbol.  Great, so I go looking and found
>that it is defined in intuition/intuitionbase.h as:
>
>        APTR ConsoleDevice
>
>and in VT100.C and INIT.C as:
>
>        struct IOStdReq *ConsoleDevice
>
>Hmmmm.  Very weird.  I think, "how could this have ever compiled?"  So then
>I changed all occurrances of ConsoleDevice to Console_Device.  Now it will
>compile, but the linker errs out saying that ConsoleDevice is undefined.  I
>don't get it.  Nothing even references a ConsoleDevice variable anymore - 
>they've all been changed to Console_Device!
>
>Is severe brain damage setting in here or (probably) is there something real
>simple that I am missing????
>
>...richard
>

I won't even begin to suggest that I'm an experienced C programmer on Amiga,
but on the assumption that general brain-dumping isn't a Bad Thing:

	1) do any references to "ConsoleDevice" occur in any of the include
	   file?  Since these are generally nested this may be happening...

	2) if 1) doesn't hold, perhaps the linker is seeing ConsoleDevice
	   via intuitionbase.h (which I assume you're still including).  Does
	   the linker stop there or produce an executable?

	3) is "multiply defined symbol" an error or warning from Manx?  If
	   it's a warning maybe it's ok (both definitions are pointers, and
	   I can't see where you'd ever want to increment or decrement the
	   console pointer :-)

	4) how about DOS version compatibility?  Are you using 1.3, 1.2, 1.1
	   includes?  How about comparing the include files?  (This seems
	   like a long shot at best; you'd think that something like the
	   console would be backwards compatible...

So much for brain dumps...

Good Luck!!!
2732.2old version of intuition.h, maybeCSSDEV::OSBORNEBlade WalkerThu Jul 13 1989 14:5815
> defined in intuition/intuitionbase.h as:
	APTR ConsoleDevice
>and in VT100.C and INIT.C as:
	struct IOStdReq *ConsoleDevice

>"how could this have ever compiled?" 

VT100 is a pretty elderly program. The version you have may have been compiled
with an earlier version of intuition.h which did not contain the define of
ConsoleDevice.

The solution is to remove the define from VT100.c. As long as intuition.h is
included in the compile, ConsoleDevice should be defined.

JO
2732.3more infoLOWLIF::DAVISThat's not a BUG, it's a FEATURE!Thu Jul 13 1989 16:1419
>> defined in intuition/intuitionbase.h as:
>>	APTR ConsoleDevice
>>and in VT100.C and INIT.C as:
>>	struct IOStdReq *ConsoleDevice

>The solution is to remove the define from VT100.c. As long as intuition.h is
>included in the compile, ConsoleDevice should be defined.

Thanks for the input so far.  The problem is that the definitions are different.
If I remove it from VT100, then ConsoleDevice is being defined as an APTR
(I don't know what that is) instead of a pointer to an IOStdReq struct.  Later
in the code when it references ConsoleDevice->something it will die, right?
I'll try this when I get home, though, just to see what happens.

As for versions, it is VT100 V2.9 and MANX C V3.6.

Thanks again,

...richard
2732.4So many questions...LOWLIF::DAVISThat's not a BUG, it's a FEATURE!Thu Jul 13 1989 23:5311
Well, I guess I found the thing that was messing me up.  I searched all the
include files for "ConsoleDevice" and found it defined as a function in
include/function.h.  Now the program compiles and links just fine.  It even
runs for a while before it GURU's!!  What a bargain!

I'm still confused, though.  What is this mysterious ConsoleDevice() function
that is never mentioned in the RKM's and why did VT100 ever compile for any-
one else with Manx?  (maybe it didn't, i don't know)


...richard
2732.5ConsoleDeviceWJG::GUINEAUFri Jul 14 1989 11:336
SOunds like a "Create me a console window" function.

Is it in the AutoDocs?

John