MATLAB COMPILER 4 Manuale Utente Pagina 8

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 21
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 7
This w ill create an import library for an existing library libname.dll that now can b e
linked against an application using gcc. An example bat-file creating these libraries is
given in Section A.3.
Thus, a Makefile written for Linux (see: Listing 1) can be used under Windows as well,
if the following restrictions are conidered:
Special UX compiler and linker flags must be removed:
CFLAGS = -DUNIX -ansi -D GNU SOURCE -pthread
LDFLAGS = -pthread
When creating a library the output libname.so must be renamed to libname.dll.
When creating an executable the target exename may be renamed to exename.exe.
Some versions of the make command will add the exe-extension automatically if
missing.
Note that building MATLAB API applications or standalone MATLAB applications with
GCC on Windows are not supported; you will have to address any incompatibility issues
that may arise.
3.6 Compiling using lcc
lcc is a free C-compiler that is shipped with the MATLAB package. For compiling M-files
within the MATLAB environment you can choose either to use lcc or, if present, Visual
C++. Of course you may use lcc for compiling in command line as well. Therefore you
only need to link against the correct versions of the MATLAB libraries that are located in
matlab dir\extern\lib\win32\lcc. If lcc was selected as standard compiler for MATLAB,
use mbuilt to determine the correct parmeters.
Be careful, lcc is a plain ANSI C compiler. Thus, you necessarily have to set the target
language to C when converting the M-files! For more detailed information refer to [16] or
run the lcc-help that is included in the MATLAB package: matlab dir\sys\lcc.
8
Vedere la pagina 7
1 2 3 4 5 6 7 8 9 10 11 12 13 ... 20 21

Commenti su questo manuale

Nessun commento