Not Rule or Dependency

Hi Everyone,

I am new to mdl programming.  I have Microstations v8i select series 4 and I have downloaded the v8i SDK.

I first want to compile and create a simple mc source file to a ma file and then try to execute it as a test.

The program is that when I attempt this we bmake, I am getting an error that I can not determine the cause.

here is the source file:

#include <mdl.h>
#include <dlogitem.h>

int main()
{
mdlDialog_openInfoBox(“Hello World!!”);
return 0;
}

I open the MicroStation Developer Shell and type the following:

C:\PROGRA~2\Bentley\MICROS~1\MICROS~1>bmake c:\hastus\hw.mc
Bentley Systems Make Utility. Version 08.11.09.04, Feb 10 2014
Thu Mar 11 10:51:48 2021
c:\hastus\hw.mc(4) : error : not rule or dependency
BMAKE: call trace
    line:    4, c:\hastus\hw.mc

Line 4 in the source is int main().  What is wrong with this line?

Just a note, I have not installed VS 2005.  I'm not sure if I need to for what I am doing.

Could someone help me with what I am doing wrong?

Also not that this is on Windows 10, if that matters.

  • MDL Pseudo Code is Obsolete

    I first want to compile and create a simple mc source file to a ma file
    I have not installed VS 2005.  I'm not sure if I need to for what I am doing

    You're writing MDL pseudo-code in a .mc source file and building a .ma executable.  You're using the Bentley tools supplied by the SDK.  You are not using Viz Studio: it would not provide anything useful.

    However, that's a very short-term approach.  Bentley have ceased support for the V8 MicroStation products.  The current version of MicroStation is CONNECT Update 15.

    MicroStation CONNECT does not support MDL pseudo-code.  For CONNECT you write C# or C++ using the tools supplied with Viz Studio 2017. 

     
    Regards, Jon Summers
    LA Solutions

  • C:\PROGRA~2\Bentley\MICROS~1\MICROS~1>bmake c:\hastus\hw.mc
    MDL Pseudo Code is Obsolete

    Of course Jon is absolute right! But I like to add a note.

    You try to open a source file with "bmake" this could of course not work.

    If you use any make command (make, bmake, cmake, etc.....) you will always need a makefile with rules and dependencies. In V5, V7, V8, V8i, V10 (AKA CE) . HTH!

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

  • Make Files and BMake

    I am new to mdl programming

    Whether you write an app using obsolete MDL, or preferably C# or C++, the build process is controlled by a make file. A make file contains a set of rules.  Each rule instructs a tool to do something. For example, there is a rule to compile a source file (e.g. MyApp.cpp) to an object file (e.g. MyApp.obj).  A make file probably has multiple rules, each corresponding to a source file in your project.  

    In the context of MicroStation, a make file has a .mke extension.  Invoke the bmake (bmake.exe) tool provided by the MicroStation SDK to parse your project's make file.  bmake understands both implementation (e.g. source code) files and resource (e.g. dialogs, messages) files. That is, it knows how to build object files from C++ source code and how to build resource binary (*.rsc) files from resource (*.r) files.

    You have installed the MicroStation SDK.  Examine the projects in the examples folder.   Each project has a bmake file that controls the build process.  Model your project on those examples.

    The simplest syntax to invoke bmake in the SDK shell is...

    bmake MyApp.mke

    I suggest that you build some of the example projects.

     
    Regards, Jon Summers
    LA Solutions

  • Jon,

    We do plan to upgrade to connect soon.  We do have MDL programs that I am trying to turn into .ma files in v8i at the moment.  Just to confirm, our mdl programs will have to be rewritten when we upgrade to Connect, is that correct?

  • OK.  Thanks.  I tried to compile my .mc file with the mcomp (compiler) and got the much more useful that the include files could not be found. 

  • I would suggest  you should choose only to migrate to Connect Edition. If you need to migrate to V8i AND CE, it will take at least twice as long! Because there is no simpel way in C++ from V8i to CE

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

  • Hi Brenden,

    We do plan to upgrade to connect soon.

    as Volker wrote, when your target is CONNECT Edition, you should carefully decide the best migration way. There are several "paths" how to go from V8 ma to CE dll available and every offer different benefits and costs, depending on context and starting conditions. Because of that, to migrate well written old V8.0 MDL application can be in some situations much cheaper than do the same with dirty .c code written for V8i by wrong developer.

    To illustrate extreme alternatives:

    • MDL (.mc compiled to .ma), developed for 8.0 (I do not assume you have MDL application written for V7, it would represent completely different complexity) > transformation to native V8i code (VS2005 Professional required) > debugging and fixing all issues > transformation to CE (VS2017 required)
    • MDL source code is put to trash > application logic is rewritten in C++ or NET (C#) using CE SDK

    Of course, technical complexity is one part, another is technical (software development) knowledge and available tools (Visual Studio 2005, required for V8i development, is now available through MSDN only I think).

    our mdl programs will have to be rewritten when we upgrade to Connect, is that correct?

    Yes .. but how much "yes" depends on the code itself.

    With regards,

      Jan