I'm using v8i select series 4 and I was wondering if anyone could tell me how to specify in the MicroStation Developer Shell that I would like bmake to use the compile built into microstations and not the vs 2005 compile?

I'm getting the below warning when I start the developer shell:

# Warning: Compiler Setup error
# VS80COMNTOOLS not defined. That should have been set when the
# .NET 2005 compiler was installed. You will not be able to do
# any native C, C++ or C# development using the default compiler
# for MicroStation.
#-----------------------------------------------------------------------

I don't want to use the vs 2005 compiler how do I tell bmake to use the microstations compiler?

  • Hi Brenden,

    the selection is done mostly automatically, so when .mc file is compiled, mcomp should be called.

    I recommend to check examples, delivered with SDK, for the few remaining cases with .mc files, especially how mke + mki files are written.

    With regards,

      Jan

  • Jan,

    Thank you.  I have been able to compile and run a simple pure mdl example that displays a simple dialog box.  I used mcomp and mlink to create the ma file for this.

    I've inherited several pure mdl programs, complete with make files.  I want to now compile and link the first of these programs using bmake to test them.  Unfortunately, when I run bmake specifying the make file but got the following error:

    BMAKE: Error - Attempting to build with VS 2005 but location is undefined!
    BMAKE: call trace
    line: 119, C:\PROGRA~2\Bentley\MICROS~1\MICROS~1\mdl\include\AssertToolSet.mki
    line: 109, C:\PROGRA~2\Bentley\MICROS~1\MICROS~1\mdl\include\ConfigurePolicy.mki
    line: 28, C:\PROGRA~2\Bentley\MICROS~1\MICROS~1\mdl\include\mdl.mki
    line: 8, c:\hastus\menus\menus.mke

    The source file is a .mc file.

    I thought I saw somewhere on this form that there is a flag to tell Microstations not to use the vs 2005 compiler and use the Microstations compiler?  Does something like that exist?

  • I thought I saw somewhere on this form that there is a flag to tell Microstations not to use the vs 2005 compiler and use the Microstations compiler?  Does something like that exist?

    Maybe. But the idea is wrong.

    If you bother to check the examples, you saw that there is nothing like "switch VS2005 off" used in them. These simple makefiles do not call VS2005 (or any other native code compiler).

    Probably something in your mke is configured to use native code compiler.

    when I run bmake specifying the make file but got the following error:

    It does not tell too much.

    To share both mke file and also verbose compilation (so e.g. how macros are resolved will be visible) would help.

    Regards,

      Jan

    Answer Verified By: Brenden OReilly 

  • Thanks, Jan.  I think I will probably just download and install vs 2005 to remove that as a possible cause of my issues.

  • Hi Brenden,

    I think I will probably just download and install vs 2005 to remove that as a possible cause of my issues.

    I am sure it's not. But you are not willing to share you mke file, you have to solve the problem yourself.

    Be aware that .mc fles are not compilable by VS2005, because MDL is not pure C/C++, but it's dialect with some differences. So when code is written (.mc, .r), it has to be decided whether it's written for pseudocode compilers or for native code compilers. No code can be compiled by both.

    just download and install vs 2005

    Be aware it has to be Visual Studio 2005 Professional, not any other variant (at this time, some VS2005 free/lite versions existed).

    With regards,

      Jan

  • Jan,

    Below is the make file that I am attempting to run that is getting the error:

    #
    # menus MDL Make File
    #

    %include mdl.mki

    %if defined (_MakeFilePath)
     baseDir = $(_MakeFilePath)
    %else
     %if defined (powerc) || (m68k)
      baseDir = /
     %else
      baseDir = ./
     %endif
    %endif

    objectDir = $(baseDir)
    privateInc = $(baseDir)
    appDir = $(baseDir)


    # Define symbol for files included in our link and resource merge
    Objs = \
     $(objectDir)menus.mo \
     $(mdlLibs)alertlib.ml
       
    Rscs = \
     $(objectDir)menus.rsc \
     $(objectDir)menus.mp


    # Compile the MDL source using MCOMP
    $(objectDir)menus.mo : $(baseDir)menus.mc $(baseDir)menus.h


    # Compile Resources (RCOMP OF MAIN RESOURCE)
    $(objectDir)menus.rsc : $(baseDir)menus.r $(baseDir)menus.h


    # LINK MDL APPLICATION
    $(objectDir)menus.mp : $(Objs)
     $(msg)
     > $(objectDir)make.opt
     $(linkOpts)
     -a$@
     $(Objs)
     <
     $(MLinkCmd) @$(objectDir)make.opt
     ~time


    # USE RLIB TO MAKE .MA FILE
    $(baseDir)menus.ma : $(Rscs)
     $(msg)
     > $(objectDir)make.opt
     -o$@
     $(Rscs)
     <
     $(RLibCmd) @$(objectDir)make.opt
     ~time

  • Please, use Insert > Insert code tool always! you need to share a code snippet. Or attach is as a text file (when the snippet is long).

    It's not only confusing to try to read code formatted as a plain text, but in the case of make files, where indentation is important, it can change how code is understood.

    I do not see any critical error in your code, even few things does not make any sense. It seems you use very very very old templates, not make files from V8 applications. E.g to check whether _MakeFilePath exists does not make sense, because it's "always existing" variable. Also, to thing whether to support PowerPC or Motorola 68000 is nonsense, because MicroStation V8 exists only for Windows (and these platforms do not exists anymore, and the processors are used for other applications).

    How your environment is defined? Are MS and MSMDE variables defined correctly? And are not other variables (like BUILD_USING_VS2005 or any other), that can switch mki procesing in unwanted way, defined?

    To analyze complete log how macros are evaluated, should help to understand why right compilers are not called .... and something from AssertToolSet.mki is used instead of it.

    Regards,

      Jan