Hi All,
I'm using CONNECT EDITION SDK 10.14.00.111.
It seems to me, that rcomp.exe does not define the "mdl_resource_compiler" macro.
In a struct that is used by one of my .r files I use the DPoint3d type.
It is defined in GeomApi.r.h. I include this header.
However it contains the DPoint3d type definition only if mdl_resource_compiler is already defined.
Should I define it myself? How should I instruct the rcomp resource compiler to define this macro?
---------------------------
Here is my make file:
PolicyFile = MicroStationPolicy.mki DEFAULT_TARGET_PROCESSOR_ARCHITECTURE = x64 MDLMKI = $(MSMDE)mki/ %include $(MDLMKI)mdl.mki %include $(MDLMKI)cincapnd.mki modul = nyomtatas baseDir = $(_MakeFilePath) %if debug appsDir = $(baseDir)Debug/ %else appsDir = $(baseDir)Release/ %endif o = $(appsDir) language = hun #--------------------------------------------- # Generate command table include & resource file using rcomp #--------------------------------------------- $(BaseDir)$(modul)_cmd.h : $(BaseDir)$(modul)_cmd.r $(appsDir)$(modul)_cmd.rsc : $(BaseDir)$(modul)_cmd.r $(appsDir)$(modul)_typ.r : $(BaseDir)$(modul).mt $(BaseDir)$(modul)_tool.lh $(appsDir)$(modul)_typ.rsc : $(appsDir)$(modul)_typ.r $(BaseDir)$(modul)_tool.lh #--------------------------------------------- # Merge the command resources & MDL program file using rlib #--------------------------------------------- myRscs = $(appsDir)$(modul)_cmd.rsc \ $(appsDir)$(modul)_typ.rsc $(appsDir)$(modul).mi : $(myRscs) $(msg) > $(appsDir)make.opt -o$@ $(myRscs) < $(RLibCmd) @$(appsDir)make.opt ~time $(appsDir)$(modul)_msg.rsc : $(langSpec)$(modul)_msg.r $(baseDir)$(modul)_id.lh $(langSpec)$(modul)_txt.lh $(appsDir)$(modul).rsc : $(baseDir)$(modul).r $(baseDir)$(modul)_id.lh $(langSpec)$(modul)_txt.lh $(BaseDir)$(modul)_cmd.h myfRscs = $(appsDir)$(modul).mi \ $(appsDir)$(modul)_msg.rsc \ $(appsDir)$(modul).rsc $(appsDir)$(modul).ma : $(myfRscs) $(msg) > $(appsDir)make.opt -o$@ $(myfRscs) < $(RLibCmd) @$(appsDir)make.opt ~time
---------------------------------------
Here is my header that contains the struct:
#include <Mstn\MicroStation.r.h> #include <Geom\GeomApi.r.h> //---- Include Files --------------------------------------------------- //---- Type definitions ------------------------------------------------ typedef struct beallitasUI { WChar nyomtato [256]; WChar papir [256]; int tbKeret; /* 0,1 */ int obKeret; WChar fnKeret [256]; int szin; long ma; /* meretarany 1:ma */ long cbMa; /* meretarany combo */ int tbLapra; /* lapraigazítás */ int Keret_valid; /* volt e keret a dgn-ben */ double Keret_kulso_x; /* kulso meret sub unit[mm] */ double Keret_kulso_y; /* level 60 type shape */ double Keret_belso_x; /* belso meret sub unit[mm] */ double Keret_belso_y; /* level 61 type shape */ Dpoint3d Keret_kulso[4]; /* kulso keret UOR */ Dpoint3d Keret_belso[4]; /* belso keret UOR */ /* ................................................................ */ /* ................................................................ */ double size_x; /* [mm] */ double size_y; /* [mm] */ /* ................................................................ */ /* ................. PLOTDGN User Interface ....................... */ WChar PaperName [50]; /* plotUI.ui - */ WChar PlotUnitsLabel [50]; /* plotUI.ui - */ WChar PaperDimStr [128]; /* plotUI.ui - */ double FormSizeX,FormSizeY; /* plotUI.ui - paper size */ int NumCopiesToPrint; /* plotUI.ui - */ int PlotArea; /* plotUI.ui - 0 - View 1 - Fit Master 2 - Fit All 3 - Fence 4 - Sheet */ int PlotViewNum; /* plotUI.ui - 0 - 7 */ int ColorMode; /* plotUI.ui - 0 - COLOR 1 - GRAYSCALE 2 - MONOCHROME */ int PlotDriverType; /* plotUI.ui - 0 - Windows 1 - Bentley */ int Orientation; /* plotUI.ui - 0 - Portrait 1 - Landscape */ int Rotate90; /* plotUI.ui - 2 - NOROT 1 - 90CW 0 - 90CCW */ int Fullsheet; /* plotUI.ui - 0 - OFF 1 - ON */ /* Geometria */ int Rasterized; /* plotUI.ui - 0 - OFF 1 - ON */ /* ................................................................ */ /* ................................................................ */ int valid; /* 0,1 */ } BEALLITASUI; /* .................................................................................... */ typedef struct pageUI { WChar page[100]; int orient; } PAGEUI;
Hi All!
I managed to solve the problem. I changed the nyomtatas_tool.lh file the following way.
#ifndef __nyomtatas_tool_lh__ #define __nyomtatas_tool_lh__ #include <Mstn\MicroStation.r.h> #include <Geom\GeomApi.r.h> //---- Include Files --------------------------------------------------- //---- Type definitions ------------------------------------------------ typedef struct beallitasUI { WChar nyomtato [256]; WChar papir [256]; int tbKeret; /* 0,1 */ int obKeret; WChar fnKeret [256]; int szin; long ma; /* meretarany 1:ma */ long cbMa; /* meretarany combo */ int tbLapra; /* lapraigazítás */ int Keret_valid; /* volt e keret a dgn-ben */ double Keret_kulso_x; /* kulso meret sub unit[mm] */ double Keret_kulso_y; /* level 60 type shape */ double Keret_belso_x; /* belso meret sub unit[mm] */ double Keret_belso_y; /* level 61 type shape */ #if defined(mdl_resource_compiler) || defined(mdl_type_resource_generator) struct { T_Adouble x, y, z; } Keret_kulso[4]; struct { T_Adouble x, y, z; } Keret_belso[4]; #else Dpoint3d Keret_kulso[4]; /* kulso keret UOR */ Dpoint3d Keret_belso[4]; /* belso keret UOR */ #endif /* ................................................................ */ /* ................................................................ */ double size_x; /* [mm] */ double size_y; /* [mm] */ /* ................................................................ */ /* ................. PLOTDGN User Interface ....................... */ WChar PaperName [50]; /* plotUI.ui - */ WChar PlotUnitsLabel [50]; /* plotUI.ui - */ WChar PaperDimStr [128]; /* plotUI.ui - */ double FormSizeX,FormSizeY; /* plotUI.ui - paper size */ int NumCopiesToPrint; /* plotUI.ui - */ int PlotArea; /* plotUI.ui - 0 - View 1 - Fit Master 2 - Fit All 3 - Fence 4 - Sheet */ int PlotViewNum; /* plotUI.ui - 0 - 7 */ int ColorMode; /* plotUI.ui - 0 - COLOR 1 - GRAYSCALE 2 - MONOCHROME */ int PlotDriverType; /* plotUI.ui - 0 - Windows 1 - Bentley */ int Orientation; /* plotUI.ui - 0 - Portrait 1 - Landscape */ int Rotate90; /* plotUI.ui - 2 - NOROT 1 - 90CW 0 - 90CCW */ int Fullsheet; /* plotUI.ui - 0 - OFF 1 - ON */ /* Geometria */ int Rasterized; /* plotUI.ui - 0 - OFF 1 - ON */ /* ................................................................ */ /* ................................................................ */ int valid; /* 0,1 */ } BEALLITASUI; /* .................................................................................... */ typedef struct pageUI { WChar page[100]; int orient; } PAGEUI; /*--------------------------------------------------------------------------------------*/ /*--------------------------------------------------------------------------------------*/ #endif
Now it compiles. It seems to me that the resource generator had a problem with the "typedef" keyword in GeomAPI.r.h (line 16.).
That is defining DPoint3d type this way:
typedef struct {T_Adouble x,y,z;} DPoint3d;
Br,
Miklos
Answer Verified By: Miklos Bodi