Compiling MDL Applications


  

Document Information

Document Type: TechNote  

Product(s):  MicroStation

Version(s):  All

Original Author: Bentley Technical Support Group

Legacy Document Number:  8122

Overview

Compiling a MicroStation 95/MicroStation SE MDL application in Windows 95 or Windows NT. These are simplified directions, for more complete instructions see the MDL Programmer's Guide available on your delivered CD.

Solution

To compile the MDL application, "YOURAPP" (substitute your application name here), do the following:

Note: The file directory shown is valid if MicroStation is installed using the default directories. If you have used a different directory to install MicroStation, adjust the paths accordingly.

  1. The following three(3) environment variables need to be set. These can be set in the AUTOEXEC.BAT, the System Setup Tool or in a batch or script file that runs in a command shell.

     

    Add the mdl\bin directory to the path
    for example: Set path=%path%;C:\win32app\ustation\mdl\bin
    (path to BMAKEWIN.EXE)
    Set the MS environment variable
    for example: Set MS=C:\win32app\ustation
    (path to MicroStation)
    Set the BMAKE_OPT environment variable
    for example: Set BMAKE_OPT=-IC:\win32app\ustation\mdl\include
    (path to MDL.MKI)
    Note: In the BMAKE_OPT line above, that is a minus sign and uppercase i ( -I ) with no spaces from BMAKE_OPT to the end of the line.

     

  2. In DOS, change the directory to the path of the source code (i.e. YOURAPP.mc, YOURAPP.h, YOURAPP.mke, etc.). In this case, type:

    cd\...\YOURAPP

  3. From the C:\...\YOURAPP directory, type:

    bmakewin -a YOURAPP.MKE

  4. The compiler may return several warning statements, "...does not have an ANSI function declaration". In MicroStation 95, the MDL compiler was redesigned to be more strict about warnings. This particular warning can be eliminated in one of the following ways:
    1. The proper way is to include the respective function definition files (.FDF). See the MDL Supplement Guide.

      The following method is not recommended on a regular basis but will work to temporarily compile applications on your own machine.

    2. Ignore this warning. Although we don't recommend this for those developing MDL applications, in this case, this warning is harmless.
  5. If the application compiled, the compiler will return a line "Building C:\win32app\ustation\mdlapps\YOURAPP.ma". This line should appear approximately 4 lines above the last line returned by the compiler.
  6. Lastly, In MicroStation key in MDL load YOURAPP (substitute your application name here). This should load the application.

See Also

Product TechNotes and FAQs

MicroStation Desktop TechNotes and FAQs

External Links

Bentley Technical Support KnowledgeBase

Bentley LEARN Server

Comments or Corrections?

Bentley's Technical Support Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!