Win32 Troubleshooting:Compilation

XBasic is published in two versions:
MaxBasic:6.xxxx, the last version is 6.0022 and is compatible up to Eddie's version of 6.1.3.
EddieBasic:6.x.y, Versions after 6.1.3 are better bugfixed and up to date than Max's 6.00022.

Each XBasic require their own kind of compilations and distributions, the differences between them will be displayed here:

MaxBasic

Source-files programmed in the PDE
All sources should be compiled in \xb\
All executables end up in \xb\run

Compiled files
All executables should be distributed with the proper XB.DLL
This proper XB.DLL can be found in \xb\run\ (most likely your executable will be there too)

XB-Source compilation specific details
The full XBasic PDE source should be compiled with:
nmake -f xbasic.mak
The runtime library should be compiled with:
nmake -f runxb.mak

EddieBasic

Source-files programmed in the PDE
All sources can be compiled anywhere
All executables end up in the path where they are compiled from.

Compiled files
All executables/libraries should be distributed with the proper XB.DLL
This proper XB.DLL can be found in {xbpath}\bin\runxb.dll, it should be copied elsewhere (along with the executable) and be renamed to XB.DLL

XB-Source compilation specific details
The full XBasic PDE source should be compiled with:
make clean
make
make install

Cygwin is required in order to recompile the XBasic PDE

 

Both versions

Both executable distribution as the source distribution are required to recompile the XBasic environment.

Default compilation of a source-file is done in this order for an executable:
XB [mysource].x
nmake -f [mysource].mak

Default compilation of a source-file is done in this order for a library:
XB [mysource].x -lib
nmake -f [mysource].mak


Non XBasic compiled DLL libraries
Third party Dll files that are incorporated to use in XBasic need to have a corresponding .LIB file (V5.0 and lower compatible) if you want to compile your executable. And in order to create one if there isn't one, or the distributed version is incompatible, you need a .DEF file.
To solve these problems there are a couple of tools that can achieve this goal.

Another problem may be wrong declarations of functions inside the third-party dll and these can be one or more of the following mistakes: