CompuServe Thread

Forum unknown · Programming

WBenchMsg

21 messages in this thread
#20369From: John MesiavechMay 27, 1986 12:54 AM
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.
#20497From: Charlie HeathMay 27, 1986 10:48 PM
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?
#20529From: John MesiavechMay 28, 1986 1:18 AM
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
#20536From: Scott BallantyneMay 28, 1986 1:41 AM
Try: struct WBStartup *argv[] Haven't tried this, but I think it should work. Best sdb
#20708From: Charlie HeathMay 29, 1986 12:58 AM
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.
#20718From: Charlie HeathMay 29, 1986 1:15 AM
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.
#20723From: Jim Nangano/SYSOPMay 29, 1986 1:24 AM
wouldn't this be a little easier… #define WBenchMsg wb_msg Jim
#20723From: Jim Nangano/SYSOPMay 29, 1986 1:24 AM
wouldn't this be a little easier… #define WBenchMsg wb_msg Jim
#20729From: Don CurtisMay 29, 1986 1:48 AM
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
#20748From: John MesiavechMay 29, 1986 4:17 AM
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.
#20869From: Don CurtisMay 30, 1986 12:34 AM
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.
#20900From: John DraperMay 30, 1986 7:32 AM
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.
#20900From: John DraperMay 30, 1986 7:32 AM
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.
#20869From: Don CurtisMay 30, 1986 12:34 AM
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.
#20748From: John MesiavechMay 29, 1986 4:17 AM
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.
#20729From: Don CurtisMay 29, 1986 1:48 AM
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
#20718From: Charlie HeathMay 29, 1986 1:15 AM
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.
#20708From: Charlie HeathMay 29, 1986 12:58 AM
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.
#20536From: Scott BallantyneMay 28, 1986 1:41 AM
Try: struct WBStartup *argv[] Haven't tried this, but I think it should work. Best sdb
#20529From: John MesiavechMay 28, 1986 1:18 AM
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
#20497From: Charlie HeathMay 27, 1986 10:48 PM
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?