MATLAB APPLICATION DEPLOYMENT - WEB EXAMPLE GUIDE User's Guide Page 154

  • Download
  • Add to my manuals
  • Print
  • Page
    / 354
  • Table of contents
  • TROUBLESHOOTING
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 153
7 Libraries
For a C++ Application o n Windows
mcc -W cpplib:libtrianglep -T link:lib sierpinski.m
mbuild triangle.cpp main_for_l ib.c li btri anglep.lib
For a C++ Application on UNIX
mcc -W cpplib:libtriangle -T link:lib sierpinski.m
mbuild triangle.cpp main_for_l ib.c -L . -ltriangle -I.
These commands create a main program named triangle , and a shared
library named
libtriangle. The library exports a s ingle function that uses
a simple i terative algorithm (contained in
sierpinski.m) to generate the
fractal known as Sierpinski’s Triangle. The main program in
triangle.c
or triangle.cpp can optionally take a single numeric argument, which, if
present, specifies the number of points used to generate the fractal. For
example,
triangle 8000 generates a diagram with 8,000 points.
7-24
Page view 153
1 2 ... 149 150 151 152 153 154 155 156 157 158 159 ... 353 354

Comments to this Manuals

No comments