Developer Shell Problem

Hello helpful community,

I am trying to create a simple C++ application.  I am using the example 'basic' as given in the SDK.

I open up the command prompt and run mstndevvars.bat.  I get the following output

"""

C:\Users\ccrowe>"C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)\
MicroStation\mdl\bin\mstndevvars.bat"

C:\Users\ccrowe>REM To not see this information echo to the screen

C:\Users\ccrowe>REM set ECHO as an environment variable in your system configura
tion.

C:\Users\ccrowe>REM For more information see the MicroStation SDK README.

C:\Users\ccrowe>REM ** SET MS **

C:\Users\ccrowe>set msdrive=

C:\Users\ccrowe>set mssource=

C:\Users\ccrowe>SET MS=

C:\Users\ccrowe>for %I in ("") do set MS=%~sI

C:\Users\ccrowe>set MS=

C:\Users\ccrowe>IF "." == "." goto USAGE_Error
#-----------------------------------------------------------------------
# ERROR: Bad parameter
# Usage = MSTNDEVVARS.BAT [MicroStation dir] [MicroStation SDK dir]
# e.g. C:\windows\system32\cmd.exe /x /k "C:\Program Files\Bentley\MicroStation\
mdl\bin\mstndevvars.bat C:\Program Files\Bentley\MicroStation\ C:\Program Files\
Bentley\MicroStationSDK\"
#-----------------------------------------------------------------------

C:\Users\ccrowe>GOTO end
C:\Users\ccrowe>

"""

I am not sure what the error means.

I then cd into the basic file and run bmake.exe

I get the following output 

"""

C:\Users\ccrowe\Desktop\basic>"C:\Program Files (x86)\Bentley\MicroStation V8i (
SELECTseries)\MicroStation\mdl\bin\bmake.exe"
Bentley Systems Make Utility. Version 08.11.09.02, Jan 5 2010
Mon Apr 13 12:16:45 2015
C:\Users\ccrowe\Desktop\basic\basic.mke(20) : error : can't open include file md
l.mki
BMAKE: call trace
line: 20, C:\Users\ccrowe\Desktop\basic\basic.mke
Mon Apr 13 12:16:45 2015, elapsed time: 0:00

C:\Users\ccrowe\Desktop\basic>

"""

I am unsure why these errors are occurring.  Thank you again for your help.

Parents
  • Unknown said:
    Usage = MSTNDEVVARS.BAT [MicroStation dir] [MicroStation SDK dir]

    You must supply the paths to (a) MicroStation and (b) the MDL sub-folder.  I don't know why it can't figure those out for itself, considering you start it from the \MDL\bin folder.  Once you have it running, make your own version of that batch file and hard-wire the paths for your computer.

     
    Regards, Jon Summers
    LA Solutions

  • This is my ignorance coming through.

    Here is the error again. I have gone into the MSTNDEVVARS.BAT file and edited those paths
    """
    #-----------------------------------------------------------------------
    # ERROR: Bad parameter
    # Usage = MSTNDEVVARS.BAT ["C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)\MicroStation"] ["C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)\PrintPreparation\SDK"]
    # e.g. C:\windows\system32\cmd.exe /x /k "C:\Program Files\Bentley\MicroStation\mdl\bin\mstndevvars.bat C:\Program Files\Bentley\MicroStation\ C:\Program Files\Bentley\MicroStationSDK\"
    #-----------------------------------------------------------------------
    """

    I am not sure if I am doing the correct thing. Thank you for your help.
  • Chad,

    When the SDK installed it should have added a cmd shell short cut to the Bentley group of start menu shortcuts. Try looking on the start menu to see if this is the case. If not then you will need to manually create the short cut. I would recommend that you use the short path names for the directories (it gets rid of spaces and I have had more success with it this way). Also what version of Visual Studio do you have installed?

    Regards,
    mark anderson [Bentley]
  • I have Visual Studio 2013 installed. There was no free version of 2005 available, and I was not sure how much it mattered.
  • So you are correct that I have a cmd shell short cut under Bentley > Microstation V8i (SELECTseries3) SDK called "MicroStation Developer Shell"

    I then moved in the basic directory and ran bmake.exe. I got this error:
    """
    C:\Users\ccrowe\Desktop\basic>"C:\Program Files (x86)\Bentley\MicroStation V8i (
    SELECTseries)\MicroStation\mdl\bin\bmake.exe"
    Bentley Systems Make Utility. Version 08.11.09.02, Jan 5 2010
    Mon Apr 13 15:21:15 2015
    PolicyFile = C:\PROGRA~2\Bentley\MICROS~1\MICROS~1\mdl\include\AssertPublicMicr
    oStationPolicy.mki
    BMAKE: Error - Attempting to build with VS 2005 but location is undefined!
    BMAKE: call trace
    line: 120, C:\PROGRA~2\Bentley\MICROS~1\MICROS~1\mdl\include\AssertToolSet.
    mki
    line: 109, C:\PROGRA~2\Bentley\MICROS~1\MICROS~1\mdl\include\ConfigurePolic
    y.mki
    line: 28, C:\PROGRA~2\Bentley\MICROS~1\MICROS~1\mdl\include\mdl.mki
    line: 20, C:\Users\ccrowe\Desktop\basic\basic.mke
    Mon Apr 13 15:21:15 2015, elapsed time: 0:00

    C:\Users\ccrowe\Desktop\basic>
    """

    I am now seeing that not having VS 2005 is an issue, but I am unable to get VS 2005, it is no longer available to download. Where should I go from here?

    Thank you for all the help.
  • Unknown said:
    I am now seeing that not having VS 2005 is an issue, but I am unable to get VS 2005

    Viz Studio 2005 is required for development of native-code (C++) applications with MicroStation V8i.  See this table of Viz Studio versions.

    The only way I know of to get older versions of Viz Studio is through an MSDN subscription.

     
    Regards, Jon Summers
    LA Solutions

  • Hi Chad,

    in this post I will play a role of a wicked man and will be hard on you ... a bit ;-)

    Unknown said:
    There was no free version of 2005 available, and I was not sure how much it mattered.

    In your other post you wrote you are comfortable with C++. Sorry, but you are not. This is one of the basic rules in C and C++ development that you have to link your code with a proper (the same) library version, not "some version" created using "some compiler". Using Microsoft C++ compiler, the simplified rule is you have to use the same Visual Studio that was used to produce libraries you will use. More precise formulation is you have to use the same MSVCRT runtime library.

    I recommend to search for terms like calling convetions (example of very detail document) and msvcrt hell and to study what you will found. This issue is not specific for MicroStation development and also not only for Visual Studio compilers, so if you really want to know C/C++, this is the mandatory knowledge.

    Unknown said:
    I am now seeing that not having VS 2005 is an issue, but I am unable to get VS 2005, it is no longer available to download. Where should I go from here?

    As Jon wrote, you can receive any version of Visual Studio through MSDN. My addition is Don't be lazy. It took me 30 seconds to find links to download Visual Studio C++ 2005 Express Edition. I have to alert there are some differences between full VS and Express Edition, unfortunately also in terms of registry, but at least you will have the right version of C++ compiler.

    If I remember right, it was discussed several times here how to use Express Edition with MicroStation Development shell. In my opinion the full Visual Studio 2005 is better solution, but I don't know if MSDN is acceptable way for you (but if you want to be developer on Windows platform, you should think about it seriously).

    I don't know your situation/conditions, but there is also another way: You can start to learn how to develop applications for MicroStation CONNECT Edition, which will be released this year. It offers reworked API (with many new parts) targeted to Visual Studio 2013, so there is no need for old VS version. If you are SELECT subscriber, you should have access to beta version and SDK is also available.

    With regards,

      Jan

  • My company will not be upgrading to the MicroStation CONNECT Edition anytime soon. I will have to keep looking for a professional edition of 2005, for free. I am still in college, so maybe I can get it from Microsoft some other way. I will have to contact them.
  • Unknown said:
    I am still in college, so maybe I can get it from Microsoft some other way.

    You can try it through Microsoft DreamSpark. Visual Studio 2005 Professional is not, as expected, in the list of downloadable products, but I assume it would be possible to receive also older version(s) based on personal request / discussion with responsible Microsoft representatives.

    Regards,

      Jan

Reply Children
No Data