Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!pacbell.com!ucsd!nprdc!apple From: apple@nprdc.navy.mil (Jim Apple) Newsgroups: comp.windows.x.motif Subject: Need help with Ulowell MotifC++ bindings Message-ID: <15457@arctic.nprdc.navy.mil> Date: 17 May 91 01:10:15 GMT Sender: news@nprdc.navy.mil Reply-To: apple@nprdc.navy.mil (Jim Apple) Organization: Navy Personnel R&D Center, San Diego Lines: 51 I need some help with the Ulowell C++ bindings for Motif. My problem is that I can not pass a object (XMObject) as a argument to a function that is in another source file. here is a short fragment of what I'm trying to do ----- main.cc . void CreateMainMenu( XMForm * ); // I've also tried, void CreateMainMenu( XMObject * ); void main (unsigned int argc, char **argv) { XMApplicationShell topLevel ("topLevel", &argc, argv ); XMForm mainWindow (&topLevel, "mainWindow" ); CreateMainMenu( &mainWindow ); } ----- menus.cc void CreateMainMenu( XMForm * parent ) { XMString string ( "test" ); XMLabel label ( parent, "label", &string ); label.Manage(); } The mainWindow is displayed but I get a message "Destroying Widget ..", and the label is never displayed If I move the three lines from CreateMainMenu to main.cc and replace "parent" with "&mainWindow", it works fine. GDB show main.cc:&mainWindow and Menus.cc:parent to be the same address and type. Any help would be great Config: Sun 3 OS 4.1.1 g++-1.39.1 gdb 3.5 PS: I'd love to hear from anyone else who is using / trying to use these bindings. Jim Apple apple@nprdc.navy.mil WB1DOG ...}ucsd!nprdc!apple