Xbasic Backstage

 

This part is about the core behind XBasic,
Let me remind you that you will observe this document as how I see XBasic, not from the viewpoint of the original XBasic author Max Reason.

Also beware that this is my personal notepad scrubbler, so the descriptions and paragraph orgination might come over messy.

I'll describe some issues what I am working on behind my own projects to enhance and understand XBasic and the use of functions as this page also forms a backflip reference for my own purposes, the reason why I make this public is because someone else might find it handy or even can add or correct things that may be handy for me, so it works multidirectional.

A brief description how the .Mak script works in XBasic
Make-files and compilers are very common in many programming language environments or are even a must to have on certain operating platforms like Unix/Linux, as Xbasic works with .Mak files that build up your application or library to go and run you might be intrested to know how you can assemble them yourself to conduct executables that contain all libraries which are by default stored in the /xb/run/XB.DLL (or {xbpath}/bin/xbrun.dll in Eddie's version)


Each (n)make performance will invoke a script-setup task that will do a couple of things:The .Mak file for your source will be generated then the script will be run through checking for the assembly consistency between your latest saved source-file and existing *.s file, if the "diff" is true, the *.s assembly compilation will be regenerated and afterwards also a new object (*.o) file.

Changing the .Mak file might not always be as easy as you think or will not supply the results you were hoping for.
You have to consider the hidden things behind your .mak file such as the string of your program name and if you have an xbasic source of a library you want to include or you only have a .DLL file you want to include.

If one or another does not meet required expectations chances are likely that (n)make will end with an error, if not (n)make maybe even the XBasic compiler already will.

When the assembly source is generated three other files are then created:
applicationfilename.mak
applicationfilename.dec
applicationfilename.def


Structure of the .makfile

If you take a closer look at the "applicationfilename".mak you'll notice the following structure
 

# Note: the next three lines are modified by the makefile-generator in xcow.x.
APP       = applicationfilename
LIBS      = xb.lib
START     = START /W

!include <xbasic.mak>

all: $(APP).exe

$(APP).exe: $(APP).o
        $(LD) $(LDFLAGS) -out:$(APP).exe $(APP).o $(RESOURCES) $(LIBS) $(STDLIBS)

$(APP).o: $(APP).s

$(APP).s: $(APP).x
        $(START) xb $(APP).x


 

The include file can either be xbasic.mak (in the above case referencing to Eddie Penninkhof's Xbasic release V6.x.0+) or win32.mak (In Max Reason's versions -V6.0022)

There are three lines that will be altered by the XBasic compiler when it is generating your "applicationfilename".s assembly source.
The first line (APP) is the (file)name of your application. You may rename it after compilation and linking but xbasic picks the titles you choose to save your sources under.
The second line (LIBS) will always contain xb.lib and when applicable (if you import other third party libraries like unzip32.dll) it will add the .lib references to those files.
You need a proper .LIB file belonging to the .DLL you want to call functions from within your application. See the MakeDef tip later on in this text to make a lib-file if you don't have one
START is just a tool in windows that allows you to start a program either in the background as multitask or as a foreground tool without allowing any other applications to execute simultaneously. Compiling two xbasic sources at the same time can provide problems or unexplainable errors that's why it is there.

"all:" the all expression is the general end-result expression for nmake so it knows what your end-product is (in other words:when to stop processing your files) and which line to start checking if the file exists yes/no.
The $(APP) refers to the APP definition done in the TOP of the mak file and it attaches ".exe" to it.
So for $(APP).exe you should actually read "applicationfilename.exe" as this also goes for the rest. ($(APP).o, $(APP).S) etc.

nmake / make works with labels ending with colons (:) and each action behind it may be a direct executional command or a reference to another label.


Let's perform the script the way nmake does it so you understand how nmake processes it:
We would notice $(APP).exe in the "all:" label so we see what we need to do to get it if the file does not exist:
Going to $(APP).exe:
Owh, we need ($APP).o, we don't have it so let's see how we get $(APP).o
Going to $(APP).o
Owh, we need ($APP).s, we don't have it so let's see how we get $(APP).s
Going to $(APP).s
Owh, we need ($APP).s, and ofcourse we do have this so perform the action to get $(APP).s:
        $(START) xb $(APP).x
Great now we can also make $(APP).o
        perform default action from within xbasic.mak!
And then we can make the exe-file:
        $(LD) $(LDFLAGS) -out:$(APP).exe $(APP).o $(RESOURCES) $(LIBS) $(STDLIBS)


Okay this is little understandable, but you wonder where the hell $(AS) stands for and what are $(RESOURCES) and $(STDLIBS)?
For this we need to examine the "xb\include\xbasic.mak" as those variables are defined within there:


# xbasic.mak - nmake include-file for XBasic

.SUFFIXES: .o .s .x

# The linker
LD          = link

# Flags for the linker
LDFLAGS     =  /NODEFAULTLIB /INCREMENTAL:NO /PDB:NONE /RELEASE /NOLOGO \
-entry:WinMainCRTStartup -subsystem:windows,4.0 -version:4.0 -debug:partial -debugtype:coff

# Flags for the linker when building .dll-files
LDFLAGS_DLL = -dll -subsystem:windows,4.0 -debug:partial -debugtype:coff

# Needed resources
RESOURCES   = xb.rbj

# Needed runtime libraries for the standalone exe
XBRUNTIME       = xlib.o xexcept.obj xrun.o xst.o xgr.o xui.o xcm.o xma.o xin.o xut.o   xzzz.o

# The assembler
AS          = spasm

# All needed standard libraries.
STDLIBS     = msvcrt.lib kernel32.lib advapi32.lib user32.lib gdi32.lib \
              comdlg32.lib winspool.lib wsock32.lib

# The XBasic compiler
XB          = xb

# Default rule to assemble an assembly-file into an object-file.
.s.o:
        $(AS) $?

# Default rule to compile an XBasic-file into an object-file.
.x.s:
        $(XB) $?



As you see, the xbasic.mak defines $(AS) as "spasm" or "spasm.exe" which is in the xbasic binary directory. Spasm translates your .s sources to .o object files which can be linked within executables or dynamic link libraries (DLL).
As you notice, you see default rules in there like the
.s.o:
        $(AS) $?

those rules are performed to take care missing files will always be created. somehow, this can come over quite confusing but it's just the way the scripts are designed (not by me!)

Take a good look at the above xbasic.mak contents as you need them in the next chapters, if necessary (or different) copy the above missing or different parts to your own version.


How do I make a .mak file that generates a full executable that does not need XB.DLL?
You need to have the XBasic object files in order to be able to integrate the libraries into your executable.
To generate the object files (xst.o, xui.o, xin.o etc.) you need the xbasic sourcefiles

If you don't want to generate them you can download an object package (*** Rtnote ***) from here and you can unzip this (extract with directory option) into the directory where you installed XBasic. (the directory where you can see the subdirs bin, include, templates, demo, etc.) for Eddie Penninkhof's version.

If you use Max reason's version of xbasic, then don't extract with directory option, just copy them in the \xb directory and move the xapp.* and xdll.* to the \xb\xxx directory, I guess that should work but I haven't tested this in his version

*** Rtnote *** This object package is specially compiled that the console window is auto-surpressed. If you want the console window to appear supply the commandline argument -Verbose to your executable to have it popped up during startup.


If you feel annoyed by having to include some loose library file in your distribution package as if you made it in a cheap version of VB I can understand this, it also takes up more space even when packed with packers like UPX, your complete distribution file will be larger since both executable and XB.DLL contain API code that the makefile integrated which is not necessary.

Warning:If you want to control an XBasic compiled DLL from within your XBasic compiled executable then you can't integrate the XB libraries into the executable but you can in the DLL.

If you look in your \xb\xxx directory (In Max's version) or in the \xb\templates directory (In Eddie's version), there should be an xapp.xxx and an xdll.xxx. The xapp.xxx will be invoked to generate the .MAK file for your standalone executable, the xdll.xxx is used to make link-libraries.

First you make a copy of your original xapp.xxx as it came with XBasic. Copy this one to xapp.xyz in the same directory, this backup is required in another situation.
In order to change your default .MAK file so that it will compile a complete XB.DLL free executable you need to change the xapp.xxx to this shape :

 

 # Note: the next three lines are modified by the makefile-generator in xcow.x.
APP       = xapp
LIBS      =
START     =

!include <xbasic.mak>

all: $(APP).exe

$(APP).exe: $(APP).o
        $(LD) $(LDFLAGS) -out:$(APP).exe xstart.o $(APP).o $(XBRUNTIME) $(RESOURCES) $(LIBS) $(STDLIBS)

$(APP).o: $(APP).s

$(APP).s: $(APP).x
        $(START) xb $(APP).x


Note:that xstart.o and $(XBRUNTIME) have been added and the xb.lib has been disappeared.

If you now compile your executable and you will parse the script to nmake you will get an executable that has + 1.8MB integrated library material.
Inserting extra sources you made to serve as library can be added as long as you integrate them similar like xst, xgr, xui etc are integrated above.
For each XBasic library that has an object file (.o) you can simply add the xbgeneratedlibrary.o between the $(APP).o and $(XBRUNTIME) parameters, for each third party .DLL you can place the corresponding .lib-file name at the end of the line in the "LIBS = " variable (IF the XB compiler already haven't done this last case for you)
Do note that third party DLL libraries which come with no source, no object file and are non- XBASIC can not be included into the executable the way you can do with the xbgeneratedlibrary.o, you have to make a .LIB file first and then add it behind the $(link) invokement just like the wsock32.lib is integrated


How do I make a lib-file from a .DLL without having at least the original source?
Ken Minoque created a new tool which is capable of analysing exports and imports from a .DLL library and it also can create a lib-file for you as well as the required .DEC file.
Though you need to define the function arguments when you let dllGuide create the .DEC file!
Currently this seems the best option to try first, if this fails you may want to proceed to try the procedures written in following chapter.
You can download Ken's DLL analyser here.

In order to make a lib-file you need to have a *.DEF file extracted from the .DLL
a LINK /DEF:3rdparty.def should do the trick of extracting and making the .lib-file.LINK /IMPLIB:3rdparty.dll should work too but it requires you to have IMPLIB.EXE from either Microsoft or Borland. IMPLIB also creates the *.lib file for you.

If you don't have IMPLIB or you have a Win'98 version that refuses to do "LINK /DEF:3rdparty.def" because it quits with an internal error I have here a small tool that will extract a .DEF file out of your 3rd party dll.
You manually have to generate the .lib file by invoking LIB.EXE after extracting the .DEF file:
LIB.EXE /DEF:3rdparty.def

NOTE!:The MakeDef will not always be a solution to all standards.
You will notice that your source works when ran in the XBasic PDE but as soon as you try to make a standalone executable you get Link errors on function calls even though you have the .LIB file;
In some way XBasic attaches address links (@#) behind export functions in the [MySource].s file while they are not included in your own source at all. A quick solution might be to remove all the @# offset addresses behind the exported functions that are used in the external DLL from your "MySource.s" file after precompilation;
eg:
The external DLL has a function called ExportedFunction()
you compile your source:

xb MySource.x
Now open the MySource.s in a text editor and search for any ExportedFunction@
You may see something like:
ExportedFunction@0 (1 or 2 whatever).
Remove the @ and everything behind it.
Do this for EVERY function in that .DLL file that you call.
Save the MySource.s

Make your standalone binary:
nmake -f MySource.mak

Another thing that might solve it is to use the original .LIB file that came with it. If that does not work (mostly it's the reason that you can't use it) you might be dealing with a MS LIB 6.0 format that has to be converted back to LIB 5.0
The only method I know how to do this is using LIB.EXE and LINK.EXE V6.0 for this and the downside is that MS LIB and LINK are not public available neither have I found little tools that can at least convert the library formats back to 5.0 compatible mode.

If you have LIB / LINK 6.0 or you know someone who has, converting the lib is as simple as:

LIB OUT:[thrdpartylib50].lib [thrdpartylib60].lib /LINK50COMPAT.

If that method does not work, check your declaration methods in the [thrdparty].dec if they are proper (CFUNCTION or FUNCTION?) in any other case I have no solution yet.

How do I communicate with third party libraries?

This is a section I treated once before so here is the pasted hardcopy of the textfile:

                *How to write interface functions for external .DLL libraries*

This small tutorial explains the ins and outs of communicating with external .DLL files.

What do you need to complete a successfull call?

-The .DLL library.
-The documents on how to call them, if possible included source-files.
-The .LIB file if you want to compile your source to an executable.


Why do we need a third party DLL?

Maybe because this external library is capable of something that Xbasic is not capable of, or
it procedes quicker than you could accomplish it in xbasic or you don't know how to accomplish
what you want that this library does do for you.

Anyway, nine out of ten cases we use them because someone had time to make something we as
todays programmer are too lazy for.
And why not? Why re-inventing wheels if the answer is freely available?

So let's get going shall we?...

What do we start with?

First we read the documents supplied by the library vendor.

#############################################################################################
Let's take ABC.DLL for example.

ABC.TXT says:

This DLL contains two functions with several arguments to pass.
Both [by value] and [by reference] are supplied. A brief explanation of what each function does
and what it desires is explained below:

InitiateDLL(AddressBook)

Passes by reference:
 AddressBook (Composite)


This function initiates the DLL file, it will set two function addresses located in YOUR source
to call when nessesary.
The addresses should be stored in an array or composite type and should be Unsigned Long
Integers.

DoYourStuff()

This function starts the actual DLL routine.
It does not require parameters or global variable to be set prior before calling DoYourStuff().


                        [Internal functions your source is required to have:]

RequestTextString(TextStringAddr, lenOfTextString)

Passes by reference:
 TextStringAddr (Long)

Passes by value:
 lenOfTextString (Uint)

Return values:
0 = Okay
1 = Failed

Here you design a function that requests input from the user.
When the user supplies his input, the function should supply the calculated length of the
string in the lenOfTextString variable and should supply it's address in the TextStringAddr
variable.

When the user supplies an empty string, return 1 to the DLL so that the DLL
can abort it's process action.


PrintTextString(TextStringAddr, lenOfTextString)
Passes by reference:
 TextStringAddr (Long)

Passes by value:
 lenOfTextString (Uint)


This function will return the address of the TextString and the length of it.
Here you print the message that you can obtain from the supplied address.

#############################################################################################


Good now let's translate this prescription to xbasic language:

We need to make two functions that can be called by the DLL and we need to make
one function to call these two DLL functions. There are five steps to take to set up an
initial program from where you will be able to start off;
Let's advance step by step:

 

** Step 1 **
First we need to make an ABC.DEC file to declare the external functions in there, without it
you can't even import the .DLL library!

In the .DEC file you are required to declare the functions you need to call from within the third
party DLL library and your are required to set initial values and variables that this library
need to work with.

Notice that type descriptions were declared as "Long" and "Uint"

Long is in xbasic an XLONG
Uint in xbasic is a USHORT
Composite is a composite type means, it's a user defined type combined out of an array of types.
Just look at the ADDRESSBOOK which follows next when designing the .DEC file.

Now an XLONG variable you don't need to specificly declare this because any variable without a
type prefix is automaticly defined as XLONG. However for the ULONG and USHORT we have to take
some measures:

--Begin-- ABC.DEC

TYPE ADDRESSBOOK
 ULONG  .RequestTextString
 ULONG  .PrintTextString
END TYPE

'Since the passed type is not a specific single type, declare the argument type as ANY to prevent
'unnessesary problems that might arise.

EXTERNAL FUNCTION InitiateDLL(ANY AddressBook)
EXTERNAL FUNCTION DoYourStuff()


-- End --

 


** Step 2 **
In the next step, we create a sourcefile where we will call the library. Depending on how
you would like your program to interact with your user you can create a new "GUI program" or just
a "Program" type of source.

In below case "Program" will be sufficient.

 


** Step 3 **
We create two new functions called "RequestTextString" and "PrintTextString"

 

** Step 4 **
Then we need to import the library into the Xbasic source in the PROLOG, set the addressbook
array and declare the arguments needed in the two new functions (since they are empty when
created):


--Begin-- PROLOG

' Importing the library:
imp "ABC"

' Declare internal functions:
DECLARE FUNCTION RequestTextString (TextStringAddr, USHORT lenOfTextString%%)
DECLARE FUNCTION PrintTextString (TextStringAddr, USHORT lenOfTextString%%)

' Declare the address array:
ADDRESSBOOK #AddressBook

-- End --

 


** Step 5 **
And finally we set up the functions to call the library or that are being called by the library:

FUNCTION Entry()

  'Setting the addresses (We need to convert XLONG to ULONG first!) :
  #AddressBook.RequestTextString = ULONG(&RequestTextString())
  #AddressBook.PrintTextString = ULONG(&PrintTextString())

  'Initiate the DLL, pass the argument by reference (address):
  InitiateDLL(@#AddressBook)

  ' Call the main function:
  DoYourStuff()

END FUNCTION


FUNCTION RequestTextString(TextStringAddr, USHORT lenOfTextString%%)
  Text$ = INLINE$("Give me some input pleaze")

  IFZ Text$ THEN
    ' Abort further operation.

    RETURN 1
  END IF

  lenOfTextString%% = LEN(Text$)
  TextStringAddr = &Text$

  ' Input okay.
  RETURN 0

END FUNCTION

FUNCTION PrintTextString(TextStringAddr, USHORT lenOfTextString%%)

  Text$ = XstNextCLine$(TextStringAddr,@index,@done)

  PRINT "Returned text:"; Text$
  PRINT "Length :";lenOfTextString%%

END FUNCTION

 

 

 


*** END ***
That was it for this simple demonstration.

So it's not superimportant to know what the InitiateDLL() and the DoYourStuff() precisely do
as long as you know what they need and in what order they call your own internal functions.

What this function does is supplying the address where your textstring is located and the amount
of bytes the textstring contains, the DLL might do several things with it or just nothing
(that's where the term "Black Box" comes from) the important thing is that it for sure returns
the address back to the PrintTextString function and the length of the text where the text
will be retrieved in a bit other way than conventional.

This routine would be very unefficient and makes a big workaround but it demonstrates the essence
of communication between your Xbasic application and the Third party .DLL library you need to use
for it.

 

Some extra sidenotes:

[Declaring DLL functions in it's relating .DEC file]

In occasional situations you need to declare functions as CFUNCTION rather than FUNCTION:
EXTERNAL CFUNCTION CDECL_Func()

This has to do with the fact wether functions in the library are declared STDCALL or CDECL.
General windows programs do an STDCALL so a FUNCTION declare will be sufficient.

Some comments Max Reason supplied on the Yahoo Groups list about this matter:

        Windows C supports two function protocols, STDCALL and CDECL.
  All Windows API functions are STDCALL, as are many libraries
  made for Windows.  STDCALL is slightly more code-efficient
  than CDECL, because the called function removes arguments
  from the stack before it returns - instead of that code being
  necessary everywhere the function is called.

  But C variable length argument lists, for example printf(),
  cannot be written in STDCALL because the called function
  cannot be certain how many arguments were passed each time,
  and even if it could, would require some strange code to
  figure it out each time and remove the correct number of
  bytes from the stack each time it was called.

  The long-time standard C function protocol is CDECL, which
  requires function arguments be removed by in the calling
  function, but supports variable length argument lists.

  In XBasic programs, functions can be declared:

    DECLARE FUNCTION - "default protocol" - generally STDCALL
    DECLARE SFUNCTION - "system protocol" - the OS standard
    DECLARE CFUNCTION - "CDECL protocol" - old C standard

 

[Debugging]
Debugging in cases of invalid memory access is almost impossible, you can throw a few
XstLog("the program came till here") lines along your functions to see where it gets but if
it gets stuck on a function it tries to call and you don't know what function, you're stuck
unless you have the source-code of the original DLL library.

In the case i got strengled in, i even needed to test the source of the third party in it's
original programming environment (Which was VB) to find out where my library got stuck!
This was also a good reference to find out how unefficient VB works with third party DLL info.
The VB source used some complicated workarounds to be capable of grabbing a string from DLL
memory or transferring a string to DLL memory while in Xbasic this is far more easy.
Problem is only you need to find which way this easy way is...

[Using applicational provided memory]
In some cases functions require you to transfer strings or values to a memory location that the
DLL reserved for your function.

In this case you should get returned:
-The address where the buffer is reserved;
-The bufferlength in bytes.


*Here is amongst others how you can do this*

' ("BufferSize" and "BufferAddress" are supplied by the DLL)

'Filling a local string with the buffersize amount of zero-terminate chars:
TempString$ = NULL$(BufferSize-1)

'Arrange the user to supply some input
Tp$ = INLINE$("Give me some text")

'Paste the userinput into the bufferstring
TempString$ = XstMergeStrings$(TempString$,Tp$,1,LEN(Tp$))

'Copy the stringcontents to the bufferlocation reserved by the DLL.
XstCopyMemory (&TempString$,BufferAddress,BufferSize-1)

' Be very cautious: BufferAddress == passed by Value OR reference?


[Supplying addresses to own arrays]
Recently David Szafranski came up with a string and buffer problem required by a printer command.
In this case the library worked with an array of several 64 bytes strings. It needed to know
where to store this info. This was the solution:

 TYPE PAPER_NAME_BUFFER         'Declare the type and length of the string
   STRING*64  .pNameBuffer
 END TYPE
 
 DEVMODE dm     'note DEVMODE is already defined in winspool.dec
 PAPER_NAME_BUFFER pNameBuffer[]        'Declare the array


'create a buffer for paper size array
REDIM pNameBuffer[numPaperNames-1]      
REDIM result$[numPaperNames-1]

'printer$, port$, capFlag, &dm are previously defined

'The address of the first array &pNameBuffer[0] is supplied, which is sufficient.
'The amount of strings 64 bytes each is already allocated when redimensioned earlier.
ret = DeviceCapabilitiesA (&printer$, &port$, capFlag, &pNameBuffer[0],&dm)

'To get the results from the buffer
FOR i = O TO numPaperNames-1
  result$[i] = CSTRING$(&pNameBuffer[i])
  PRINT result$[i]
NEXT i


To help you out a bit more, there is an example in the Yahoo Groups directory online.

Search the "Vault" section [files\API and third party DLL interfacing];
There you will find the xbunzip32.zip which contains an example of interfacing
with the InfoZip unzip library.

The Zip32.DLL can be retrieved from http://www.cdrom.com/pub/infozip/

 

 



Releasing your XB executable with a by XB compiled DLL-file
If you figured out how to make the XB.DLL libraries integrate with your executable you will most probably experience problems when you also have compiled .DLL files involved. I found a method that works but it actually requires you to cloack the XB.DLL by the DLL name you made by yourself.
It took a couple of stupid mistakes before I realised that my attempt was the right one and did not made it that impossible to integrate the libraries into the .DLL I could never believe that the XBasic compiler would be so problematic that it would not even allow other functionality implemented within the XB.DLL itself but this is how you should act in order to have them properly implemented:

Above is explained the xapp.xxx and what you need to adjust in this file to implement the runtime libraries into your own executable. The situation where you want to call an XBasic generated .DLL is the situation where it is important that you copy back the original xapp.xxx by copying back the xapp.xyz across the existing xapp.xxx since if you link the XB libraries into both the .DLL and the executable, they will guaranteed conflict with eachother and crash with an illegal error. So you have to implement those object libraries in only one of the dll's that is being called by your executable.
At the same time or after you make a backup of your current xdll.xxx by copying it to xdll.xyz if you haven't done so yet.

To implement them in your .DLL make the (or adjust the .mak-file of your to be linked library object-file) xdll.xxx look like this (Also remember that you have your xbpath\include\xbasic.mak synchronised with the version above) with the exception of the name of your application:


# Note: the next three lines are modified by the makefile-generator in xcow.x.
APP       = xapp
LIBS      =
START     =!include <xbasic.mak>

all: $(APP).dll

$(APP).dll: $(APP).o $(APP).def
        $(LD) $(LDFLAGS_DLL) -out:$(APP).dll $(APP).o -def:$(APP).def $(XBRUNTIME) $(LIBS) $(STDLIBS)

$(APP).o: $(APP).s

$(APP).s: $(APP).x
        $(START) xb $(APP).x -lib


Good, that for the .MAK file, now DON'T execute nmake YET, first we are going to do two other things in order to make this compilation successful;
Open the .DEF file of your library an example is attached below:

[sidedit.def]

LIBRARY  sidedit
VERSION  1.0000

EXPORTS  %%%%blowback_sidedit
EXPORTS  %_StartLibrary_sidedit
EXPORTS  Entry
EXPORTS  GetFileData
EXPORTS  InitSidCenter

As you can see, it exports a blowbackroutine, a startlibrary and three other functions.
The first three will be called by themselves at startup, the last two are the true exports which I call in my executable.

To take care that the library contains all XB.DLL libraries that I need, I adjust the sidedit.def in that way that the library will be properly compiled:not only that it contains all XB.DLL objects but also that the stub-table contains all the information that LIB.EXE requires to make a proper sidedit.lib file (beware, this is going to be a long list) I have taken those values from the XB.DEF, they are not included in the binary XBasic distribution but you can copy the extra export definitions from below (with exception of the first five function exports ofcourse as they belong to sidedit and not to XB):

[sidedit.def]

LIBRARY  sidedit
VERSION  1.0000

EXPORTS  %%%%blowback_sidedit
EXPORTS  %_StartLibrary_sidedit
EXPORTS  Entry
EXPORTS  GetFileData
EXPORTS  InitSidCenter

EXPORTS  XxxMain
EXPORTS  XxxG
EXPORTS  XxxGuessWho
EXPORTS  XxxGetEbpEsp
EXPORTS  XxxSetEbpEsp
EXPORTS  XxxGetFrameAddr
EXPORTS  XxxSetFrameAddr
EXPORTS  XxxGetFPEnvironment
EXPORTS  XxxClearFPException
EXPORTS  XxxCheckMessages
EXPORTS  XxxRuntimeError
EXPORTS  XxxRuntimeError2
EXPORTS  XxxStartApplication
EXPORTS  XxxFPUstatus
EXPORTS  XxxEBPandESP
EXPORTS  XxxTerminate
EXPORTS  XxxFCLEX
EXPORTS  XxxFINIT
EXPORTS  XxxFSTCW
EXPORTS  XxxFSTSW
EXPORTS  XxxF2XM1
EXPORTS  XxxFABS
EXPORTS  XxxFCHS
EXPORTS  XxxFCOS
EXPORTS  XxxFLDZ
EXPORTS  XxxFLD1
EXPORTS  XxxFLDPI
EXPORTS  XxxFLDL2E
EXPORTS  XxxFLDL2T
EXPORTS  XxxFLDLG2
EXPORTS  XxxFLDLN2
EXPORTS  XxxFPATAN
EXPORTS  XxxFPREM
EXPORTS  XxxFPREM1
EXPORTS  XxxFPTAN
EXPORTS  XxxFRNDINT
EXPORTS  XxxFSCALE
EXPORTS  XxxFSIN
EXPORTS  XxxFSINCOS
EXPORTS  XxxFSQRT
EXPORTS  XxxFXTRACT
EXPORTS  XxxFYL2X
EXPORTS  XxxFYL2XP1
EXPORTS  XxxWriteWin32s
EXPORTS  %_ZeroMemory
EXPORTS  %_eeeAllocation
EXPORTS  %_eeeOverflow
EXPORTS  %_eeeErrorNT
EXPORTS  %_OutOfBounds
EXPORTS  %_NeedNullNode
EXPORTS  %_UnexpectedLowestDim
EXPORTS  %_UnexpectedHigherDim
EXPORTS  %_error.d
EXPORTS  %_error
EXPORTS  malloc
EXPORTS  _malloc
EXPORTS  __malloc
EXPORTS  Xmalloc
EXPORTS  %____malloc
EXPORTS  %_____malloc
EXPORTS  realloc
EXPORTS  _realloc
EXPORTS  __realloc
EXPORTS  Xrealloc
EXPORTS  %____realloc
EXPORTS  %_____realloc
EXPORTS  free
EXPORTS  _free
EXPORTS  __free
EXPORTS  Xfree
EXPORTS  %____free
EXPORTS  %_____free
EXPORTS  calloc
EXPORTS  _calloc
EXPORTS  __calloc
EXPORTS  Xcalloc
EXPORTS  %____calloc
EXPORTS  %_____calloc
EXPORTS  recalloc
EXPORTS  _recalloc
EXPORTS  __recalloc
EXPORTS  Xrecalloc
EXPORTS  %____recalloc
EXPORTS  %_beginAlloCode
EXPORTS  %_clone.a0
EXPORTS  %_clone.a1
EXPORTS  %_concat.ubyte.a0.eq.a0.plus.a1.vv
EXPORTS  %_concat.ubyte.a0.eq.a0.plus.a1.vs
EXPORTS  %_concat.ubyte.a0.eq.a0.plus.a1.sv
EXPORTS  %_concat.ubyte.a0.eq.a0.plus.a1.ss
EXPORTS  %_concat.ubyte.a0.eq.a1.plus.a0.vv
EXPORTS  %_concat.ubyte.a0.eq.a1.plus.a0.vs
EXPORTS  %_concat.ubyte.a0.eq.a1.plus.a0.sv
EXPORTS  %_concat.ubyte.a0.eq.a1.plus.a0.ss
EXPORTS  %_concat.string.a0.eq.a0.plus.a1.vv
EXPORTS  %_concat.string.a0.eq.a0.plus.a1.vs
EXPORTS  %_concat.string.a0.eq.a0.plus.a1.sv
EXPORTS  %_concat.string.a0.eq.a0.plus.a1.ss
EXPORTS  %_concat.string.a0.eq.a1.plus.a0.vv
EXPORTS  %_concat.string.a0.eq.a1.plus.a0.vs
EXPORTS  %_concat.string.a0.eq.a1.plus.a0.sv
EXPORTS  %_concat.string.a0.eq.a1.plus.a0.ss
EXPORTS  %_DimArray
EXPORTS  %_FreeArray
EXPORTS  %_RedimArray
EXPORTS  XxxSwapMemory
EXPORTS  %_assignComposite
EXPORTS  %_AssignComposite
EXPORTS  %_CompositeStringToString
EXPORTS  %_assignCompositeString.v
EXPORTS  %_assignCompositeString.s
EXPORTS  %_assignCompositeStringlet.v
EXPORTS  %_assignCompositeStringlet.s
EXPORTS  %_VarargArrays
EXPORTS  %_endAlloCode
EXPORTS  %_space.string
EXPORTS  %_newline.string
EXPORTS  %_print.console.newline
EXPORTS  %_print.tab.a0.eq.a0.tab.a1
EXPORTS  %_print.tab.a0.eq.a1.tab.a0
EXPORTS  %_print.tab.a0.eq.a0.tab.a1.ss
EXPORTS  %_print.tab.a0.eq.a1.tab.a0.ss
EXPORTS  %_print.first.spaces.a0
EXPORTS  %_print.tab.first.a0
EXPORTS  %_print.tab.first.a1
EXPORTS  %_Print
EXPORTS  %_PrintConsoleNewline
EXPORTS  %_PrintFileNewline
EXPORTS  %_PrintThenFree
EXPORTS  %_PrintWithNewlineThenFree
EXPORTS  %_PrintAppendComma
EXPORTS  %_PrintFirstComma
EXPORTS  %_PrintAppendSpaces
EXPORTS  %_string.compare.vv
EXPORTS  %_string.compare.vs
EXPORTS  %_string.compare.sv
EXPORTS  %_string.compare.ss
EXPORTS  %_ByteMakeCopy
EXPORTS  %_Read
EXPORTS  %_Write
EXPORTS  %_ReadArray
EXPORTS  %_WriteArray
EXPORTS  %_ReadString
EXPORTS  %_WriteString
EXPORTS  %_close
EXPORTS  %_eof
EXPORTS  %_pof
EXPORTS  %_lof
EXPORTS  %_quit
EXPORTS  %_infile_d
EXPORTS  %_inline_d.s
EXPORTS  %_inline_d.v
EXPORTS  %_open.s
EXPORTS  %_open.v
EXPORTS  %_seek
EXPORTS  %_shell.s
EXPORTS  %_shell.v
EXPORTS  %_cv.slong.to.sbyte            
EXPORTS  %_cv.slong.to.ubyte
EXPORTS  %_cv.slong.to.sshort
EXPORTS  %_cv.slong.to.ushort
EXPORTS  %_cv.slong.to.slong
EXPORTS  %_cv.slong.to.ulong
EXPORTS  %_cv.slong.to.xlong
EXPORTS  %_cv.slong.to.giant
EXPORTS  %_cv.slong.to.single
EXPORTS  %_cv.slong.to.double
EXPORTS  %_cv.ulong.to.sbyte            
EXPORTS  %_cv.ulong.to.ubyte
EXPORTS  %_cv.ulong.to.sshort
EXPORTS  %_cv.ulong.to.ushort
EXPORTS  %_cv.ulong.to.slong
EXPORTS  %_cv.ulong.to.ulong
EXPORTS  %_cv.ulong.to.xlong
EXPORTS  %_cv.ulong.to.giant
EXPORTS  %_cv.ulong.to.single
EXPORTS  %_cv.ulong.to.double
EXPORTS  %_cv.xlong.to.sbyte            
EXPORTS  %_cv.xlong.to.ubyte
EXPORTS  %_cv.xlong.to.sshort
EXPORTS  %_cv.xlong.to.ushort
EXPORTS  %_cv.xlong.to.slong
EXPORTS  %_cv.xlong.to.ulong
EXPORTS  %_cv.xlong.to.xlong
EXPORTS  %_cv.xlong.to.giant
EXPORTS  %_cv.xlong.to.single
EXPORTS  %_cv.xlong.to.double
EXPORTS  %_cv.giant.to.sbyte
EXPORTS  %_cv.giant.to.ubyte
EXPORTS  %_cv.giant.to.sshort
EXPORTS  %_cv.giant.to.ushort
EXPORTS  %_cv.giant.to.slong
EXPORTS  %_cv.giant.to.ulong
EXPORTS  %_cv.giant.to.xlong
EXPORTS  %_cv.giant.to.giant
EXPORTS  %_cv.giant.to.single
EXPORTS  %_cv.giant.to.double
EXPORTS  %_cv.single.to.sbyte
EXPORTS  %_cv.single.to.ubyte
EXPORTS  %_cv.single.to.sshort
EXPORTS  %_cv.single.to.ushort
EXPORTS  %_cv.single.to.slong
EXPORTS  %_cv.single.to.ulong
EXPORTS  %_cv.single.to.xlong
EXPORTS  %_cv.single.to.giant
EXPORTS  %_cv.single.to.single
EXPORTS  %_cv.single.to.double
EXPORTS  %_cv.double.to.sbyte
EXPORTS  %_cv.double.to.ubyte
EXPORTS  %_cv.double.to.sshort
EXPORTS  %_cv.double.to.ushort
EXPORTS  %_cv.double.to.slong
EXPORTS  %_cv.double.to.ulong
EXPORTS  %_cv.double.to.xlong
EXPORTS  %_cv.double.to.giant
EXPORTS  %_cv.double.to.single
EXPORTS  %_cv.double.to.double
EXPORTS  %_cv.xlong.to.subaddr
EXPORTS  %_cv.xlong.to.goaddr
EXPORTS  %_cv.xlong.to.funcaddr
EXPORTS  %_add.GIANT
EXPORTS  %_sub.GIANT
EXPORTS  %_mul.GIANT
EXPORTS  %_div.GIANT
EXPORTS  %_mod.GIANT
EXPORTS  %_lshift.giant
EXPORTS  %_ushift.giant
EXPORTS  %_rshift.giant
EXPORTS  %_dshift.giant
EXPORTS  %_abs.xlong
EXPORTS  %_abs.slong
EXPORTS  %_abs.ulong
EXPORTS  %_abs.giant
EXPORTS  %_abs.single
EXPORTS  %_abs.double
EXPORTS  %_sgn.xlong
EXPORTS  %_sgn.slong
EXPORTS  %_sgn.ulong
EXPORTS  %_sgn.giant
EXPORTS  %_sgn.single
EXPORTS  %_sgn.double
EXPORTS  %_sign.xlong
EXPORTS  %_sign.slong
EXPORTS  %_sign.ulong
EXPORTS  %_sign.giant
EXPORTS  %_sign.single
EXPORTS  %_sign.double
EXPORTS  %_int.single
EXPORTS  %_int.double
EXPORTS  %_fix.single
EXPORTS  %_fix.double
EXPORTS  %_MAX.slong
EXPORTS  %_MAX.ulong
EXPORTS  %_MAX.xlong
EXPORTS  %_MAX.single
EXPORTS  %_MAX.double
EXPORTS  %_MIN.slong
EXPORTS  %_MIN.ulong
EXPORTS  %_MIN.xlong
EXPORTS  %_MIN.single
EXPORTS  %_MIN.double
EXPORTS  %_add.SCOMPLEX
EXPORTS  %_sub.SCOMPLEX
EXPORTS  %_mul.SCOMPLEX
EXPORTS  %_div.SCOMPLEX
EXPORTS  %_add.

DCOMPLEX
EXPORTS  %_sub.DCOMPLEX
EXPORTS  %_mul.DCOMPLEX
EXPORTS  %_div.DCOMPLEX
EXPORTS  %_power.slong
EXPORTS  %_power.ulong
EXPORTS  %_power.xlong
EXPORTS  %_power.giant
EXPORTS  %_power.single
EXPORTS  %_power.double
EXPORTS  %_rpower.slong
EXPORTS  %_rpower.ulong
EXPORTS  %_rpower.xlong
EXPORTS  %_rpower.giant
EXPORTS  %_rpower.single
EXPORTS  %_rpower.double
EXPORTS  %_extu.2arg
EXPORTS  %_extu.3arg
EXPORTS  %_ext.2arg
EXPORTS  %_ext.3arg
EXPORTS  %_set.2arg
EXPORTS  %_set.3arg
EXPORTS  %_clr.2arg
EXPORTS  %_clr.3arg
EXPORTS  %_make.2arg
EXPORTS  %_make.3arg
EXPORTS  %_len.v
EXPORTS  %_len.s
EXPORTS  %_size.v
EXPORTS  %_size.s
EXPORTS  %_csize.v
EXPORTS  %_csize.s
EXPORTS  %_asc.v
EXPORTS  %_asc.s
EXPORTS  %_inchr.vv
EXPORTS  %_inchr.sv
EXPORTS  %_inchr.vs
EXPORTS  %_inchr.ss
EXPORTS  %_inchri.vv
EXPORTS  %_inchri.sv
EXPORTS  %_inchri.vs
EXPORTS  %_inchri.ss
EXPORTS  %_rinchr.vv
EXPORTS  %_rinchr.sv
EXPORTS  %_rinchr.vs
EXPORTS  %_rinchr.ss
EXPORTS  %_rinchri.vv
EXPORTS  %_rinchri.sv
EXPORTS  %_rinchri.vs
EXPORTS  %_rinchri.ss
EXPORTS  %_instr.vv
EXPORTS  %_instr.sv
EXPORTS  %_instr.vs
EXPORTS  %_instr.ss
EXPORTS  %_instri.vv
EXPORTS  %_instri.sv
EXPORTS  %_instri.vs
EXPORTS  %_instri.ss
EXPORTS  %_rinstr.vv
EXPORTS  %_rinstr.sv
EXPORTS  %_rinstr.vs
EXPORTS  %_rinstr.ss
EXPORTS  %_rinstri.vv
EXPORTS  %_rinstri.sv
EXPORTS  %_rinstri.vs
EXPORTS  %_rinstri.ss
EXPORTS  %_cv.string.to.sbyte.v
EXPORTS  %_cv.string.to.sbyte.s
EXPORTS  %_cv.string.to.ubyte.v
EXPORTS  %_cv.string.to.ubyte.s
EXPORTS  %_cv.string.to.sshort.v
EXPORTS  %_cv.string.to.sshort.s
EXPORTS  %_cv.string.to.ushort.v
EXPORTS  %_cv.string.to.ushort.s
EXPORTS  %_cv.string.to.slong.v
EXPORTS  %_cv.string.to.slong.s
EXPORTS  %_cv.string.to.ulong.v
EXPORTS  %_cv.string.to.ulong.s
EXPORTS  %_cv.string.to.xlong.v
EXPORTS  %_cv.string.to.xlong.s
EXPORTS  %_cv.string.to.giant.v
EXPORTS  %_cv.string.to.giant.s
EXPORTS  %_cv.string.to.single.v
EXPORTS  %_cv.string.to.single.s
EXPORTS  %_cv.string.to.double.v
EXPORTS  %_cv.string.to.double.s
EXPORTS  %_chr.d
EXPORTS  %_bin.d
EXPORTS  %_binb.d
EXPORTS  %_bin.d.giant
EXPORTS  %_binb.d.giant
EXPORTS  %_hex.d
EXPORTS  %_hexx.d
EXPORTS  %_hex.d.giant
EXPORTS  %_hexx.d.giant
EXPORTS  %_oct.d
EXPORTS  %_octo.d
EXPORTS  %_oct.d.giant
EXPORTS  %_octo.d.giant
EXPORTS  %_null.d
EXPORTS  %_space.d
EXPORTS  %_cstring.d
EXPORTS  %_signed.d.slong
EXPORTS  %_signed.d.ulong
EXPORTS  %_signed.d.xlong
EXPORTS  %_signed.d.giant
EXPORTS  %_signed.d.single
EXPORTS  %_signed.d.double
EXPORTS  %_str.d.slong
EXPORTS  %_str.d.ulong
EXPORTS  %_str.d.xlong
EXPORTS  %_str.d.giant
EXPORTS  %_str.d.single
EXPORTS  %_str.d.double
EXPORTS  %_string.slong
EXPORTS  %_string.ulong
EXPORTS  %_string.xlong
EXPORTS  %_string.giant
EXPORTS  %_string.single
EXPORTS  %_string.double
EXPORTS  %_string.d.slong
EXPORTS  %_string.d.ulong
EXPORTS  %_string.d.xlong
EXPORTS  %_string.d.giant
EXPORTS  %_string.d.single
EXPORTS  %_string.d.double
EXPORTS  %_csize.d.v
EXPORTS  %_csize.d.s
EXPORTS  %_lcase.d.s
EXPORTS  %_lcase.d.v
EXPORTS  %_ucase.d.s
EXPORTS  %_ucase.d.v
EXPORTS  %_rjust.d.s
EXPORTS  %_rjust.d.v
EXPORTS  %_ljust.d.s
EXPORTS  %_ljust.d.v
EXPORTS  %_cjust.d.s
EXPORTS  %_cjust.d.v
EXPORTS  %_rclip.d.s
EXPORTS  %_rclip.d.v
EXPORTS  %_lclip.d.s
EXPORTS  %_lclip.d.v
EXPORTS  %_ltrim.d.v
EXPORTS  %_ltrim.d.s
EXPORTS  %_rtrim.d.v
EXPORTS  %_rtrim.d.s
EXPORTS  %_trim.d.v
EXPORTS  %_trim.d.s
EXPORTS  %_left.d.v
EXPORTS  %_left.d.s
EXPORTS  %_right.d.v
EXPORTS  %_right.d.s
EXPORTS  %_mid.d.v
EXPORTS  %_mid.d.s
EXPORTS  %_stuff.d.vv
EXPORTS  %_stuff.d.vs
EXPORTS  %_stuff.d.sv
EXPORTS  %_stuff.d.ss
EXPORTS  %_uctolc
EXPORTS  %_lctouc

EXPORTS  Xst
EXPORTS  XstBackArrayToBinArray
EXPORTS  XstBackStringToBinString$
EXPORTS  XstBinArrayToBackArray
EXPORTS  XstBinRead
EXPORTS  XstBinStringToBackString$
EXPORTS  XstBinStringToBackStringNL$
EXPORTS  XstBinStringToBackStringThese$
EXPORTS  XstBinWrite
EXPORTS  XstCauseException
EXPORTS  XstChangeDirectory
EXPORTS  XstClearConsole
EXPORTS  XstCompareStrings
EXPORTS  XstCopyArray
EXPORTS  XstCopyDirectory
EXPORTS  XstCopyFile
EXPORTS  XstCopyMemory
EXPORTS  XstDateAndTimeToFileTime
EXPORTS  XstDecomposePathname
EXPORTS  XstDeleteFile
EXPORTS  XstDeleteLines
EXPORTS  XstDisplayConsole
EXPORTS  XstErrorNameToNumber
EXPORTS  XstErrorNumberToName
EXPORTS  XstExceptionNumberToName
EXPORTS  XstExceptionToSystemException
EXPORTS  XstFindMemoryMatch
EXPORTS  XstFileTimeToDateAndTime
EXPORTS  XstFileToSystemFile
EXPORTS  XstFindArray
EXPORTS  XstFindFile
EXPORTS  XstFindFiles
EXPORTS  XstGetApplicationEnvironment
EXPORTS  XstGetCPUName
EXPORTS  XstGetCommandLine
EXPORTS  XstGetCommandLineArguments
EXPORTS  XstGetConsoleGrid
EXPORTS  XstGetCurrentDirectory
EXPORTS  XstGetDateAndTime
EXPORTS  XstGetLocalDateAndTime
EXPORTS  XstGetDrives
EXPORTS  XstGetEndian
EXPORTS  XstGetEndianName
EXPORTS  XstGetEnvironmentVariable
EXPORTS  XstGetEnvironmentVariables
EXPORTS  XstGetException
EXPORTS  XstGetExceptionFunction
EXPORTS  XstGetExecutionPathArray
EXPORTS  XstGetFileAttributes
EXPORTS  XstGetFiles
EXPORTS  XstGetFilesAndAttributes
EXPORTS  XstGetImplementation
EXPORTS  XstGetMemoryMap
EXPORTS  XstGetNewline
EXPORTS  XstGetOSName
EXPORTS  XstGetOSVersion
EXPORTS  XstGetOSVersionName
EXPORTS  XstGetPathComponents
EXPORTS  XstGetPrintTab
EXPORTS  XstGetProgramName
EXPORTS  XstGetSystemError
EXPORTS  XstGetSystemTime
EXPORTS  XstGetTypedArray
EXPORTS  XstGuessFilename
EXPORTS  XstHideConsole
EXPORTS  XstIsDataDimension
EXPORTS  XstKillTimer
EXPORTS  XstLoadString
EXPORTS  XstLoadStringArray
EXPORTS  XstLockFileSection
EXPORTS  XstLog
EXPORTS  XstLTRIM
EXPORTS  XstMakeDirectory
EXPORTS  XstMergeStrings$
EXPORTS  XstMultiStringToStringArray
EXPORTS  XstNextCField$
EXPORTS  XstNextCLine$
EXPORTS  XstNextField$
EXPORTS  XstNextItem$
EXPORTS  XstNextLine$
EXPORTS  XstPathString$
EXPORTS  XstPathToAbsolutePath
EXPORTS  XstQuickSort
EXPORTS  XstReadString
EXPORTS  XstRenameFile
EXPORTS  XstReplaceArray
EXPORTS  XstReplaceLines
EXPORTS  XstRTRIM
EXPORTS  XstSaveString
EXPORTS  XstSaveStringArray
EXPORTS  XstSaveStringArrayCRLF
EXPORTS  XstSetCommandLineArguments
EXPORTS  XstSetCurrentDirectory
EXPORTS  XstSetDateAndTime
EXPORTS  XstSetEnvironmentVariable
EXPORTS  XstSetException
EXPORTS  XstSetExceptionFunction
EXPORTS  XstSetNewline
EXPORTS  XstSetPrintTab
EXPORTS  XstSetProgramName
EXPORTS  XstSetSystemError
EXPORTS  XstShowConsole
EXPORTS  XstSleep
EXPORTS  XstStartTimer
EXPORTS  XstStringArraySectionToString
EXPORTS  XstStringArraySectionToStringArray
EXPORTS  XstStringArrayToString
EXPORTS  XstStringArrayToStringCRLF
EXPORTS  XstStringToNumber
EXPORTS  XstStringToStringArray
EXPORTS  XstSystemErrorNumberToName
EXPORTS  XstSystemErrorToError
EXPORTS  XstSystemExceptionNumberToName
EXPORTS  XstSystemExceptionToException
EXPORTS  XstTRIM
EXPORTS  XstUnlockFileSection
EXPORTS  XstVersion$
EXPORTS  XstWriteString
EXPORTS  XxxXstLoadLibrary
EXPORTS  XxxFormat$
EXPORTS  XstAlert
EXPORTS  XstGetProgramFileName$

EXPORTS  Xin
EXPORTS  XinAddressNumberToString
EXPORTS  XinAddressStringToNumber
EXPORTS  XinHostAddressToInfo
EXPORTS  XinHostNameToInfo
EXPORTS  XinHostNumberToInfo
EXPORTS  XinInitialize
EXPORTS  XinSetDebug
EXPORTS  XinSocketAccept
EXPORTS  XinSocketBind
EXPORTS  XinSocketClose
EXPORTS  XinSocketConnectRequest
EXPORTS  XinSocketConnectStatus
EXPORTS  XinSocketGetAddress
EXPORTS  XinSocketGetStatus
EXPORTS  XinSocketListen
EXPORTS  XinSocketOpen
EXPORTS  XinSocketRead
EXPORTS  XinSocketWrite

EXPORTS  Xma
EXPORTS  XmaVersion$
EXPORTS  ACOS
EXPORTS  ACOSH
EXPORTS  ACOT
EXPORTS  ACOTH
EXPORTS  ACSC
EXPORTS  ACSCH
EXPORTS  ASEC
EXPORTS  ASECH
EXPORTS  ASIN
EXPORTS  ASINH
EXPORTS  ATAN
EXPORTS  ATANH
EXPORTS  COS
EXPORTS  COSH
EXPORTS  COT
EXPORTS  COTH
EXPORTS  CSC
EXPORTS  CSCH
EXPORTS  EXP
EXPORTS  LOG
EXPORTS  EXP10
EXPORTS  LOG10
EXPORTS  POWER
EXPORTS  SEC
EXPORTS  SECH
EXPORTS  SIN
EXPORTS  SINH
EXPORTS  SQRT
EXPORTS  TAN
EXPORTS  TANH

EXPORTS  Xcm
EXPORTS  XcmVersion$
EXPORTS  DCABS
EXPORTS  DCACOS
EXPORTS  DCARG
EXPORTS  DCASIN
EXPORTS  DCATAN
EXPORTS  DCCONJ
EXPORTS  DCCOS
EXPORTS  DCCOSH
EXPORTS  DCEXP
EXPORTS  DCLOG
EXPORTS  DCLOG10
EXPORTS  DCNORM
EXPORTS  DCPOLAR
EXPORTS  DCPOWERCC
EXPORTS  DCPOWERCR
EXPORTS  DCPOWERRC
EXPORTS  DCRMUL
EXPORTS  DCSIN
EXPORTS  DCSINH
EXPORTS  DCSQRT
EXPORTS  DCTAN
EXPORTS  DCTANH
EXPORTS  SCABS
EXPORTS  SCACOS
EXPORTS  SCARG
EXPORTS  SCASIN
EXPORTS  SCATAN
EXPORTS  SCCONJ
EXPORTS  SCCOS
EXPORTS  SCCOSH
EXPORTS  SCEXP
EXPORTS  SCLOG
EXPORTS  SCLOG10
EXPORTS  SCNORM
EXPORTS  SCPOLAR
EXPORTS  SCPOWERCC
EXPORTS  SCPOWERCR
EXPORTS  SCPOWERRC
EXPORTS  SCRMUL
EXPORTS  SCSIN
EXPORTS  SCSINH
EXPORTS  SCSQRT
EXPORTS  SCTAN
EXPORTS  SCTANH

EXPORTS  Xgr
EXPORTS  XgrAddMessage
EXPORTS  XgrBorderNameToNumber
EXPORTS  XgrBorderNumberToName
EXPORTS  XgrBorderNumberToWidth
EXPORTS  XgrClearGrid
EXPORTS  XgrClearWindow
EXPORTS  XgrClearWindowAndImages
EXPORTS  XgrCloneGrid
EXPORTS  XgrColorNameToNumber
EXPORTS  XgrColorNumberToName
EXPORTS  XgrConvertColorToRGB
EXPORTS  XgrConvertDisplayToGrid
EXPORTS  XgrConvertDisplayToLocal
EXPORTS  XgrConvertDisplayToScaled
EXPORTS  XgrConvertDisplayToWindow
EXPORTS  XgrConvertGridToDisplay
EXPORTS  XgrConvertGridToLocal
EXPORTS  XgrConvertGridToScaled
EXPORTS  XgrConvertGridToWindow
EXPORTS  XgrConvertLocalToDisplay
EXPORTS  XgrConvertLocalToGrid
EXPORTS  XgrConvertLocalToScaled
EXPORTS  XgrConvertLocalToWindow
EXPORTS  XgrConvertRGBToColor
EXPORTS  XgrConvertScaledToDisplay
EXPORTS  XgrConvertScaledToGrid
EXPORTS  XgrConvertScaledToLocal
EXPORTS  XgrConvertScaledToWindow
EXPORTS  XgrConvertWindowToDisplay
EXPORTS  XgrConvertWindowToGrid
EXPORTS  XgrConvertWindowToLocal
EXPORTS  XgrConvertWindowToScaled
EXPORTS  XgrCopyImage
EXPORTS  XgrCreateFont
EXPORTS  XgrCreateGrid
EXPORTS  XgrCreateWindow
EXPORTS  XgrCursorNameToNumber
EXPORTS  XgrCursorNumberToName
EXPORTS  XgrDeleteMessages
EXPORTS  XgrDestroyFont
EXPORTS  XgrDestroyGrid
EXPORTS  XgrDestroyWindow
EXPORTS  XgrDisplayWindow
EXPORTS  XgrDrawArc
EXPORTS  XgrDrawArcGrid
EXPORTS  XgrDrawArcScaled
EXPORTS  XgrDrawBorder
EXPORTS  XgrDrawBorderGrid
EXPORTS  XgrDrawBorderScaled
EXPORTS  XgrDrawBox
EXPORTS  XgrDrawBoxGrid
EXPORTS  XgrDrawBoxScaled
EXPORTS  XgrDrawCircle
EXPORTS  XgrDrawCircleGrid
EXPORTS  XgrDrawCircleScaled
EXPORTS  XgrDrawGridBorder
EXPORTS  XgrDrawIcon
EXPORTS  XgrDrawIconGrid
EXPORTS  XgrDrawIconScaled
EXPORTS  XgrDrawImage
EXPORTS  XgrDrawImageExtend
EXPORTS  XgrDrawImageExtendScaled
EXPORTS  XgrDrawImageScaled
EXPORTS  XgrDrawLine
EXPORTS  XgrDrawLineGrid
EXPORTS  XgrDrawLineScaled
EXPORTS  XgrDrawLineTo
EXPORTS  XgrDrawLineToDelta
EXPORTS  XgrDrawLineToDeltaGrid
EXPORTS  XgrDrawLineToDeltaScaled
EXPORTS  XgrDrawLineToGrid
EXPORTS  XgrDrawLineToScaled
EXPORTS  XgrDrawLines
EXPORTS  XgrDrawLinesGrid
EXPORTS  XgrDrawLinesScaled
EXPORTS  XgrDrawLinesTo
EXPORTS  XgrDrawLinesToGrid
EXPORTS  XgrDrawLinesToScaled
EXPORTS  XgrDrawPoint
EXPORTS  XgrDrawPointGrid
EXPORTS  XgrDrawPointScaled
EXPORTS  XgrDrawPoints
EXPORTS  XgrDrawPointsGrid
EXPORTS  XgrDrawPointsScaled
EXPORTS  XgrDrawText
EXPORTS  XgrDrawTextFill
EXPORTS  XgrDrawTextFillGrid
EXPORTS  XgrDrawTextFillScaled
EXPORTS  XgrDrawTextGrid
EXPORTS  XgrDrawTextScaled
EXPORTS  XgrDrawTextWide
EXPORTS  XgrDrawTextWideFill
EXPORTS  XgrDrawTextWideFillGrid
EXPORTS  XgrDrawTextWideFillScaled
EXPORTS  XgrDrawTextWideGrid
EXPORTS  XgrDrawTextWideScaled
EXPORTS  XgrFillBox
EXPORTS  XgrFillBoxGrid
EXPORTS  XgrFillBoxScaled
EXPORTS  XgrFillTriangle
EXPORTS  XgrFillTriangleGrid
EXPORTS  XgrFillTriangleScaled
EXPORTS  XgrGetBackgroundColor
EXPORTS  XgrGetBackgroundRGB
EXPORTS  XgrGetCEO
EXPORTS  XgrGetClipboard
EXPORTS  XgrGetCursor
EXPORTS  XgrGetCursorOverride
EXPORTS  XgrGetDefaultColors
EXPORTS  XgrGetDisplaySize
EXPORTS  XgrGetDrawingColor
EXPORTS  XgrGetDrawingRGB
EXPORTS  XgrGetDrawpoint
EXPORTS  XgrGetDrawpointGrid
EXPORTS  XgrGetDrawpointScaled
EXPORTS  XgrGetFontInfo
EXPORTS  XgrGetFontMetrics
EXPORTS  XgrGetFontNames
EXPORTS  XgrGetGridBorder
EXPORTS  XgrGetGridBorderOffset
EXPORTS  XgrGetGridBox
EXPORTS  XgrGetGridBoxDisplay
EXPORTS  XgrGetGridBoxGrid
EXPORTS  XgrGetGridBoxLocal
EXPORTS  XgrGetGridBoxScaled
EXPORTS  XgrGetGridBoxWindow
EXPORTS  XgrGetGridBuffer
EXPORTS  XgrGetGridCharacterMapArray
EXPORTS  XgrGetGridClip
EXPORTS  XgrGetGridColors
EXPORTS  XgrGetGridCoords
EXPORTS  XgrGetGridDrawingMode
EXPORTS  XgrGetGridFont
EXPORTS  XgrGetGridFunction
EXPORTS  XgrGetGridParent
EXPORTS  XgrGetGridPositionAndSize
EXPORTS  XgrGetGridState
EXPORTS  XgrGetGridType
EXPORTS  XgrGetGridWindow
EXPORTS  XgrGetImage
EXPORTS  XgrGetImageArrayInfo
EXPORTS  XgrGetKeystateModify
EXPORTS  XgrGetMessageType
EXPORTS  XgrGetMessages
EXPORTS  XgrGetModalWindow
EXPORTS  XgrGetMouseFocus
EXPORTS  XgrGetMouseInfo
EXPORTS  XgrGetSelectedWindow
EXPORTS  XgrGetTextArrayImageSize
EXPORTS  XgrGetTextImageSize
EXPORTS  XgrGetTextSelectionGrid
EXPORTS  XgrGetWindowDisplay
EXPORTS  XgrGetWindowFunction
EXPORTS  XgrGetWindowGrid
EXPORTS  XgrGetWindowIcon
EXPORTS  XgrGetWindowPositionAndSize
EXPORTS  XgrGetWindowState
EXPORTS  XgrGetWindowTitle
EXPORTS  XgrGrabPoint
EXPORTS  XgrGrabPointGrid
EXPORTS  XgrGrabPointScaled
EXPORTS  XgrGridToSystemWindow
EXPORTS  XgrGridTypeNameToNumber
EXPORTS  XgrGridTypeNumberToName
EXPORTS  XgrHideWindow
EXPORTS  XgrIconNameToNumber
EXPORTS  XgrIconNumberToName
EXPORTS  XgrJamMessage
EXPORTS  XgrLoadImage
EXPORTS  XgrMaximizeWindow
EXPORTS  XgrMessageNameToNumber
EXPORTS  XgrMessageNames
EXPORTS  XgrMessageNumberToName
EXPORTS  XgrMessagesPending
EXPORTS  XgrMinimizeWindow
EXPORTS  XgrMoveDelta
EXPORTS  XgrMoveDeltaGrid
EXPORTS  XgrMoveDeltaScaled
EXPORTS  XgrMoveTo
EXPORTS  XgrMoveToGrid
EXPORTS  XgrMoveToScaled
EXPORTS  XgrPeekMessage
EXPORTS  XgrProcessMessages
EXPORTS  XgrRedrawWindow
EXPORTS  XgrRefreshGrid
EXPORTS  XgrRegisterCursor
EXPORTS  XgrRegisterGridType
EXPORTS  XgrRegisterIcon
EXPORTS  XgrRegisterMessage
EXPORTS  XgrRestoreWindow
EXPORTS  XgrSaveImage
EXPORTS  XgrSendMessage
EXPORTS  XgrSendMessageToWindow
EXPORTS  XgrSendStringMessage
EXPORTS  XgrSendStringMessageToWindow
EXPORTS  XgrSetBackgroundColor
EXPORTS  XgrSetBackgroundRGB
EXPORTS  XgrSetCEO
EXPORTS  XgrSetClipboard
EXPORTS  XgrSetCursor
EXPORTS  XgrSetCursorOverride
EXPORTS  XgrSetDefaultColors
EXPORTS  XgrSetDrawingColor
EXPORTS  XgrSetDrawingRGB
EXPORTS  XgrSetDrawpoint
EXPORTS  XgrSetDrawpointGrid
EXPORTS  XgrSetDrawpointScaled
EXPORTS  XgrSetGridBorder
EXPORTS  XgrSetGridBorderOffset
EXPORTS  XgrSetGridBox
EXPORTS  XgrSetGridBoxGrid
EXPORTS  XgrSetGridBoxScaled
EXPORTS  XgrSetGridBoxScaledAt
EXPORTS  XgrSetGridBuffer
EXPORTS  XgrSetGridCharacterMapArray
EXPORTS  XgrSetGridClip
EXPORTS  XgrSetGridColors
EXPORTS  XgrSetGridDrawingMode
EXPORTS  XgrSetGridFont
EXPORTS  XgrSetGridFunction
EXPORTS  XgrSetGridParent
EXPORTS  XgrSetGridPositionAndSize
EXPORTS  XgrSetGridState
EXPORTS  XgrSetGridTimer
EXPORTS  XgrSetGridType
EXPORTS  XgrSetImage
EXPORTS  XgrSetModalWindow
EXPORTS  XgrSetMouseFocus
EXPORTS  XgrSetSelectedWindow
EXPORTS  XgrSetTextSelectionGrid
EXPORTS  XgrSetWindowFunction
EXPORTS  XgrSetWindowIcon
EXPORTS  XgrSetWindowPositionAndSize
EXPORTS  XgrSetWindowState
EXPORTS  XgrSetWindowTitle
EXPORTS  XgrShowWindow
EXPORTS  XgrSystemWindowToWindow
EXPORTS  XgrVersion$
EXPORTS  XgrWindowToSystemWindow

EXPORTS  Xui
EXPORTS  XuiAlignNameToNumber
EXPORTS  XuiAlignNumberToName
EXPORTS  XuiArea
EXPORTS  XuiBase
EXPORTS  XuiCallback
EXPORTS  XuiCanNameToNumber
EXPORTS  XuiCanNumberToName
EXPORTS  XuiCanNumberToString
EXPORTS  XuiCanStringToNumber
EXPORTS  XuiCheckBox
EXPORTS  XuiCloseWindow
EXPORTS  XuiColor
EXPORTS  XuiColors
EXPORTS  XuiConsole
EXPORTS  XuiCoordinate
EXPORTS  XuiCreateGrid
EXPORTS  XuiCreateValueArray
EXPORTS  XuiCreateWindow
EXPORTS  XuiDestroy
EXPORTS  XuiDestroyWindow
EXPORTS  XuiDialog
EXPORTS  XuiDialog2B
EXPORTS  XuiDialog3B
EXPORTS  XuiDialog4B
EXPORTS  XuiDirectoryBox
EXPORTS  XuiDisable
EXPORTS  XuiDisplayWindow
EXPORTS  XuiDisplayed
EXPORTS  XuiDriveBox
EXPORTS  XuiDropBox
EXPORTS  XuiDropButton
EXPORTS  XuiEnable
EXPORTS  XuiFile
EXPORTS  XuiFileBox
EXPORTS  XuiFont
EXPORTS  XuiGetAlign
EXPORTS  XuiGetBorder
EXPORTS  XuiGetBorderOffset
EXPORTS  XuiGetCallback
EXPORTS  XuiGetCan
EXPORTS  XuiGetCharacterMapArray
EXPORTS  XuiGetCharacterMapEntry
EXPORTS  XuiGetClipGrid
EXPORTS  XuiGetColor
EXPORTS  XuiGetColorExtra
EXPORTS  XuiGetCursor
EXPORTS  XuiGetDefaultColors
EXPORTS  XuiGetDefaultCursor
EXPORTS  XuiGetDefaultMessageFuncArray
EXPORTS  XuiGetDisplay
EXPORTS  XuiGetEnclosedGrids
EXPORTS  XuiGetEnclosingGrid
EXPORTS  XuiGetFocusColor
EXPORTS  XuiGetFocusColorExtra
EXPORTS  XuiGetFont
EXPORTS  XuiGetFontMetrics
EXPORTS  XuiGetFontNumber
EXPORTS  XuiGetGridFunction
EXPORTS  XuiGetGridFunctionName
EXPORTS  XuiGetGridName
EXPORTS  XuiGetGridNumber
EXPORTS  XuiGetGridProperties
EXPORTS  XuiGetGridProperty
EXPORTS  XuiGetGridRegion
EXPORTS  XuiGetGridType
EXPORTS  XuiGetGridTypeGrids
EXPORTS  XuiGetGridTypeMessageFuncArray
EXPORTS  XuiGetGridTypeMessageSubArray
EXPORTS  XuiGetGridTypeName
EXPORTS  XuiGetGridTypeProperty
EXPORTS  XuiGetGridTypeValue
EXPORTS  XuiGetGridValue
EXPORTS  XuiGetGroup
EXPORTS  XuiGetHelp
EXPORTS  XuiGetHelpFile
EXPORTS  XuiGetHelpString
EXPORTS  XuiGetHelpStrings
EXPORTS  XuiGetHelpWindowGrid
EXPORTS  XuiGetHintString
EXPORTS  XuiGetImage
EXPORTS  XuiGetImageCoords
EXPORTS  XuiGetIndent
EXPORTS  XuiGetInfo
EXPORTS  XuiGetJustify
EXPORTS  XuiGetKeyboardFocus
EXPORTS  XuiGetKeyboardFocusGrid
EXPORTS  XuiGetKidArray
EXPORTS  XuiGetKidNumber
EXPORTS  XuiGetKids
EXPORTS  XuiGetMaxMinSize
EXPORTS  XuiGetMessageFunc
EXPORTS  XuiGetMessageFuncArray
EXPORTS  XuiGetMessageSub
EXPORTS  XuiGetMessageSubArray
EXPORTS  XuiGetModalInfo
EXPORTS  XuiGetModalWindow
EXPORTS  XuiGetNextCallback
EXPORTS  XuiGetParent
EXPORTS  XuiGetPropertyDatabase
EXPORTS  XuiGetRedrawFlags
EXPORTS  XuiGetReply
EXPORTS  XuiGetResponse
EXPORTS  XuiGetSize
EXPORTS  XuiGetSmallestSize
EXPORTS  XuiGetState
EXPORTS  XuiGetStyle
EXPORTS  XuiGetTabArray
EXPORTS  XuiGetTabWidth
EXPORTS  XuiGetTextArray
EXPORTS  XuiGetTextArrayLine
EXPORTS  XuiGetTextArrayLines
EXPORTS  XuiGetTextArraySize
EXPORTS  XuiGetTextFilename
EXPORTS  XuiGetTextSpacing
EXPORTS  XuiGetTextString
EXPORTS  XuiGetTextStrings
EXPORTS  XuiGetTexture
EXPORTS  XuiGetTimer
EXPORTS  XuiGetValue
EXPORTS  XuiGetValueArray
EXPORTS  XuiGetValues
EXPORTS  XuiGetWindow
EXPORTS  XuiGetWindowFunction
EXPORTS  XuiGetWindowGrid
EXPORTS  XuiGetWindowIcon
EXPORTS  XuiGetWindowSize
EXPORTS  XuiGetWindowTitle
EXPORTS  XuiGotKeyboardFocus
EXPORTS  XuiGrabArray
EXPORTS  XuiGrabTextArray
EXPORTS  XuiGrabTextString
EXPORTS  XuiGrabValueArray
EXPORTS  XuiGridContainsGridCoord
EXPORTS  XuiGridFuncNameToAddr
EXPORTS  XuiGridKid
EXPORTS  XuiGridTypeToGridFunc
EXPORTS  XuiGrip
EXPORTS  XuiHelpDisable
EXPORTS  XuiHelpEnable
EXPORTS  XuiHidden
EXPORTS  XuiHideWindow
EXPORTS  XuiImage
EXPORTS  XuiInitialize
EXPORTS  XuiJustifyNameToNumber
EXPORTS  XuiJustifyNumberToName
EXPORTS  XuiKeyboardFocusBackward
EXPORTS  XuiKeyboardFocusForward
EXPORTS  XuiLabel
EXPORTS  XuiList
EXPORTS  XuiListBox
EXPORTS  XuiListButton
EXPORTS  XuiListDialog2B
EXPORTS  XuiLostKeyboardFocus
EXPORTS  XuiMaximizeWindow
EXPORTS  XuiMaximized
EXPORTS  XuiMenu
EXPORTS  XuiMenuBar
EXPORTS  XuiMenuTextArea1B
EXPORTS  XuiMessage
EXPORTS  XuiMessage1B
EXPORTS  XuiMessage2B
EXPORTS  XuiMessage3B
EXPORTS  XuiMessage4B
EXPORTS  XuiMinimizeWindow
EXPORTS  XuiMinimized
EXPORTS  XuiMonitorContext
EXPORTS  XuiMonitorHelp
EXPORTS  XuiMonitorKeyboard
EXPORTS  XuiMonitorMouse
EXPORTS  XuiMouseDownSetKeyboardFocus
EXPORTS  XuiMouseEnter
EXPORTS  XuiPassOn
EXPORTS  XuiPlaceWindow
EXPORTS  XuiPokeArray
EXPORTS  XuiPokeTextArray
EXPORTS  XuiPokeTextString
EXPORTS  XuiPokeValueArray
EXPORTS  XuiPositionGrid
EXPORTS  XuiPressButton
EXPORTS  XuiProcessMessage
EXPORTS  XuiProgress
EXPORTS  XuiPropertyValueNameToNumber
EXPORTS  XuiPullDown
EXPORTS  XuiPushButton
EXPORTS  XuiQueueCallbacks
EXPORTS  XuiRadioBox
EXPORTS  XuiRadioButton
EXPORTS  XuiRange
EXPORTS  XuiRedraw
EXPORTS  XuiRedrawGrid
EXPORTS  XuiRedrawText
EXPORTS  XuiRedrawWindow
EXPORTS  XuiRegisterGridType
EXPORTS  XuiReportMessage
EXPORTS  XuiResize
EXPORTS  XuiResizeNot
EXPORTS  XuiResizeWindow
EXPORTS  XuiResizeWindowToGrid
EXPORTS  XuiReturnZeros
EXPORTS  XuiScrollBarH
EXPORTS  XuiScrollBarV
EXPORTS  XuiSelectWindow
EXPORTS  XuiSendMessage
EXPORTS  XuiSendStringMessage
EXPORTS  XuiSendToKid
EXPORTS  XuiSendToKids
EXPORTS  XuiSetAlign
EXPORTS  XuiSetBorder
EXPORTS  XuiSetBorderOffset
EXPORTS  XuiSetCallback
EXPORTS  XuiSetCan
EXPORTS  XuiSetCharacterMapArray
EXPORTS  XuiSetCharacterMapEntry
EXPORTS  XuiSetClipGrid
EXPORTS  XuiSetColor
EXPORTS  XuiSetColorAll
EXPORTS  XuiSetColorExtra
EXPORTS  XuiSetColorExtraAll
EXPORTS  XuiSetCursor
EXPORTS  XuiSetDefaultColors
EXPORTS  XuiSetDefaultCursor
EXPORTS  XuiSetFocusColor
EXPORTS  XuiSetFocusColorExtra
EXPORTS  XuiSetFont
EXPORTS  XuiSetFontNumber
EXPORTS  XuiSetGridFunction
EXPORTS  XuiSetGridFunctionName
EXPORTS  XuiSetGridName
EXPORTS  XuiSetGridProperties
EXPORTS  XuiSetGridProperty
EXPORTS  XuiSetGridType
EXPORTS  XuiSetGridTypeName
EXPORTS  XuiSetGridTypeProperty
EXPORTS  XuiSetGridTypeValue
EXPORTS  XuiSetGridValue
EXPORTS  XuiSetGroup
EXPORTS  XuiSetHelp
EXPORTS  XuiSetHelpFile
EXPORTS  XuiSetHelpString
EXPORTS  XuiSetHelpStrings
EXPORTS  XuiSetHintString
EXPORTS  XuiSetImage
EXPORTS  XuiSetImageCoords
EXPORTS  XuiSetIndent
EXPORTS  XuiSetInfo
EXPORTS  XuiSetJustify
EXPORTS  XuiSetKeyboardFocus
EXPORTS  XuiSetKeyboardFocusGrid
EXPORTS  XuiSetKidArray
EXPORTS  XuiSetMaxMinSize
EXPORTS  XuiSetMessageFunc
EXPORTS  XuiSetMessageFuncArray
EXPORTS  XuiSetMessageSub
EXPORTS  XuiSetMessageSubArray
EXPORTS  XuiSetModalWindow
EXPORTS  XuiSetParent
EXPORTS  XuiSetPropertyDatabase
EXPORTS  XuiSetRedrawFlags
EXPORTS  XuiSetSize
EXPORTS  XuiSetState
EXPORTS  XuiSetStyle
EXPORTS  XuiSetTabArray
EXPORTS  XuiSetTabWidth
EXPORTS  XuiSetTextArray
EXPORTS  XuiSetTextArrayLine
EXPORTS  XuiSetTextArrayLines
EXPORTS  XuiSetTextFilename

EXPORTS  XuiSetTextSpacing
EXPORTS  XuiSetTextString
EXPORTS  XuiSetTextStrings
EXPORTS  XuiSetTexture
EXPORTS  XuiSetTimer
EXPORTS  XuiSetValue
EXPORTS  XuiSetValueArray
EXPORTS  XuiSetValues
EXPORTS  XuiSetWindowFunction
EXPORTS  XuiSetWindowIcon
EXPORTS  XuiSetWindowTitle
EXPORTS  XuiShowWindow
EXPORTS  XuiSolidColor
EXPORTS  XuiStartTimer
EXPORTS  XuiSystemMessage
EXPORTS  XuiText
EXPORTS  XuiTextArea
EXPORTS  XuiTextArea3B
EXPORTS  XuiTextArea4B
EXPORTS  XuiTextLine
EXPORTS  XuiTextModifyNot
EXPORTS  XuiTextureNameToNumber
EXPORTS  XuiTextureNumberToName
EXPORTS  XuiToggleButton
EXPORTS  XuiVersion$
EXPORTS  XuiWindow


Now that I have done that, I may now perform the nmake action:
nmake -f sidedit.mak

After this action I now have approx. a nearly 800KB sidedit.lib and I have almost an 1.8MB sidedit.dll


Now I copy the sidedit.lib (or yourlibrary.lib) and the sidedit.dll to the place where my source of the executable is.
I open the .DEF file of the executable file that will call my own library, I'll have an example pasted below:


[sbnormal.def]

PROGRAM  sbnormal
VERSION  2.0023
IMPORTS  sidedit.GetFileData
IMPORTS  sidedit.InitSidCenter
IMPORTS  unzip32.UzpVersion2
IMPORTS  unzip32.Wiz_SingleEntryUnzip
IMPORTS  xb.XgrGetDisplaySize
IMPORTS  xb.XgrGetGridWindow
IMPORTS  xb.XgrGetImage
IMPORTS  xb.XgrGetImageArrayInfo
IMPORTS  xb.XgrGetMouseInfo
IMPORTS  xb.XgrGetSelectedWindow
IMPORTS  xb.XgrGetWindowGrid
IMPORTS  xb.XgrGetWindowPositionAndSize
IMPORTS  xb.XgrGetWindowState
IMPORTS  xb.XgrLoadImage
IMPORTS  xb.XgrMessageNameToNumber
IMPORTS  xb.XgrMessageNumberToName
IMPORTS  xb.XgrProcessMessages
IMPORTS  xb.XgrRegisterCursor
IMPORTS  xb.XgrRegisterIcon
IMPORTS  xb.XgrRegisterMessage
IMPORTS  xb.XgrSetCEO
IMPORTS  xb.XgrSetClipboard
IMPORTS  xb.XgrSetCursor
IMPORTS  xb.XgrSetWindowPositionAndSize
IMPORTS  xb.XstChangeDirectory
IMPORTS  xb.XstCopyArray
IMPORTS  xb.XstCopyFile
IMPORTS  xb.XstCopyMemory
IMPORTS  xb.XstDecomposePathname
IMPORTS  xb.XstDeleteFile
IMPORTS  xb.XstDeleteLines
IMPORTS  xb.XstFindArray
IMPORTS  xb.XstFindFiles
IMPORTS  xb.XstGetApplicationEnvironment
IMPORTS  xb.XstGetCurrentDirectory
IMPORTS  xb.XstGetDrives
IMPORTS  xb.XstGetFiles
IMPORTS  xb.XstGetPathComponents
IMPORTS  xb.XstGetProgramFileName$
IMPORTS  xb.XstGetSystemTime
IMPORTS  xb.XstLoadStringArray
IMPORTS  xb.XstMakeDirectory
IMPORTS  xb.XstMergeStrings$
IMPORTS  xb.XstMultiStringToStringArray
IMPORTS  xb.XstNextCLine$
IMPORTS  xb.XstPathString$
IMPORTS  xb.XstQuickSort
IMPORTS  xb.XstRenameFile
IMPORTS  xb.XstSaveStringArray
IMPORTS  xb.XstSetExceptionFunction
IMPORTS  xb.XstSetProgramName
IMPORTS  xb.XstTRIM
IMPORTS  xb.XuiCallback
IMPORTS  xb.XuiCheckBox
IMPORTS  xb.XuiColor
IMPORTS  xb.XuiCreateGrid
IMPORTS  xb.XuiCreateWindow
IMPORTS  xb.XuiDisable
IMPORTS  xb.XuiDropButton
IMPORTS  xb.XuiEnable
IMPORTS  xb.XuiGetDefaultMessageFuncArray
IMPORTS  xb.XuiGetEnclosedGrids
IMPORTS  xb.XuiGetHelpWindowGrid
IMPORTS  xb.XuiGetNextCallback
IMPORTS  xb.XuiLabel
IMPORTS  xb.XuiList
IMPORTS  xb.XuiListBox
IMPORTS  xb.XuiListButton
IMPORTS  xb.XuiMenu
IMPORTS  xb.XuiProcessMessage
IMPORTS  xb.XuiProgress
IMPORTS  xb.XuiPushButton
IMPORTS  xb.XuiQueueCallbacks
IMPORTS  xb.XuiRadioBox
IMPORTS  xb.XuiRadioButton
IMPORTS  xb.XuiRange
IMPORTS  xb.XuiRedraw
IMPORTS  xb.XuiRegisterGridType
IMPORTS  xb.XuiSendMessage
IMPORTS  xb.XuiSendStringMessage
IMPORTS  xb.XuiSetGridTypeProperty
IMPORTS  xb.XuiTextArea
IMPORTS  xb.XuiTextLine
IMPORTS  xb.XuiToggleButton
IMPORTS  xb.XuiWindow

As you notice, my tool's executable is called sbnormal(.exe) (standing for the normal edition of sidbace).
I import three separate libraries at the moment called sidedit.dll, unzip32.dll and naturally the xb.dll. If you scan the sbnormal.DEF file you can find those libraries within the object definitions xb.#####, sidedit.####, unzip32.####.

Now the unzip32.dll is a third party .DLL which is not coded in XBasic, so frankly there's nothing I can really do to implement this library somewhere unless I have the object file and even then it is hard to do so considering the old version of LIB.EXE that comes with XBasic.
Sidedit.dll however I did made in XBasic. I can ofcourse integrate sidedit.o into the sbnormal executable, but the purpose of sidedit.dll is that others can use the library too so I need to have it seperate.

To prevent conflicts of calling the XBasic libraries (Xui###, Xst###, Xgr###, Xin###, etc.) we have to place them into one of our .DLL libraries. (AND ONLY ONE!). Pick out the library that is utmost important to your application and if it is not important but people need to use it in future (or you want to release your shareware version without the extra DLL functionality) as if you are generating a plug-in, then create a dummy library that will contain those XB libraries to make the executable work by being able to call the XB libraries while your own created functions in the .DLL will just do nothing yet.
In order to compile your executable properly you need to adjust all xb.### imports to the name of the library where you will be integrating them. In my case this is sidedit:
 

[sbnormal.def]

PROGRAM  sbnormal
VERSION  2.0023
IMPORTS  sidedit.GetFileData
IMPORTS  sidedit.InitSidCenter
IMPORTS  unzip32.UzpVersion2
IMPORTS  unzip32.Wiz_SingleEntryUnzip
IMPORTS  sidedit.XgrGetDisplaySize
IMPORTS  sidedit.XgrGetGridWindow
IMPORTS  sidedit.XgrGetImage
IMPORTS  sidedit.XgrGetImageArrayInfo
IMPORTS  sidedit.XgrGetMouseInfo
IMPORTS  sidedit.XgrGetSelectedWindow
IMPORTS  sidedit.XgrGetWindowGrid
IMPORTS  sidedit.XgrGetWindowPositionAndSize
IMPORTS  sidedit.XgrGetWindowState
IMPORTS  sidedit.XgrLoadImage
IMPORTS  sidedit.XgrMessageNameToNumber
IMPORTS  sidedit.XgrMessageNumberToName
IMPORTS  sidedit.XgrProcessMessages
IMPORTS  sidedit.XgrRegisterCursor
IMPORTS  sidedit.XgrRegisterIcon
IMPORTS  sidedit.XgrRegisterMessage
IMPORTS  sidedit.XgrSetCEO
IMPORTS  sidedit.XgrSetClipboard
IMPORTS  sidedit.XgrSetCursor
IMPORTS  sidedit.XgrSetWindowPositionAndSize
IMPORTS  sidedit.XstChangeDirectory
IMPORTS  sidedit.XstCopyArray
IMPORTS  sidedit.XstCopyFile
IMPORTS  sidedit.XstCopyMemory
IMPORTS  sidedit.XstDecomposePathname
IMPORTS  sidedit.XstDeleteFile
IMPORTS  sidedit.XstDeleteLines
IMPORTS  sidedit.XstFindArray
IMPORTS  sidedit.XstFindFiles
IMPORTS  sidedit.XstGetApplicationEnvironment
IMPORTS  sidedit.XstGetCurrentDirectory
IMPORTS  sidedit.XstGetDrives
IMPORTS  sidedit.XstGetFiles
IMPORTS  sidedit.XstGetPathComponents
IMPORTS  sidedit.XstGetProgramFileName$
IMPORTS  sidedit.XstGetSystemTime
IMPORTS  sidedit.XstLoadStringArray
IMPORTS  sidedit.XstMakeDirectory
IMPORTS  sidedit.XstMergeStrings$
IMPORTS  sidedit.XstMultiStringToStringArray
IMPORTS  sidedit.XstNextCLine$
IMPORTS  sidedit.XstPathString$
IMPORTS  sidedit.XstQuickSort
IMPORTS  sidedit.XstRenameFile
IMPORTS  sidedit.XstSaveStringArray
IMPORTS  sidedit.XstSetExceptionFunction
IMPORTS  sidedit.XstSetProgramName
IMPORTS  sidedit.XstTRIM
IMPORTS  sidedit.XuiCallback
IMPORTS  sidedit.XuiCheckBox
IMPORTS  sidedit.XuiColor
IMPORTS  sidedit.XuiCreateGrid
IMPORTS  sidedit.XuiCreateWindow
IMPORTS  sidedit.XuiDisable
IMPORTS  sidedit.XuiDropButton
IMPORTS  sidedit.XuiEnable
IMPORTS  sidedit.XuiGetDefaultMessageFuncArray
IMPORTS  sidedit.XuiGetEnclosedGrids
IMPORTS  sidedit.XuiGetHelpWindowGrid
IMPORTS  sidedit.XuiGetNextCallback
IMPORTS  sidedit.XuiLabel
IMPORTS  sidedit.XuiList
IMPORTS  sidedit.XuiListBox
IMPORTS  sidedit.XuiListButton
IMPORTS  sidedit.XuiMenu
IMPORTS  sidedit.XuiProcessMessage
IMPORTS  sidedit.XuiProgress
IMPORTS  sidedit.XuiPushButton
IMPORTS  sidedit.XuiQueueCallbacks
IMPORTS  sidedit.XuiRadioBox
IMPORTS  sidedit.XuiRadioButton
IMPORTS  sidedit.XuiRange
IMPORTS  sidedit.XuiRedraw
IMPORTS  sidedit.XuiRegisterGridType
IMPORTS  sidedit.XuiSendMessage
IMPORTS  sidedit.XuiSendStringMessage
IMPORTS  sidedit.XuiSetGridTypeProperty
IMPORTS  sidedit.XuiTextArea
IMPORTS  sidedit.XuiTextLine
IMPORTS  sidedit.XuiToggleButton
IMPORTS  sidedit.XuiWindow


If all this is done I will check once more the sbnormal.mak to see if all libraries are linked properly:

[sbnormal.mak]

# Note: the next three lines are modified by the makefile-generator in xcow.x.
APP       = sbnormal
LIBS      = unzip32.lib sidedit.lib
START     = START /W

!include <xbasic.mak>

all: $(APP).exe

$(APP).exe: $(APP).o
        $(LD) $(LDFLAGS) -out:$(APP).exe xstart.o $(APP).o $(RESOURCES) $(LIBS) $(STDLIBS)

$(APP).o: $(APP).s

$(APP).s: $(APP).x
        $(START) xb $(APP).x


Yeps, oh-yeah:do notice the xstart.o in the beginning before $(APP).o, it is not linked with the sidedit library so you have to include this one in the executable else you will get an unresolved external which can't find "_WinMain@16"

Good let's pop it!:
nmake -f  sbnormal.mak



Now I have the following files for my distribution package:
sbnormal.exe
sidedit.dll
unzip32.dll

sbnormal.can't work without sidedit.dll but neither without unzip32.dll

 




Shrinking your executable by cutting out libraries
Okay, so now you swiftly and globally read how linking and compiling works from the inside.
You probably are interested in reducing the executable output since you guess that a lot of non necessary stuff is integrated into your executable as well. You're right they are.

It is advisable to make a backup of your current XBasic environment before messing with it!

Back it up to another directory and change your XBVARS.BAT before testing it.
You can set up individual command prompt envionrment properties per fast-link that you drop on your desktop. If you need multiple test environments, it is not advisable to call XBVARS.BAT from within your autoexec.bat but define new paths in the command prompt PIF properties that you can set in Win32.
I have yet no clue how you can arrange this in Linux but I bet you can do a lot with different user-properties.


I will supply brief blocks of information about each file of Xbasic file I made what changes in to shorten the executable. The invoked functions are functions you definitely can't remove from the libraries unless the function within the library which is not externally called that can be erased uses an external library function that is not called anywhere else.
all below data is based upon V6.0012, the current online release is way higher by now so update this use-list properly before applying all changes with notes from down this list!


 

\xb\xrun.x

Invokes:
Xst ()
XstSystemExceptionToException ()
XstExceptionNumberToName ()
XstGetExceptionFunction ()
XstGetCommandLineArguments ()
Xin ()
Xma ()
Xcm ()
Xgr ()
Xui ()

Imports:
IMPORT  "xst"
IMPORT  "xin"
IMPORT  "xma"
IMPORT  "xcm"
IMPORT  "xgr"
IMPORT  "xui"
IMPORT  "kernel32"

This is the substitute file for \xb\xit.x, basicly it only invokes the core libraries needed to run your application, the xit.x itself is the core PDE environment, you don't need to include that one in your executable at all.

You can disable the call of libraries by quoting out the IMPORT lines in the xrun.x and quoting out the calls to the main (first) function of those libraries further on in the Xit() function of xrun.x. This prevents the libraries from being called however, this will not prevent the libraries from being implemented in your executable. 
You can't leave them out of the mak-file just like that, specially not if you want to rebuild the XB environment, there are various functions called from the xlib in the \xb\lib directory which causes compile-time errors during the make.

The xin and xcm routines can be left out of the xrun.x if you don't need them, if you do that, you can also leave out the "wsock32.lib" from your .MAK file.

At least you won't provide W95 OSR 1 users (A/B version) a headache for them needing to upgrade their winsock.

\xb\xst.x
Invokes:
XgrGetTextImageSize ()
XgrGetDisplaySize ()
XgrProcessMessages ()
XxxXgrQuit ()
XgrRegisterCursor ()
XgrRegisterIcon ()
XgrRegisterMessage ()
XgrGetDisplaySize ()
XgrMessagesPending ()
XgrProcessMessages ()
Xui ()
XuiConsole ()
XuiSendMessage ()

 
Imports:
IMPORT  "xma"
IMPORT  "xgr"
IMPORT  "xui"
IMPORT  "xlib"
IMPORT  "user32"
IMPORT  "kernel32"

I left this file intact since I don't specificly know what the other libraries call from here, if I exclude everything my own source does not use, I might cut myself in the fingers because I cut out elements needed by other libraries.

\xb\xin.x
Invokes:
XuiSendStringMessage ()
XuiSendStringMessage ()
XstLoadStringArray ()
XstGetConsoleGrid ()
XstGetDateAndTime ()
XstSetSystemError ()
XstGetOSName () 


Imports:
IMPORT  "xst"
IMPORT  "xui"
IMPORT "wsock32"

 

The Internet library, since most of it is still not decently documented most people won't use this library either.

You can cut out most functions just leave the following intact (you can ofcourse cut out the body):

Xin                      ( )
XinInitialize            (@base, @hosts, @version, @sockets, @comments$, @notes$)
XxxXinBlowback          ( )


Also the wsock32 import line can be quoted out.

\xb\xcm.x

Imports:
IMPORT  "xst"
IMPORT "xma" 

The Complex Number library, most people won't use them unless you do some high scientifical projects that need to work with very large numbers.

Xcm imports the Xst library but does not use any function from it.
It does use most of the Xma library functions.

Leave the following functions intact: (At least the name)
DECLARE FUNCTION Xcm                   ()
DECLARE FUNCTION XcmVersion$           () 

\xb\xma.x

Imports:
IMPORT  "xst"

 

The Extended Math library.
I left this one alone since it is called by various other libraries. Leave it in peace.

Xst is imported, yet no functions are used from it.

\xb\xgr.x
Invokes: 
XstLog ()
XstSaveStringArray ()
XstLoadStringArray ()
XstCopyMemory ()
XstGetCommandLineArguments ()
XstGetFileAttributes ()
XstBinRead ()
XstBinWrite ()
XstGetOSName ()
XstGetConsoleGrid ()


Quoted but invoke-candidate:

'XstGetOSName ()
'XstGetOSVersionName$ ()
'XstSystemErrorToError ()
'XstErrorNumberToName ()
'XstSystemErrorNumberToName ()

 


Imports:
IMPORT  "xst"
IMPORT  "xma"
IMPORT  "xlib"
IMPORT  "gdi32"
IMPORT  "user32"
IMPORT  "kernel32"


 

The Core graphics library.
Take this advise, the Xgr recurses a lot of its own functions for own use, don't erase Xgr functions unless you are certain they are not called anywhere.

As for the Math functions:Max didn't used the Xma prefix in front of each math function to stay at least compatible to how math functions are called in other languages. So in this case I can't tell which are called and which aren't, yes I can find them, but this requires a lot of more work,

\xb\xui.x
Invokes:
XstBackStringToBinString$ ()
XstCopyArray ()
XstDeleteLines ()
XstGetApplicationEnvironment ()
XstGetCommandLineArguments ()
XstGetCurrentDirectory ()
XstGetDrives ()
XstGetFileAttributes ()
XstGetFiles ()
XstGetFilesAndAttributes ()
XstGetNewline ()
XstGetOSName ()
XstGetPathComponents ()
XstGetProgramName ()
XstGuessFilename ()
XstLoadString ()
XstLoadStringArray ()
XstNextField$ ()
XstPathString$ ()
XstQuickSort ()
XstReplaceLines ()
XstSetProgramName ()
XstStringArraySectionToString ()
XstStringArrayToString ()
XstStringArrayToStringCRLF ()
XstStringToStringArray ()
Xgr....()
(Which Xgr function doesn't it call?)


Imports:
IMPORT  "xma"
IMPORT  "xst"
IMPORT  "xgr"
IMPORT  "xlib"
IMPORT  "kernel32"

 

Here you can cut out whatever is not used in one of the other above libraries.
Also in here you find things like the toolkit functions, Reportmessage etc. things you don't need in the executable unless you want to debug your exe.

Even the Console window is created here. If you don't want it to pop up at all, remove the creation of it in the CreateWindows() function.

A good thing to know about the Xui.x library is how it invokes your messages you call.

The core message sender is the XuiSendMessage and XuiSendStringMessage. Any other direct message function you use (XuiGet....() XuiSet....()) will invoke the XuiSendMessage OR XuiSendStringMessage.

In some cases calling a direct message function works better than using XuiSendMessage but these are rare cases, try to avoid the use of direct message functions as much as possible, if you do so, you can erase most of these functions.



If you seem to be capable of shorten your executable you will shorten it by a couple of hundred KB (max), but shrinking it further with UPX the end result may be below 250Kb. 250 KB sounds fair enough.
My current record is 271Kb which is for a fairly large source of aprox. 500Kb.