need information and HELP!

When i read API i found that to keep a dialog box we need to write code in .r, .mke and linked with .mc file. I am confused that do .r and .mke automatically linked with .ma file which we compiled using .mc file. If not then what should i need to do?

please help me..

and to compile and link .mc file i am using the following code:

mcomp -i%MS%\mdl\include -i%MS%\mdl\include\stdlib Path\file_name.mc
mlink -a%MS%\mdlapps\file_name.ma Path\file_name.mo

please help me..
Parents
  • The process of creating an MDL application is similar to creating a Windows application: you build a solution by compiling several source files and linking them.  Whereas Viz Studio hides those several steps behind an Integrated Development Environment (IDE), with MDL those steps are exposed.

    Your application has source code and source data files.  Source code implements your logic and is stored in one or more .mc files.  Source data defines your user interface: dialogs, messages lists, command tables, etc. and is stored in resource (.r) files.  Header (.h) files provide definitions that are used by both .mc files and .r files.

    Make File

    As you demonstrate below, you can invoke the compiler and linker manually.  As you have found, it is tedious to compile and link each component of your application manually.  The solutions is a make file.

    Make files have a long and honourable history, which we won't dwell on here.  MDL encourages you to use a make (.mke) file to build your project.  bmake.exe is Bentley's make file parser.  You can use it for building many different types of application, not just MDL.

    A make (.mke) file contains a set of rules.  Each rule tells bmake what to do with a particular source file.  Look in the MDL examples folders that were installed with the Software Developer Kit (SDK) to see many examples of bmake files.

    Invoke a bmake file with bmake.exe.  Instead of manually typing each instruction, bmake wraps those instructions into a single set of rules that you apply consistently and repeatedly as you develop your application.

     
    Regards, Jon Summers
    LA Solutions

  • thanks Jon for your reply.. I am still confused please can you explain with some examples....

  • i ve checked some examples in API. and viewed the link u provided but still i am confused......

  • najas said:
    I've checked some examples in API

    I don't know what question that answers, but it doesn't answer my question.  Have you found the folder that contains the MDL examples?

    Work through one of the MDL examples.  Start with basic.  That provides an example that contains a dialog resource (basic.r), some implementation code (basic.mc), a command table (basicCmd.r), and a make file (basic.mke).

    Open a Windows command prompt, then keyin the following:

    1. cd C:\Program Files\Bentley\Program\MicroStation\jmdl\bin [edited]
    2. mstndevvars.bat
    3. cd C:\Program Files\Bentley\Program\Workspace\mdl examples\basic
    4. bmake basic

     
    Regards, Jon Summers
    LA Solutions

  • thanks for the reply. but the file mstndevvars.bat  is in the  following path so that didnt worked.... t

    C:\Program Files\Bentley\Program\MicroStation\jmdl\bin

    mstndevvars.bat

    thanks for the support and help.. hope u will help and support in coming days too.

  • najas said:
    The file mstndevvars.bat  is in the  following path

    Apologies!  I should read my own notes about MDL development.

     
    Regards, Jon Summers
    LA Solutions

  • Just curious, but is there any specific reason you are using MicroStation V8 2004 Edition? We highly recommend using the current release -- MicroStation V8i -- as there have been a number of "new and improved" things done since 2004.

      

  • thanks Jon for the link. I ve searched alot but could not find such important site. thanks alot for your support and help....

  • i ve also the same problem since i am also new in this MDL. i ve not used  bmake command till now but this posts helped me alot...

  • when i tried "bmake basic" the following message appeared...

    BMAKE: can't open basic

    what does it means? i ve given path as in the note www.la-solutions.co.uk/.../MdlDevelopmentEnvironment.htm....

  • najas said:
    BMAKE: can't open basic

    Understanding Windows

    It's the same message that any application will give when it can't find a file.  You've successfully invoked bmake.exe, but bmake can't find the file basic.mke

    As with any similar situation on Windows, Linux, or whatever, your application needs to be able to find the file you provide.  If you provide just a file name, then the application looks in the current working directory.  If the file isn't in the current working directory, then you get a message similar to that which you have posted. If you provide a fully-qualified path, then the application knows exactly where to look.

    I suggest you change directory to the location of the MDL example BASIC:

    C:>  ... path to MicroStation\ ... \ustndevvars.bat

    C:> cd ... path to BASIC example folder ...

    C:> bmake basic

     
    Regards, Jon Summers
    LA Solutions

  • may i see some snaps serially that u do to run the basic. i am still getting problem in this hope you will help me...

Reply Children
No Data