Error building examples for update 12 SDK

When building C++ examples for the update 12 SDK it fails with the following error:

-MANIFESTFILE:C:\Users\doug\AppData\Local\Temp\Bentley\MicroStationSDK\objects\ModelExample.dll.Manifest
C:\Users\doug\AppData\Local\Temp\Bentley\MicroStationSDK\objects\ModelExample.obj C:\Users\doug\AppData\Local\Temp\Bentley\MicroStationSDK\objects\ModelExampleHelper.obj B:\Apps\Bentley\library\bentley.lib B:\Apps\Bentley\library\BentleyAllocator.lib B:\Apps\Bentley\library\mdlbltin.lib B:\Apps\Bentley\library\RmgrTools.lib B:\Apps\Bentley\library\BentleyGeom.lib B:\Apps\Bentley\library\DgnPlatform.lib B:\Apps\Bentley\library\ECObjects.lib B:\Apps\Bentley\library\dgnview.lib gdi32.lib user32.lib kernel32.lib C:\PROGRA~2\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\lib\x64\msvcrt.lib
B:\Apps\Bentley\library\mdlbltin.lib
LINK : fatal error LNK1181: cannot open input file 'C:\PROGRA~2\Microsoft.obj'
BMAKE: call trace
    line:  414, B:\Apps\Bentley\mki\dlmlink.mki
    line:  106, B:\Apps\Bentley\examples\Model\ModelExample\ModelExample.mke
Mon Nov 04 23:23:11 2019, elapsed time: 0:00

Clearly the space in the path:

C:\PROGRA~2\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\lib\x64\msvcrt.lib

Is causing problems.  I'm guessing it needs to be quoted somewhere, but I have been unable to locate where it is specified.

  • Hi Douglas,

    with the following error:

    Please use Insert > Insert code tool when you share any code, log or other output. To place it as unformatted text makes it more complicated for reading.

    When building C++ examples

    It look like you use quite unusual installation location and not default setup, but it's not the source of the discussed problem.

    I'm guessing it needs to be quoted somewhere, but I have been unable to locate where it is specified.

    You are correct, it's Microsoft linker feature it does not support spaces in path correctly.

    Bmake expects 8.3 naming convention is enabled on used drives. Maybe on you C (system) volume, the 8.3 naming is not enabled? You can search Internet for details, but how to check whether the naming is enabled is e.g. here, how to change it is here.

    I am not sure where exactly the path to the lib is built, it would require to create verbose log (-v switch) and to check how proper mke / mki file is implemented. Bmake works with 8.3 convention, so maybe to enclose the path to quotes, which is alternative to 8.3 naming, is not possible, not sure.

    With regards,

      Jan

  • Hi Douglas,

    I have here a script originally from , to create DOS 8.3 format. 

    This helps us a lot with bmake.

    @ECHO OFF
    ECHO.
    ECHO.
    ECHO ========================================================
    ECHO == Show mangled (DOS 8.3 format) path and file name 
    ECHO == of path provided, 
    ECHO == or current directory if no arg provided
    ECHO ========================================================
    
    
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    :: mangled
    ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
    ECHO.
    ECHO.
    IF /i {%1}=={} (
       CD
       ECHO.
       FOR /f "tokens=*" %%D IN ('cd') DO ECHO %%~sD
    ) else (
       ECHO %1
       ECHO.
       FOR %%A IN (%1) DO ECHO %%~sA
    )
    ECHO.
    ECHO.
    

    Mit freundlichen Grüßen / Best regards
    Volker Hüfner

    |  AB_DATE Engineering  Software   |  ab-date.de  |

  • the space in the path:

    C:\PROGRA~2\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\lib\x64\msvcrt.lib

    Is causing problems.  I'm guessing it needs to be quoted somewhere, but I have been unable to locate where it is specified.

    BMAKE: call trace
        line:  414, B:\Apps\Bentley\mki\dlmlink.mki

    Look in the MDL Include file dlmlink.mki.  It fails at line 414.  Do not even think about editing that file!

    Those of us who have been doing this for a while have accommodated ourselves to bmake's foibles.  For example, you might think about reinstalling Viz Studio to a location without spaces in folder names.

    Maybe on you C (system) volume, the 8.3 naming is not enabled?

    Good point!  But why has Program Files(x86) been converted to PROGRA~2 but Microsoft Visual Studio remains unshortened?

     
    Regards, Jon Summers
    LA Solutions

  • But why has Program Files(x86) been converted to PROGRA~2 but Microsoft Visual Studio remains unshortened?

    That's very good question :-)

    I do not know too much about how 8.3 naming works, but I remember it was mentioned in some discussion that the naming enable/disable does not mean that all names are affected immediately, but they are generated when created. So maybe it's because it was enabled/disabled before/after Visual Studio was installed?

    System administrator should provide first insight how Windows are configured. Also to use fsutil tool can help to obtain more information about used configuration..

    Regards,

      Jan

  • Hi ,

    Can you confirm, zip and provide the following output?

    1. Make sure to open the MicroStation CONNECT SDK Developer Shell (Run as Administrator)
    2. Type:
      1. pushd DialogBoxes\myapp
      2. build verbose
      3. Answer Yes (Y) to - View Log File in Folder? [Y,N]?
    3. Reply with a Zipped attachment of: e.g. Build-myapp-Verbose-Output.txt

    Build verbose will create a single detailed build log (OS environment variables and verbose build log) so we can identify the first point where a configuration issue or error is occurring, hinting on where a possible fix may be needed.

    Thank you in advance,
    Bob