From: egd@palmetto.cis.ufl.edu (Edward Dickinson)
Newsgroups: comp.os.msdos.desqview
Subject: DVX ".DLL" and other libraries; linking.
Date: 29 Jul 92 19:37:19 GMT
Distribution: na
Organization: Univ. of Florida CIS Dept.

Here is an exchange, by (other) newsgroup & email, about DVX libraries, etc.
Posted here with permission.


Posted to comp.windows.x--------

> Message-ID: <geurin.51.711153278@flounder.nosc.mil>
> From: geurin@flounder.nosc.mil (Chance C. Geurin)
> Newsgroups: comp.windows.x
> Subject: DV/X Porting Problems
> Date: 14 Jul 92 22:34:38 GMT
> Sender: nobody@nosc.NOSC.MIL
> Organization: NCCOSC RDT&E (NRaD)
> Lines: 21
> 
> Hi,
> 
> I am trying to port an X application (xsol) to run under DesqView/X.  The  
> DV/X libraries support X11R4.  I am having problems with three unresolved 
> externals, namely:
> 
> XCreateAssocTable
> XLookUpAssoc
> XMakeAssoc
> 
> The source, xsol.c, includes X10.h.  Are these three functions only 
> implemented under X10?  If so, what would their equivalents be under X11?  
> 
> Any suggestions greatly appreciated,
> ********************************************************************
> *  Chance C. Geurin,  geurin@flounder.nosc.mil                     *
> *                                                                  *
> *  Naval Command, Control & Ocean Surveillance Center for          *
> *  Research, Development, Test & Evaluation [NCCOSC or NRaD]       *
> *  San Diego, Ca.                                                  *
> ********************************************************************
>

===============================================================================


My belated response, by email:

 I noted with interest, your news-inquiry a couple of weeks ago, about 
 resolving externals on a port to DVX.  I didn't have an answer, so didn't
 reply; I know that assoc_tables are not supported under X11.  I've since
 found an apparent answer in O'Reilly's "Xlib Programming Manual," p455; 
 leave the reference to <X11/X10.h> in the source, and "link with the "oldX" 
 library (add "-loldX" to your link or compile/link command line). 

 [Incidentally, your item was in newsgroup comp.windows.x; you may want to
  check in with comp.os.desqview as this now is almost 100% concerned with
  DVX. ]


 You appear to be doing something similar to my own efforts, that is,
 linking to DVX before the availability of development "libraries."  So I'd 
 like to compare notes.  I'm very PC oriented, so am simply trying to port 
 a few sample X programs to DVX as an exercise; for starters, the variations 
 of "Basicwin" from the O'Reilly Xlib book. 

 A PC Magazine in Feb '92 had a program "MAPWIN" for mapping the externals 
 (imports and exports) of Windows .EXE's, .DLL's, and drivers; I had already 
 downloaded it from an FTP site.  As a long-shot I invoked it with the DVX 
 DLL's as data, and got maps of them!  So I now have direct information on 
 what is /is not available in these DLL's. A quick comparison to O'Reilly's 
 "XW in a Nutshell" book showed that all the R4 stuff was there (with a few 
 name changes; in DVX, EVERYTHING in Xlib starts with 'X', not just 90%). 
 
 The obvious remaining problem was what to use for .h include-files, since 
 the bare DVX package doesn't supply these.  I was able to steal some .h's 
 from a Sun; but of course these are not really portable.  "Pushed them
 around" in a very crude way, not really understanding the content; until I 
 got a clean compile. 

 Then to LINK; my MicroSoft C700 package has many ways of linking windows-
 related files; the combinations that I had time to try, all gives a blank 
 (black) window under DVX. At that point I got busy on another task. 

 Would like to hear how your port is doing; whether the above info is of 
 use; & if you have any ideas for pushing through my little project.  I can 
 probably find the LINK solution, if a valid combination of parameters 
 exist; will need more help on the .h's, but won't flood you with details at 
 this point. 

 I can send you any of the MAPWIN-related stuff if it sounds interesting. 

 --Ed


==============================================================================


Email answer:

 From geurin@flounder Wed Jul 29 11:00:33 1992
 Date: Wed, 29 Jul 92 08:04:21 PDT
 From: geurin@flounder.nosc.mil (Chance C. Geurin)
 To: egd@palmetto.cis.ufl.edu
 Subject: Re: DesqView X
 Status: R
 

> I noted with interest, your news-inquiry a couple of weeks ago, about 
> resolving externals on a port to DVX.  I didn't have an answer, so didn't
> reply; I know that assoc_tables are not supported under X11.  I've since
> found an apparent answer in O'Reilly's "Xlib Programming Manual," p455; 
> leave the reference to <X11/X10.h> in the source, and "link with the "oldX"
> library (add "-loldX" to your link or compile/link command line). 

I have since found out that the DVX libraries don't have liboldX
support.  So, I grabbed the X11R5 source for liboldX and the appropriate
header files from a Sun and ported them to the PC.  I got a flawless
compile and link then, but the application dies amidst uniformative
errors halfway through.
> 
> You appear to be doing something similar to my own efforts, that is,
> linking to DVX before the availability of development "libraries."  So I'd 
> like to compare notes.  I'm very PC oriented, so am simply trying to port 
> a few sample X programs to DVX as an exercise; for starters, the variations
> of "Basicwin" from the O'Reilly Xlib book. 
> 
But, I do have the development libraries.  You can purchase them from
QuarterDeck pre-release for $500 with a full upgrade when they become
generally available.  Included with the libraries are the DOS4GX
extenders and linking tools.
>
> The obvious remaining problem was what to use for .h include-files, since 
> the bare DVX package doesn't supply these.  I was able to steal some .h's 
> from a Sun; but of course these are not really portable.  "Pushed them
> around" in a very crude way, not really understanding the content; until I 
> got a clean compile. 
>
Well, the obvious solution is to buy the development libs (would save
alot of time), but if you can hack through without them, go for it!

> Then to LINK; my MicroSoft C700 package has many ways of linking windows-
> related files; the combinations that I had time to try, all gives a blank 
> (black) window under DVX. At that point I got busy on another task. 

A linking facility called XGLU comes with the development libs that
links your .OBJ files with the DOS4GX stuff so your X program can have a
'flat' address space.

> Would like to hear how your port is doing; whether the above info is of 
> use; & if you have any ideas for pushing through my little project.  I can 
> probably find the LINK solution, if a valid combination of parameters 
> exist; will need more help on the .h's, but won't flood you with details at
> this point. 

Indeed, my porting efforts have stalled at this point as I have other
tasks to perform and this is just a side effort.
 
Chance.

 
===============================================================================

  I'm interested to hear, whether my MAPWIN "discovery" is of use to others,
or just reflects a beginner's level of understanding, of DLLS etc.  My effort
with INCLUDE files was crude & is not amenable to much help over the net; 
unless someone has a coherent set of them available .h's available for this
task.
  Any comments on Chance's effort should of course go to him, or be posted.

--Ed
Newsgroups: comp.os.msdos.desqview