Forum unknown
· Programming
WBenchMsg
21 messages in this thread
Am having some trouble compiling some code and was wondering if any/all could
help. What's happening is this: The code is designed to compile under
Lattice, and I'm trying to do it with Manx Aztec C (on account of no Lattice)
. Now, the file compiles and assembles perfectly, but in the link the ln
linker barfs on an external reference to something in Lattice called
WBenchMsg. Upon checking, have found that WBenchMsg is contained in files
c.o and in the LC.LIB used by Lattice (a friend checked for me), and in the
code itself it is used as a parser for the WBMessage passed to the program
upon startup. Does anyone know of an equivalent function in Manx, or should
I go and write me own? Not having the RKM, would prefer the former course.
Are you sure it is a function call, and not just an external definition? I
thought the startup code's reference to WBenchMsg was just as a pointer to
the startup message – I'm not sure what that is called under Manx. Can you
post the section of code that references the unresolved mongrel?
Charlie;
Well, here goes…The full source is in ICONEX.ARC (IconExec.C) and here's
the trouble-causing definition and it's usage.
LONG IconBase;
extern struct WBStartup *WBenchMsg;
extern struct FileHandle *CurrentDir();
wbarg= WBenchMsg->sm_ArgList;
if (WBenchMsg->sm_ToolWindow == NULL)
Close(file);
And the code produced by the Manx compiler (that the linker gags on is
_public WBenchMsg
dseg
cseg
end
The linker gags on the reference to WBenchMsg.
John
Try: struct WBStartup *argv[] Haven't tried this, but I think it should work.
Best sdb
No, the WBenchMsg is actually the handle to the message passed by Workbench
if you start a program from WB. I guess Lattice and Manx call it different
names. I'll try to remember to look through the Manx startup code – if you've
got the Professional developers system, John, you can look through the
startup source archive and search for "GetMsg" – the return value should be
stored in a pointer, which you should then transfer into a pointer you
declare somewhere as WBenchMsg ( preferably before it gets used! ). I think
maybe Manx calls it ReturnMsg.
Manx uses wb_msg instead of WBenchMsg as the name of the startup message.
You'll have to either copy wb_msg into WBenchMsg ( after declaring struct
WBenchSomethingorother *WBenchMsg; ) , or replace all references to WBenchMsg
with references to wb_msg.
wouldn't this be a little easier…
#define WBenchMsg wb_msg
Jim
wouldn't this be a little easier…
#define WBenchMsg wb_msg
Jim
See my message to John, WBenchMsg should be just fine, I don't think he
included the startup.h file which defines the structure that WBenchMsg is
point to. Don
Mighta missed something..Startup.h IS included, as is icon.h and workbench.h..
What seems to be happening is that the workbench startup message is defined
differently in Manx and in Lattice..In Lattice, it's defined as WBenchMsg and
the program references it as an extern struct WBArg *WBenchMsg… while in Manx
(according to Charlie Heath) the same thing is called wb_msg. If so, just
changing the extern should do it..will see and report back later.
Hummm…. I just looked at my Manx Disk #1, the definitions are exactly the
same as in Lattice—it is indeed getting stranger and stranger.
Watch out !! When using Manx with Beta 1.2 releases. It does strange
things. I got the new latest update from him that allegidly works on 1.2,
but it gets the "software error" requester.
Watch out !! When using Manx with Beta 1.2 releases. It does strange
things. I got the new latest update from him that allegidly works on 1.2,
but it gets the "software error" requester.
Hummm…. I just looked at my Manx Disk #1, the definitions are exactly the
same as in Lattice—it is indeed getting stranger and stranger.
Mighta missed something..Startup.h IS included, as is icon.h and workbench.h..
What seems to be happening is that the workbench startup message is defined
differently in Manx and in Lattice..In Lattice, it's defined as WBenchMsg and
the program references it as an extern struct WBArg *WBenchMsg… while in Manx
(according to Charlie Heath) the same thing is called wb_msg. If so, just
changing the extern should do it..will see and report back later.
See my message to John, WBenchMsg should be just fine, I don't think he
included the startup.h file which defines the structure that WBenchMsg is
point to. Don
Manx uses wb_msg instead of WBenchMsg as the name of the startup message.
You'll have to either copy wb_msg into WBenchMsg ( after declaring struct
WBenchSomethingorother *WBenchMsg; ) , or replace all references to WBenchMsg
with references to wb_msg.
No, the WBenchMsg is actually the handle to the message passed by Workbench
if you start a program from WB. I guess Lattice and Manx call it different
names. I'll try to remember to look through the Manx startup code – if you've
got the Professional developers system, John, you can look through the
startup source archive and search for "GetMsg" – the return value should be
stored in a pointer, which you should then transfer into a pointer you
declare somewhere as WBenchMsg ( preferably before it gets used! ). I think
maybe Manx calls it ReturnMsg.
Try: struct WBStartup *argv[] Haven't tried this, but I think it should work.
Best sdb
Charlie;
Well, here goes…The full source is in ICONEX.ARC (IconExec.C) and here's
the trouble-causing definition and it's usage.
LONG IconBase;
extern struct WBStartup *WBenchMsg;
extern struct FileHandle *CurrentDir();
wbarg= WBenchMsg->sm_ArgList;
if (WBenchMsg->sm_ToolWindow == NULL)
Close(file);
And the code produced by the Manx compiler (that the linker gags on is
_public WBenchMsg
dseg
cseg
end
The linker gags on the reference to WBenchMsg.
John
Are you sure it is a function call, and not just an external definition? I
thought the startup code's reference to WBenchMsg was just as a pointer to
the startup message – I'm not sure what that is called under Manx. Can you
post the section of code that references the unresolved mongrel?