Path: utzoo!censor!geac!torsqnt!hybrid!scifi!bywater!uunet!talarian!scott From: scott@talarian.UUCP (Scott Weitzenkamp) Newsgroups: comp.windows.x Subject: SunView and XView code possible in same process? Keywords: SunView XView Message-ID: <182@talarian.UUCP> Date: 9 Jan 91 06:52:51 GMT Lines: 47 I am trying to write a program that has both a SunView and XView user interface compiled into the *same* program. This is on a SPARCstation 1 with SunOS 4.0.3c and OpenWindows 2.0. My main program looks something like this: main() { if (getenv("DISPLAY")) { do_xview_stuff(); } /* if */ else { do_sunview_stuff(); } /* else */ } /* main */ The function do_xview_stuff calls XView functions (xv_create, etc), and do_sunview_stuff calls SunView functions (window_create, etc). The problem is when I try to link and run this program. I tried the following libraries first: -lxview -lolgx -lX11 -lsuntool -lsunwindow -lpixrect This gave me an executable where the XView UI worked, but the SunView one just hung. I also tried the following link order. -lsuntool -lsunwindow -lpixrect -lxview -lolgx -lX11 This caused the SunView interface to work, but the XView interface bombs with "SunDefaults Error" messages. Looking at libxview.a with nm, I see that libxview.a has a window_create function. While I guess I should not be too surprised, I am disappointed. Now I have to create two different executables, which IMHO is a waste of disk space. I guess I could also compile my own XView library that had window_create (and the other SunView functions) renamed, but this is rather unattractive. Yet another alternative is to scrap the XView interface, and use Motif instead :-). Can anyone out there think of any way to get a SunView and XView interface in the same executable? -- Thanks in advance... Scott Weitzenkamp, Talarian Corporation, Mountain View, CA uunet!talarian!scott (415) 965-8050 "Welcome to the late show, starring NULL and void" -- Men At Work