Matrix Elements VB-800 Instrukcja Użytkownika Strona 12

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 172
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 11
4 Appendix A1 Extending Ox
A1.2.1 Compiling threes.c
The threes.c file should compile without problems into a DLL file. Makefiles for
the Microsoft, Borland, and Watcom compilers have been provided; note the calling
conventions mentioned above, and the need to link in a library file or a definition file to
resolve the calls to the Ox DLL.
A1.2.1.1 Visual Microsoft C
++
6
If you create the project afresh in Microsoft Visual C
++
version 6 (msdn.microsoft.
com/visualc/), you need to take the following steps to compile successfully:
create a Dynamic-link library project;
add your ox\dev folder as an additional include directory (project settings, C
++
,
preprocessor);
add ox\dev\oxwin.lib as Object/link module (project settings, link);
insert threes.c and threes.def into the list of project files. The threes.def
file defines the symbols to be exported (FnThrees).
A1.2.1.2 Borland C
++
If you use Borland C
++
Builder 5.5 (www.borland.com), you can easily create
an import library from oxwin.dll using the IMPLIB.EXE utility supplied with the
Borland compiler. More information is in the Borland documentation, also see
threes/bcc55/readme.txt.
A1.2.1.3 Watcom C
++
The example for Watcom (www.watcom.org) uses command line compilation:
make.bat sets the paths, but is installation specific;
makefile.bat adds the additional include search path;
threes.def imports the required Ox functions and defines the symbols to be
exported.
A1.2.1.4 Name decoration
The Watcom and Borland compilers also illustrates the name decoration issue:
oxwin.dll exports undecorated names, but Borland and Watcom assume that
__stdcall functions are prefixed with an underscore, and postfixed with the number
of bytes required for the arguments. The watcom/threes.wlk file renames to resolve
this issue:
import ’_OxLibCheckType@16’ ’oxwin.dll’.OxLibCheckType
import ’_OxLibValMatMalloc@12’ ’oxwin.dll’.OxLibValMatMalloc
Przeglądanie stron 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 171 172

Komentarze do niniejszej Instrukcji

Brak uwag