I now have VS 2005 Professional. I am trying to use bmake to compile a pre-made C++ app. I open the "MicroStation Developer Shell" and then type "bmake" and the name of the .mki file. In this case the folder is basic and the file is basic.mke. In the MicroStation Developer Shell I type
bmake C:\Users\Chad\Desktop\basic\basic
The location of bmake is C:\Program Files (x86)\Bentley\MicroStation\mdl\bin>
The error it shows is
C:\Users\Chad\Desktop\basic\basic.mke(20) : error : can't open include file mdl.mki
Note: I do have the file mdl.mki under C:\Program Files (x86)\Bentley\MicroStation\mdl\include.
But the main problem I think this all stems from happens when I open up the MicroStation Developer Shell. Upon opening it reads:
#-----------------------------------------------------------------------# ERROR: Bad parameter# Usage = MSTNDEVVARS.BAT "C:\Program Files (x86)\Bentley\MicroStation" "C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)"# 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 opened up mstndevvars.bat. It looks like it is going to the usage_error from:
IF "%MS%." == "." goto USAGE_Error
And then it goes to Usage_error and the program ends after that.
:USAGE_Error@ECHO #-----------------------------------------------------------------------@ECHO # ERROR: Bad parameter@ECHO # Usage = MSTNDEVVARS.BAT "C:\Program Files (x86)\Bentley\MicroStation" "C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)"@ECHO # e.g. %comspec% /x /k "C:\Program Files\Bentley\MicroStation\mdl\bin\mstndevvars.bat C:\Program Files\Bentley\MicroStation\ C:\Program Files\Bentley\MicroStationSDK\"@ECHO #-----------------------------------------------------------------------GOTO end
I wasn't sure what I needed to do so that "%MS%." == "." is false so I don't get the usage error. Thank you for your help.
Hi,
as Michael noted, MicroStation Developer Shell should be opened using a shortcut created during SDK installation. Mstndevvars.bat should not be started directly.
If you start the shell using the shortcut and an error message still exists, the shell parameters are not set or are set incorrectly. You should check the shortcut parameters, if it's set to a proper folders.
Personally I changed the shortcut a bit in this way:
Another note: After you start the shell, in my opinion it's better to go to a folder where example resides, so you can start the compilation using e.g. bmake basic.mke without the need to enter the full path.
It's also recommended to start the shell As Administrator to be sure the make process will receive enough right to write into MicroStation program folders.
With regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Answer Verified By: HDR_Coder
Thank you for all the help, I set MSV8i=C:\Program Files (x86)\Bentley\MicroStation V8i (SELECTseries)\MicroStation\ in Mstndevvars.bat. After this I replaced IF "%MS%." == "." goto USAGE_Error with IF "%MSV8i%." == "." goto USAGE_Error This seemed to fix the problem so that everything sets up in the developer shell. I now ran the MicroStation developer shell as administrator, cd to the folder, and ran the bmake appname and got it to start compiling. In my case I went to the toolExample folder and ran bmake toolExample. It created an mdlapps folder and a dll and a PDB file. But I wasn't sure if it finished, as I got a BMAKE: call trace error in the developer shell that said, " All rights reserved. singleton "C:\PROGRA~2\MI30EB~1\SDK\v2.0\\Bin\signtool.exe" sign /f developer.pf x /p bsidev "mdlapps\toolExample.dll" 'singleton' is not recognized as an internal or external command, operable program or batch file. BMAKE: call trace line: 442, C:\PROGRA~2\Bentley\MICROS~2\mdl\include\dlmlink.mki line: 95, C:\Users\Chad\Documents\MDLProjects V8i (SELECTseries 1)\toolexa mple\toolexample.mke Mon Jun 08 07:21:31 2015, elapsed time: 0:05 " It seems like it might have finished and only errored out at the end, I was not sure.
I cannot find a .ma file, although under MicroStation\mdl\objects it created a
toolExample.exp, .rsc, .obj, .manifest, .map, and .rsp.
Unknown said:as I got a BMAKE: call trace error in the developer shell that said...
It was discussed in the past several times already, compile (any) example using bmake -dDLM_NO_SIGN <make file>, e.g. bmake -dDLM_NO_SIGN toolexample.mke. DLM_NO_SIGN macro prevents the application be signed using digital certificate, which obviously will fail if not configured properly.
Regards,