I cannot compile the mdl project.

I am totally new to the MDL development. I tried to compile an MDL project that was implemented by my colleague (The project was compiled fine on his computer), and here is the error:

Bentley Systems Make Utility. Version 08.11.00.06, Sep  5 2007
Mon Apr 11 11:35:07 2011

[== Building C:\Test\MicroStation\mdl\MDLassetID\work\assetid.mo, (C:\Test\MicroStation\mdl\MDLassetID\assetid.mc) ==]
C:\Bentley\Program\Microstation\mdl\bin\mcomp @C:\Bentley\Program\MicroStation\mdl\objects\make.opt
MicroStation Development Language Compiler 08.05.02
C:\Bentley\Program\MicroStation\mdl\include.mc: can't open
No such file or directory
BMAKE: call trace
    line:   51, C:\Test\MicroStation\mdl\MDLassetID\AssetID.mke

I really have no idea where this include.mc come from.

The make file:

#----------------------------------------------------------------------
#
#   MDL Make File
#
#   Current Revision:
#   $Workfile:   SetDetail.mke  $
#   $Revision:
#
baseDir =      $(_MakeFilePath)
objectDir  = $(baseDir)work/
incDir = $(baseDir)

%ifdef BSI
%include $(MS)/include/publish/mdl.mki
%else
%include $(MS)/mdl/include/mdl.mki
%endif

#----------------------------------------------------------------------
#   Define symbol for files included in our link and resource merge
#----------------------------------------------------------------------

Objs =  $(objectDir)AssetID.mo \
                $(mdlLibs)rdbmslib.dlo \
                $(mdlLibs)ditemlib.dlo \
                $(mdlLibs)mdllib.dlo
       
Rscs = \
    $(objectDir)assetidcmd.rsc \
    $(objectDir)assetid.rsc \
    $(objectDir)assetid.mp

#---------------------------------------------
#       Generate Command Tables
#---------------------------------------------
$(incDir)assetidcmd.h    : $(baseDir)assid_cmd.r

#---------------------------------------------
#       Compile Dialog Resources
#---------------------------------------------
$(objectDir)assetid.rsc: $(baseDir)assetid.r $(incDir)assid_ids.h
#---------------------------------------------
#       Compile Command Resources
#---------------------------------------------
$(objectDir)assetidcmd.rsc: $(baseDir)assid_cmd.r

#---------------------------------------------
#       Compile and link MDL Application
#---------------------------------------------
$(objectDir)assetid.mo:   $(baseDir)assetid.mc $(incDir)assetidcmd.h



$(objectDir)assetid.mp:   $(Objs)
        $(msg)
        >$(objectDir)make.opt
        $(linkOpts)
        -a$@
        $(Objs)
        <
        $(MLinkCmd) @$(objectDir)make.opt
        ~time


#---------------------------------------------
#       Merge Objects into one file
#---------------------------------------------
$(mdlapps)assetid.ma:  $(Rscs)
        $(msg) 
        >$(objectDir)make.opt
        -o$@
        $(Rscs)
        <
        $(RLibCmd) @$(objectDir)make.opt
        ~time

and the setting in the mstndevvars.bat is as follows,

@echo off

echo Visual C++ product directory could not be found.
echo Set nttools to Visual C++ product directory.
echo Set LIB and INCLUDE appropriately.
set nttools=
set LIB=
set INCLUDE=

set MS=C:\Bentley\Program\MicroStation
set BMAKE_OPT=-I%MS%\mdl\include -I%MS%\jmdl\include
set PATH=;%MS%;%MS%\mdl\bin;%MS%\jmdl\bin;%PATH%
set CLASSPATH=.;%MS%\jmdl\lib\rt.jar;%MS%\jmdl\lib\jmdlsdk.jar;%MS%\jmdl\lib\swingall.jar;%MS%\jmdl\lib\bentley.jar;%MS%\jmdl;%CLASSPATH%
set MLINK_STDLIB=%MS%\mdl\library\builtin.dlo %MS%\mdl\library\dgnfileio.dlo %MS%\mdl\library\toolsubs.dlo

C:
cd \Bentley\Program\MicroStation

 

And my Environment Variables:

BMAKE_OPT

-IC:\Bentley\Program\MicroStation\MDL\include -IC:\Bentley\Program\MicroStation\MDL\include\stdlib

MDL_COMP

C:\Bentley\Program\MicroStation\mdl\include

MLINK_STDLIB

C:\Bentley\Program\MicroStation\mdl\library\builtin.dlo;C:\Bentley\Program\MicroStation\mdl\library\dgnfileio.dlo;C:\Bentley\Program\MicroStation\mdl\library\toolsubs.dlo

MS

C:\Bentley\Program\Microstation

 

MSMDE

C:\Bentley\Program\Microstation\

 

Parents
  • By the way, I am using Windows Vista Business as the platform. I couldn't install the Microstation V8 2004 under the directory of C:\Program Files since it always shows error in finding the location of rcomp command. I found it doesn't allow space in the directory.

    I tried to compile the same mdl project under the V8i version, still got the same error message:

    C:\Bentley\Program\MicroStation\mdl\include.mc: can't open

  • Hi deeko,

    did you start the compilation from MicroStation Developer Shell or from a plain DOC command prompt?

    The compilation is not only about the variables you mentioned, it is pretty complex process, and the Developer Shell will set everything (nearly :-) for you automatically.

     Jan

  • Thank you for you quick reply. I did start the compilation from the Microstation Development Shell. To me, it seems it did nothing except running the mstndevvars.bat (it was automatically generated when I installed the Microstation). 

  • Yes, you are right, Developer Shell is not a magic, but set everything as required, so it is good base point where you can start. It is not generated when MicroStation is installed, but when MicroStation SDK is installed (to be precise, but  ;-)

    To be sure everything is fine you can try to compile some from the SDK examples, that were installed into your Documents directory. Start the Deveveloper Shell with administrators right, go to e.g. ..\basic SDK directory and type bmake basic (or bmake -dDLM_NO_SIGN basic if signature error appears).

    The basic example should be compiled without an error message and it will help to decide if the compilation process is running fine. In such case your problem is probably in the application bmake file.

    HTH Jan

  • I tried the basic project, same error happend. Is it because I am using Windows Vista? My colleague is using Windows XP and he has no such problem.

     

    Visual C++ product directory could not be found.
    Set nttools to Visual C++ product directory.
    Set LIB and INCLUDE appropriately.

    C:\Bentley\Program\MicroStation>cd mdl\examples\basic

    C:\Bentley\Program\MicroStation\mdl\examples\basic>bmake basic
    Bentley Systems Make Utility. Version 08.11.00.06, Sep  5 2007
    Mon Apr 11 16:01:19 2011

    ~mkdir C:\Bentley\Program\MicroStation\mdl\objects

    ~mkdir C:\Bentley\Program\MicroStation\mdl\rscobj

    ~mkdir C:\Bentley\Program\MicroStation\mdl\reqdobjs

    [== Building C:\Bentley\Program\MicroStation\mdl\objects\basiccmd.h, (C:\Bentley\Program\MicroStation\mdl\examples\basic
    \basiccmd.r) ==]
    C:\Bentley\Program\Microstation\mdl\bin\rcomp @C:\Bentley\Program\MicroStation\mdl\objects\make.opt
    MicroStation Resource Compiler 08.05.02
       Generating header file (C:\Bentley\Program\MicroStation\mdl\objects\basiccmd.h) ... done.

    [== Building C:\Bentley\Program\MicroStation\mdl\objects\basictyp.r, (C:\Bentley\Program\MicroStation\mdl\examples\basic
    \basictyp.mt) ==]
    C:\Bentley\Program\Microstation\mdl\bin\rsctype @C:\Bentley\Program\MicroStation\mdl\objects\make.opt
    MicroStation Type Resource File Generator 08.05.02
    C:\Bentley\Program\MicroStation\mdl\include.mt: can't open
    No such file or directory
    BMAKE: call trace
        line:   64, C:\Bentley\Program\MicroStation\mdl\examples\basic\basic.mke
    Mon Apr 11 16:01:19 2011, elapsed time: 0:00

    C:\Bentley\Program\MicroStation\mdl\examples\basic>

Reply
  • I tried the basic project, same error happend. Is it because I am using Windows Vista? My colleague is using Windows XP and he has no such problem.

     

    Visual C++ product directory could not be found.
    Set nttools to Visual C++ product directory.
    Set LIB and INCLUDE appropriately.

    C:\Bentley\Program\MicroStation>cd mdl\examples\basic

    C:\Bentley\Program\MicroStation\mdl\examples\basic>bmake basic
    Bentley Systems Make Utility. Version 08.11.00.06, Sep  5 2007
    Mon Apr 11 16:01:19 2011

    ~mkdir C:\Bentley\Program\MicroStation\mdl\objects

    ~mkdir C:\Bentley\Program\MicroStation\mdl\rscobj

    ~mkdir C:\Bentley\Program\MicroStation\mdl\reqdobjs

    [== Building C:\Bentley\Program\MicroStation\mdl\objects\basiccmd.h, (C:\Bentley\Program\MicroStation\mdl\examples\basic
    \basiccmd.r) ==]
    C:\Bentley\Program\Microstation\mdl\bin\rcomp @C:\Bentley\Program\MicroStation\mdl\objects\make.opt
    MicroStation Resource Compiler 08.05.02
       Generating header file (C:\Bentley\Program\MicroStation\mdl\objects\basiccmd.h) ... done.

    [== Building C:\Bentley\Program\MicroStation\mdl\objects\basictyp.r, (C:\Bentley\Program\MicroStation\mdl\examples\basic
    \basictyp.mt) ==]
    C:\Bentley\Program\Microstation\mdl\bin\rsctype @C:\Bentley\Program\MicroStation\mdl\objects\make.opt
    MicroStation Type Resource File Generator 08.05.02
    C:\Bentley\Program\MicroStation\mdl\include.mt: can't open
    No such file or directory
    BMAKE: call trace
        line:   64, C:\Bentley\Program\MicroStation\mdl\examples\basic\basic.mke
    Mon Apr 11 16:01:19 2011, elapsed time: 0:00

    C:\Bentley\Program\MicroStation\mdl\examples\basic>

Children