Hello guys,
I recently installed the latest CONNECT SDK platform and also Microsoft Visual Studio 2015.
I am in the process of migrating several of our MDL applications. I tested and built some of the SDK sample applications. All runs as anticipated.
At this point I am attempting to build one of our own MDL applications. The bmake command runs as expected but fails when compiling the MT
resource file. Here are the contents of my MT file:
#include <Mstn\MicroStation.r.h> #include "tables.h" /* for resource */ #pragma packedLittleEndianData createDataDef ( tables, RSCID_TABLES_PREFS ); publishStructures ( tables ); publishStructures ( levelIDD );
The MT file uses the header file tables.h:
#if !defined( __tablesH__ ) #define __tablesH__ // include files #include <Mstn\MicroStation.r.h> #include <Mstn\MdlApi\mdl.h> /* local defines */ #define BIGGAP - 1 #define TOOMANY - 2 #define PROCESSING 100 #define NORMAL 101 #define GRADE 102 #define SUBASE 103 #define GROUND 104 #define PAUSING 105 #define ERRORCHECK 106 #define USERFILE 107 #define APPFILE 108 #define MAXVERTICES 500 #define STATUS_ON 1 #define STATUS_OFF 0 #define ERROR_LINE - 200 #define NO_ELEMENTS - 300 /* resource defs */ #define RTYPE_TABLES_CLASS 'tmpP' #define RSCID_TABLES_PREFS 1 #define PORTRSCID_tables 1 /* dialog ids */ #define DIALOGBOXID_tables 21 #define DIALOGBOXID_tablesGradeLevels 22 #define DIALOGBOXID_tablesSubaseLevels 23 #define DIALOGBOXID_tablesGroundLevels 24 #define DIALOGBOXID_tablesGradeSettings 25 #define DIALOGBOXID_tablesTableScale 26 #define DIALOGBOXID_tablesSubaseSettings 27 #define DIALOGBOXID_tablesErrorSettings 28 #define DIALOGBOXID_tablesGroundSettings 29 #define DIALOGBOXID_tablesXSSettings 30 #define DIALOGBOXID_tablesTitleSettings 31 #define DIALOGBOXID_tablesCenterSettings 32 #define DIALOGBOXID_tablesProcessSettings 33 #define DIALOGBOXID_tablesLimitsSettings 34 #define DIALOGBOXID_tablesTextSettings 35 #define DIALOGBOXID_tablesGradeScanSettings 36 #define DIALOGBOXID_tablesMultiLevels 37 #define DIALOGBOXID_tablesSubaseScanSettings 38 /* hook functions */ #define HOOKBUTTONSID_tables 23 #define HOOKDIALOGID_tables 20 #define HOOKTOGGLEID_tables 24 #define HOOKLISTBOXID_scanGradeText 25 #define HOOKCOMBOID_levels 27 #define HOOKLISTBOXID_levels 28 #define HOOKTOGGLEID_weedGroundText 29 #define HOOKLISTBOXID_scanSubText 30 /* command numbers */ #define CMD_CREATE_TABLES 0x0e000000 #define CMD_SELECT_TABLE_SCALE 0x0e000001 #define CMD_SELECT_GRADE_SETTINGS 0x0e000002 #define CMD_SELECT_SUBASE_SETTINGS 0x0e000003 #define CMD_SELECT_GROUND_SETTINGS 0x0e000004 #define CMD_SELECT_ERROR_SETTINGS 0x0e000005 #define CMD_SELECT_XS_SETTINGS 0x0e000006 #define CMD_SELECT_TITLE_SETTINGS 0x0e000007 #define CMD_SELECT_CENTER_SETTINGS 0x0e000008 #define CMD_SELECT_PROCESS_SETTINGS 0x0e000009 #define CMD_SELECT_LIMITS_SETTINGS 0x0e000010 #define CMD_FILE_LOAD_SETTINGS 0x0e000011 #define CMD_FILE_SAVE_SETTINGS 0x0e000012 #define CMD_TEXT_SETTINGS 0x0e000013 #define CMD_GRADE_SCAN_SETTINGS 0x0e000014 #define CMD_GRADE_SCAN_CLEAR_ALL 0x0e000015 #define CMD_GRADE_SCAN_SELECT_ALL 0x0e000016 #define CMD_SCAN_GRADE_XS 0x0e000017 #define CMD_SET_BUTTON_STATE 0x0e000018 #define CMD_SUBASE_SCAN_SETTINGS 0x0e000019 #define CMD_SUBASE_SCAN_CLEAR_ALL 0x0e000020 #define CMD_SUBASE_SCAN_SELECT_ALL 0x0e000021 #define CMD_SCAN_SUB_XS 0x0e000022 #define CMD_SELECT_SUB_PVM_TEXT 0x0e000023 #define CMD_SELECT_GRADE_PVM_TEXT 0x0e000024 #define CMD_TABLES_OPEN_GRADE_LIST 0x0e000025 #define CMD_TABLES_SAVE_GRADE_LIST 0x0e000026 #define CMD_TABLES_OPEN_SUB_LIST 0x0e000027 #define CMD_TABLES_SAVE_SUB_LIST 0x0e000028 #define CMD_TABLES_SAVE_CS_OUT 0x0e000029 /*----------------------------------------------------------------------+ | local structures | +----------------------------------------------------------------------*/ typedef struct { double xLeft; double yLeft; double xRight; double yRight; DPoint3d lowerLeft; DPoint3d upperRight; double baseElev; double baseY; float station; ULong fileOffset; double xsmaxy; double xsminy; short ggroup; DPoint3d center; } XSCELL; typedef struct { char pvmName[10]; int status; } PVM; typedef struct { DPoint3d verts[2]; int vertical; } LINEBOX; typedef struct { DPoint3d origin; } TEXTBOX; typedef struct { DPoint3d vertex; double offset; } TABLELINE; // multi levels typedef struct mlevels { UInt32 count; UInt32 code[10000]; } MLEVELS; typedef struct tables { /* main tables dialog */ short gradeLevels[4]; short groundLevels[4]; short subaseLevels[4]; double tolerance; BoolInt doGround; BoolInt doSubase; BoolInt doGrade; /* scale dialog */ int tablePlotScale; /* grade table settings */ UInt32 gradeTableLevelCode; int gradeTableColor; int gradeTableWeight; UInt32 gradeTextLevelCode; int gradeTextColor; int gradeTextWeight; float gradeTableOffset; int gradeTextFont; float gradeTextHeight; float gradeTextWidth; float gradeTextStackOffset; float gradeTextHorzOffset; float gradeTextVertOffset; float gradeTableTickSize; /* subase table settings */ UInt32 subaseTableLevelCode; int subaseTableColor; int subaseTableWeight; UInt32 subaseTextLevelCode; int subaseTextColor; int subaseTextWeight; float subaseTableOffset; int subaseTextFont; float subaseTextHeight; float subaseTextWidth; float subaseTextStackOffset; float subaseTextHorzOffset; float subaseTextVertOffset; float subaseTableTickSize; int doSubaseLimits; /* ground table settings */ UInt32 groundTableLevelCode; int groundTableColor; int groundTableWeight; UInt32 groundTextLevelCode; int groundTextColor; int groundTextWeight; float groundTableOffset; float groundTableWidth; int groundTextFont; float groundTextHeight; float groundTextWidth; float groundTextOffset; /* error display */ float errRadius; UInt32 errLevelCode; int errColor; int errWeight; int errStyle; /* xs settings */ int xsSpacingX; /* titles settings */ int statTextFont; float statTextHeight; float statTextWidth; float statTextHorzOffset; float statTextVertOffset; int projTextFont; float projTextHeight; float projTextWidth; float projTextHorzOffset; float projTextVertOffset; char projName[50]; int numTextFont; float numTextHeight; float numTextWidth; float numTextHorzOffset; float numTextVertOffset; /* centerline settings */ UInt32 cenLevelCode; int cenColor; int cenWeight; int cenStyle; char cenCellName[10]; /* process settings */ BoolInt doErrorCheck; BoolInt doSectionPause; /* limits of settings */ UInt32 limLevelCode; int limColor; int limWeight; int limStyle; int limTextFont; float limTextHeight; float limTextWidth; float limTextHorzOffset; float limTextVertOffset; char limrname[10]; char limlname[10]; /* cell library */ char cellLibName[128]; /* other options */ BoolInt doProjectName; BoolInt doStationName; BoolInt doStationNumber; int xsSpacingY; // for text scan settings UInt32 textScanLevelCode; int textScanColor; BoolInt doConnectingLines; // new levels settings MLEVELS gndLevels; MLEVELS subLevels; MLEVELS grdLevels; // station suffix char numTextSuffix[10]; // for weeder BoolInt weedGroundText; float weedGroundDelta; } Tables; typedef struct levelIDD { UInt32 gradeTableLevel; UInt32 gradeTextLevel; UInt32 subaseTableLevel; UInt32 subaseTextLevel; UInt32 groundTableLevel; UInt32 groundTextLevel; UInt32 errLevel; UInt32 cenLevel; UInt32 limLevel; UInt32 textScanLevel; } LevelIDD; /* resource definition */ #if defined( resource ) resourceclass Tables RTYPE_TABLES_CLASS; #endif #endif /* !defined (__tablesH__) */
And lastly here are the contents of my MKE file:
#-------------------------------------------------- # Define constants specific to this example #-------------------------------------------------- PolicyFile = MicroStationPolicy.mki DEFAULT_TARGET_PROCESSOR_ARCHITECTURE=x64 MDLMKI = $(MSMDE)mki/ mdlLibs = $(MSMDE)library/ dirToSearch = $(MDLMKI) genSrc = $(o) %include $(MDLMKI)mdl.mki %include $(MDLMKI)cincapnd.mki #-------------------------------------------------- # Define constants specific to this example #-------------------------------------------------- appName = tables sAppName = tables privateInc = $(baseDir) langSpec = $(baseDir)transkit/ #--------------------------------------------- # Define Macros for files include in our link and resource #--------------------------------------------- Objs = $(o)tables.mo \ $(o)tablesdlg.mo \ $(o)multiLevel.mo \ $(o)tablestxt.mo \ $(mdlLibs)ditemlib.dlo Rscs = $(basedir)tablesdlg.rsc \ $(o)tablestyp.rsc \ $(o)tables.mp \ $(o)tablescmd.rsc \ $(o)tablesmsg.rsc \ $(o)subaseSettingsDlg.rsc \ $(o)scanSettingsDlg.rsc \ $(o)limitsSettingsDlg.rsc \ $(o)groundSettingsDlg.rsc \ $(o)gradeSettingsDlg.rsc \ $(o)errorSettingsDlg.rsc \ $(o)multiLevelDlg.rsc \ $(o)clineSettingsDlg.rsc #---------------------------------------------------------------------- # Create needed output directories in case they don't exist #---------------------------------------------------------------------- always: !~@mkdir $(o) !~@mkdir $(rscObjects) !~@mkdir $(reqdObjs) #--------------------------------------------- # Generate Command Tables #--------------------------------------------- $(o)tablescmd.rsc : $(baseDir)tablescmd.r #--------------------------------------------- # dialog resources #--------------------------------------------- $(o)clineSettingsDlg.rsc : $(baseDir)clineSettingsDlg.r $(o)errorSettingsDlg.rsc : $(baseDir)errorSettingsDlg.r $(o)gradeSettingsDlg.rsc : $(baseDir)gradeSettingsDlg.r $(o)groundSettingsDlg.rsc : $(baseDir)groundSettingsDlg.r $(o)limitsSettingsDlg.rsc : $(baseDir)limitsSettingsDlg.r $(o)scanSettingsDlg.rsc : $(baseDir)scanSettingsDlg.r $(o)subaseSettingsDlg.rsc : $(baseDir)subaseSettingsDlg.r $(o)multiLevelDlg.rsc : $(baseDir)multiLevelDlg.r #--------------------------------------------- # prompts and command numbers #--------------------------------------------- $(o)tablesmsg.rsc : $(baseDir)tablesmsg.r $(baseDir)tablesmsg.h #--------------------------------------------- # make resource to publish structures #--------------------------------------------- $(o)tablestyp.r : $(baseDir)tablestyp.mt $(o)tablestyp.rsc : $(o)tablestyp.r #------------------------------------------------ # Set up to use dlmcomp.mki and dlmlink.mki #------------------------------------------------ dlmObjs = \ $(o)$(appName)$(oext) \ $(o)$(sAppName)hook$(oext) DLM_NAME = $(appName) DLM_DEST = $(mdlapps) DLM_OBJECT_FILES = $(dlmObjs) DLM_OBJECT_DEST = $(o) DLM_SPECIAL_LINKOPT = -fixed:no # Notify linker this library does not require a fixed base address to load DLM_NO_DLS = 1 # USE DLLEXPORT IN .CPP DLM_NO_DEF = 1 DLM_NOENTRY = 1 DLM_NO_MANIFEST = 1 # If not set linker embeds your current (developer) patched MSVCRT version manifest in output dll. This is not desirable and produces side-by-side CLIENT ERROR: 14001) DLM_NO_SIGN = 1 # If not set and no certificate found, ERROR: 'singleton' is not recognized as an internal or external command LINKER_LIBRARIES = $(mdlLibs)bentley.lib \ $(mdlLibs)BentleyAllocator.lib \ Advapi32.lib\ $(ntPlatformLib)ws2_32.lib\ $(mdlLibs)RmgrTools.lib\ $(mdlLibs)DgnPlatform.lib\ #---------------------------------------------------------------------- # Compile the source files for the DLM #---------------------------------------------------------------------- $(o)tables$(oext) : $(baseDir)tables.cpp $(baseDir)tables.h $(baseDir)tables.fdf $(o)tablesdlg$(oext) : $(baseDir)tablesdlg.cpp $(basDir)tables.h $(basDir)tables.fdf $(o)tablestxt$(oext) : $(baseDir)tablestxt.cpp $(baseDir)tables.h $(baseDir)tables.fdf $(o)multiLevel$(oext) : $(baseDir)multiLevel.cpp $(baseDir)tables.h $(baseDir)tables.fdf %include $(MDLMKI)dlmlink.mki #--------------------------------------------- # Merge the dialog resources & MDL program file using rlib #--------------------------------------------- $(reqdObjs)$(appName).mi : $(listboxRscs) $(msg)> $(o)make.opt -o$@ $(listboxRscs)< $(RLibCmd) @$(o)make.opt ~time #--------------------------------------------- # Include language specific make steps #--------------------------------------------- %include $(baseDir)$(sAppName)rsc.mki
The BMAKE command produces the following output:
W:\benzi\mdlConnect\tables>bmake Bentley Systems Make Utility. Version 10.00.00.22, May 15 2017 Wed Feb 14 08:42:57 2018 [== Building C:\Users\benzi\AppData\Local\Temp\Bentley\MicroStationSDK\objects\tablestyp.r, (W:\benzi\mdlConnect\tables\tablestyp.mt) ==] rsctype @C:\Users\benzi\AppData\Local\Temp\Bentley\MicroStationSDK\objects\make.opt MicroStation Type Resource File Generator 03.12.02 C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(46) : error: "This file is for C++ compilands only" C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(11) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(12) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(13) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(14) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(16) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(17) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(18) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(19) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(28) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(33) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(39) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(40) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(41) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(43) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/suppress_warnings.h(44) : warning: pragma not recognized. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(70) : warning: macro ENUM_UNDERLYING_TYPE previously defined as . C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(112) : error: can't open #include file limits.h C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(112) : error: No such file or directory C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(239) : error: Data declarations must be typedefs. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(239) : error: expected ;, got BENTLEY_NAMESPACE_NAME C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(239) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(239) : error: Data declarations must be typedefs. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(239) : error: expected ;, got } C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(239) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(239) : error: expected ;, got :: C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(239) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(239) : error: expected ;, got :: C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(239) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(239) : error: Data declarations must be typedefs. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(239) : error: expected ;, got } C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(240) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(240) : error: Data declarations must be typedefs. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(240) : error: expected ;, got } C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(240) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(240) : error: expected ;, got :: C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(240) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(240) : error: expected ;, got :: C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(240) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(240) : error: Data declarations must be typedefs. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(240) : error: expected ;, got } C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(241) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(241) : error: Data declarations must be typedefs. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(241) : error: expected ;, got } C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(241) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(241) : error: expected ;, got :: C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(241) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(241) : error: expected ;, got :: C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(241) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(241) : error: Data declarations must be typedefs. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(241) : error: expected ;, got } C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(242) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(242) : error: Data declarations must be typedefs. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(242) : error: expected ;, got } C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(242) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(242) : error: expected ;, got :: C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(242) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(242) : error: expected ;, got :: C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(242) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(242) : error: Data declarations must be typedefs. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(242) : error: expected ;, got } C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(243) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(243) : error: Data declarations must be typedefs. C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(243) : error: expected ;, got } C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(243) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(243) : error: expected ;, got :: C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(243) : error: bad declaration C:\PROGRA~1\Bentley\MICROS~1\include\Bentley/Bentley.h(243): Exceeded limit for errors. BMAKE: call trace line: 86, W:\benzi\mdlConnect\tables\tables.mke Wed Feb 14 08:42:58 2018, elapsed time: 0:01 W:\benzi\mdlConnect\tables>
I have no idea what is missing or wrong with my MT file. I have tried different code changes with no success.
Any help would be greatly appreciated.
Regards,
Benzi