Compilation errors

I'm trying to compile some pure mdl projects, and I have followed the directions I found in this forum ("MicroStation MDL Development Environment"). It did work for a few days, but then something happened. First I got problems creating directories, or rather checking if they existed - if the line in my mki file read

$(BOLIS_OBJ)/$(tstdir) : $(BOLIS_OBJ)/$(tstdir)

I would get a message that no program was associated with that. I commented out those lines, knowing all the directories already existed. I got rid of that particular problem but I got no further than to mcomp where I got messages about include files that could not be opened. I give one example below.

C:\BentleyV8i\MicroStation\mdl\include\mselems.h(15) : error: can't open #include file -iC:\BentleyV8i\MicroStation\mdl\include\shareids\math.h, Invalid argument errno = 22

I can't understand why I suddenly get this problem when it worked before - what setting could I have changed? I can't even remember making any changes... And why is it looking for math.h in the shareids directory? And why doesn't the check of existing directories work anymore?

 Does anybody know or have a good guess at what might have happened? I would be very grateful for any suggestions because right now I'm completely stuck!

Lena

Parents
  • Did anything change on your system (e.g. new group policies, Windows update, etc.)? Does the same thing happen if you compile the delivered examples? How are you compiling your application (IOW, what is the command line that you are using)? Are you using the MicroStation Developer Shell?

      

  • Unfortunately I don't know if anything changed on my system from when I could compile V8i and when I couldn't any longer. It might have, there seems to be lots of updates coming all the time...

    I haven't found any delivered examples, so I haven't been able to try them... where are they? I have installed sdk 08110517, but there were no examples there, as far as I can see. I would be very interested in trying them!

     I'm using our own version of mstndevvars.bat which includes those compiler options needed to compile pure mdl, as well as defining some other variables we use and also running bmake on all files in the current directory with the extension mk8i. I have double checked it today and copied some lines from the original again but with no improvement. There is one more difference though - I'm not changing the directory to %msmde% as in mstndevvars since I'm compiling every mk8i file in the current directory and the variables we are using are all based on the compilation taking place in the base directory of the program being compiled. But that part hasn't changed since the days I could compile for V8i.

    In our make files I have included  mdl.mki as well as our own mki. Our own mki-file is defining a few variables, such as the appDir depending on the category of the program, where to find some include files of ours, defining the default language to swedish etc. I had to make some changes in this file to make the compilation work for V8i in the beginning, but I haven't made any changes from when it worked to when it stopped working. The directory checks I was writing about takes place in this mki file, so whatever has gone wrong I think have done that before this point - the first half of our mki file.

    There are a few definitions at the top of our mki file added by a collegue of mine eons ago. I don't know why they are there so I have tried to remove them just to see if something changes. It does, slightly. I still get a problem with the directory check, but the error messages when removing these changes a little - there is no directory mentioned, just "can't open #include file mdl.h" for example.The lines I commented out were definitions of mdlLibs, publishInc, publichIdsInc, stdlibInc, mdlLibs and rscdir. But still, it's not working!

     

    Lena

    /Lena A

Reply
  • Unfortunately I don't know if anything changed on my system from when I could compile V8i and when I couldn't any longer. It might have, there seems to be lots of updates coming all the time...

    I haven't found any delivered examples, so I haven't been able to try them... where are they? I have installed sdk 08110517, but there were no examples there, as far as I can see. I would be very interested in trying them!

     I'm using our own version of mstndevvars.bat which includes those compiler options needed to compile pure mdl, as well as defining some other variables we use and also running bmake on all files in the current directory with the extension mk8i. I have double checked it today and copied some lines from the original again but with no improvement. There is one more difference though - I'm not changing the directory to %msmde% as in mstndevvars since I'm compiling every mk8i file in the current directory and the variables we are using are all based on the compilation taking place in the base directory of the program being compiled. But that part hasn't changed since the days I could compile for V8i.

    In our make files I have included  mdl.mki as well as our own mki. Our own mki-file is defining a few variables, such as the appDir depending on the category of the program, where to find some include files of ours, defining the default language to swedish etc. I had to make some changes in this file to make the compilation work for V8i in the beginning, but I haven't made any changes from when it worked to when it stopped working. The directory checks I was writing about takes place in this mki file, so whatever has gone wrong I think have done that before this point - the first half of our mki file.

    There are a few definitions at the top of our mki file added by a collegue of mine eons ago. I don't know why they are there so I have tried to remove them just to see if something changes. It does, slightly. I still get a problem with the directory check, but the error messages when removing these changes a little - there is no directory mentioned, just "can't open #include file mdl.h" for example.The lines I commented out were definitions of mdlLibs, publishInc, publichIdsInc, stdlibInc, mdlLibs and rscdir. But still, it's not working!

     

    Lena

    /Lena A

Children
  • The examples by default will be installed to C:\Documents and Settings\"Current User"\My Documents\MDLProjects\

      

  • ah! Thats why I haven't found them. I never use "My Documents"... (everything is on the servers)

     

    /Lena A

  • Previous to v08.11.07..., you can change where those go by clicking on the Advanced button in the EULA pane of the installer. This is more obvious in v08.11.07 (currently a Release Candidate).

      

  • I'm probably not doing this right because I can't compile any examples.

     I'm running the mstndevvars.bat first, and then

    bmake -dNO_COMPILERS_MKI -dBUILD_USING_NoToolset   <path\makefile>

    I get the message  "can't open include file mdl.mki"

     

    Have I missed anything?

    Lena

    /Lena A

  • Lena:
    I get the message "can't open include file mdl.mki"

    Did you install the SDK to its default location? Is that file in folder \MicroStation\mdl\include?

    In the Windows command window where you have run mstndevvars.bat, what are the values of environment variables MS and MSMDE?

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions

  • mdl.mki is in the folder ...\MicroStation\mdl\include

    MS is pointing to ...\MicroStation\

    MSMDE to ...\MicroStation\mdl\

    /Lena A

  • You mentioned that you were using a "modified" version of mstndevvars.bat. If the case, what is BMAKE_OPT set to? Is that where mdl.mki is on your computer? Could you provide the custom mstndevvars.bat that you are using as well as the "target" command line that is being used to start the shell?

      

  • When I tried to compile the example, I used the standard version of mstndevvars.bat. I just found the mistake I made, I had typed the wrong path to the SDK in the command line (just happened to add \mdl). So now it works to compile the examples... Now I just have to find out what my problem is with my files...

    Our modified version of mstndevvars.bat has similar settings as mstndevvars.bat (except that I don't need to type in the paths in the command line so I've got rid of a potential error there...). The differences are the addition of some of our own variables, no change in the active directory, and the command line for running bmake for all make-files in the active directory with -dNO_COMPILERS_MKI -dBUILD_USING_NoToolset added to the command line.  It is quite short:

    set MS=C:\BentleyV8i\MicroStation\
    set mdltools=%MS%
    set MSMDE=%MS%
    set toolspath=%mdltools%mdl\bin\
    set BMAKE_OPT=-I%MS%MDL\include
    set PATH=%MS%\mdl\bin;%MS%\mdl\library;%MS%;%MS%\jmdl\bin;%PATH%
    set MLINK_STDLIB=%MS%mdl\library\builtin.dlo %MS%mdl\library\BentleyDgn.dlo %MS%mdl\library\toolsubs.dlo
    set BOLIS_SRC=c:\KALLKOD\mdl\bolis8i
    set BOLIS_LIB=c:\kallkod\mdl\bolislib
    set BOLIS_APPL=c:\kallkod\mdl\mdlapps
    set gensrc=%BOLIS_APPL%\
    if not exist \objects. mkdir \objects
    for %%f in ( *.mk8i ) do %MS%mdl\bin\bmake.exe -dNO_COMPILERS_MKI -dBUILD_USING_NoToolset %%f

     

    I still get the message "can't open #include file mdl.h" etc. when compiling. It's when running mcomp

    C:\BentleyV8i\MicroStation\mdl\bin\mcomp @make.opt

    and make.opt is

    -c
    -o.\OBJECTS\MS8i\english\bolmenu.mo
    -iC:\BentleyV8i\MicroStation\mdl\include
    -i
    -iC:\BentleyV8i\MicroStation\mdl\include\shareids
    -iC:\BentleyV8i\MicroStation\mdl\include\stdlib
    -ic:\kallkod\mdl\mdlapps
    -i.\ -ienglish\ -ic:\KALLKOD\mdl\bolis8i\include\
    -Wa -Iz
    .\bolmenu.mc

    Any ideas of where to look next?

    /Lena

    /Lena A

  • Lena, Are you doing a cincapnd include or modifying the include path somewhere in your make file? The -i with a blank after is causing the problem. I would also suspect an environment var is not set looking at the -i.\ then -ienglish in here. Since you are building the examples can you post your make file for us? thanks, mark anderson [Bentley]
  • Lena:
    
    set MS=C:\BentleyV8i\MicroStation\
    set PATH=%MS%\mdl\bin;%MS%\mdl\library;%MS%;%MS%\jmdl\bin;%PATH%
    
    

    Be careful with folder terminator slashes. Your definitions expand to:

    
    MS=C:\BentleyV8i\MicroStation\
    set PATH=C:\BentleyV8i\MicroStation\\mdl\bin;C:\BentleyV8i\MicroStation\\mdl\library;C:\BentleyV8i\MicroStation\;C:\BentleyV8i\MicroStation\\jmdl\bin;%PATH%
    
    

    There are several double terminators in the above line. They may cause problems.

    Lena:
    
    set BOLIS_SRC=c:\KALLKOD\mdl\bolis8i
    set BOLIS_LIB=c:\kallkod\mdl\bolislib
    set BOLIS_APPL=c:\kallkod\mdl\mdlapps
    set gensrc=%BOLIS_APPL%\
    
    

    Be consistent with folder terminator slashes. Your MDL paths are terminated, but your own paths are not. Confusion will follow.

    Regards, Jon Summers
    LA Solutions

     
    Regards, Jon Summers
    LA Solutions