is there a way to use functions defined as MDLPublic in your mdl code

Status
Not open for further replies.

gert de nul

Usenet Archive
Joined
Jul 20, 2001
Messages
13
Reaction score
0
Hi,

I'm writing mdl code for MS version 8 (guess same for version 7). And I want to call a function

StatusInt mdlMesh_convertToShapes
( MSElementDescr* pMeshDescr , MSElementDescr*
* Descr );

This function is defined in "msmdlmesh.fdf", wich I include as follows :
MdlPublic StatusInt mdlMesh_convertToShapes
(const MSElementDescr
*pMeshDescr,MSElementDescr **ppShapeDescr);

and MdlPublic is defined in "basedefs.h" as
#define MdlPublic

But when I compile I get the following error :
error: using undeclared function mdlMesh_convertToShapes

I suspect that the function is set to Protected instead off Public when I compile, but what is the Phylosofy behind this MdlPublic then.

If I include "msmesh.h" istead of "msmdlmesh.fdf" I get the following error ### C:\BentleyV8\Program\MicroStation\mdl\library\toolsubs.dlo:
Unrecoverable errors detected.
output file not created.

In Version 7 they use also MdlPublic but not that often (see ditemlib.fdf), but never used this one.

Thanks,
Gert.
 
Gert,

msmesh.h will include msmdlmesh.fdf. You need to have
MLINK_STDLIB=%ms%\mdl\library\builtin.lib;%ms%\mdl\library\toolsubs.dlo;%ms% \mdl\library\dgnfileio.lib to compile MDL applications. I recomend using the MicroStation Development Shell that we install with MicroStation. It sets the environment for compiling MDL applications. The batch file that is executed is mstndevvars.bat and can be found in the %ms%\jmdl\bin\ directory. MdlPublic is a keyword that is used in Bentley to try to designate functions that are exposed to MDL and is basicly the same as Public.

HTH,
Mark Anderson

"Gert De Nul" wrote:

Hi,

I'm writing mdl code for MS version 8 (guess same for version 7). And I
want
to call a function

StatusInt mdlMesh_convertToShapes
( MSElementDescr* pMeshDescr ,
MSElementDescr*
* Descr );

This function is defined in "msmdlmesh.fdf", wich I include as follows :
MdlPublic StatusInt mdlMesh_convertToShapes
(const MSElementDescr
*pMeshDescr,MSElementDescr **ppShapeDescr);

and MdlPublic is defined in "basedefs.h" as
#define MdlPublic

But when I compile I get the following error :
error: using undeclared function mdlMesh_convertToShapes ...
error
### C:\BentleyV8\Program\MicroStation\mdl\library\toolsubs.dlo:
Unrecoverable errors detected.
output file not created.

In Version 7 they use also MdlPublic but not that often (see
ditemlib.fdf),
but never used this one.

Thanks,
Gert.
 
Mark,

thanks, I was already using the development shell. But as you suggested there was something wrong with the linking. I just defined in my make file that the code has to be linked with $(mdlLibs)msbspline.dlo. And as you mensioned I needed to include msmesh.h instead of msmdlmesh.fdf.

Thanks for the help.
Gert.

mark anderson wrote:

Gert,

msmesh.h will include msmdlmesh.fdf. You need to have
MLINK_STDLIB=%ms%\mdl\library\builtin.lib;%ms%\mdl\library\toolsubs.dlo;%ms%
\mdl\library\dgnfileio.lib to compile MDL applications. I recomend using the MicroStation Development Shell that we install with MicroStation. It sets the environment for compiling MDL applications. The batch file that
is
executed is mstndevvars.bat and can be found in the %ms%\jmdl\bin\ directory. MdlPublic is a keyword that is used in Bentley to try to designate functions that are exposed to MDL and is basicly the same as Public.

HTH,
Mark Anderson

"Gert De Nul" wrote:
...
I
> compile, but what is the Phylosofy behind this MdlPublic then.
>
> If I include "msmesh.h" istead of "msmdlmesh.fdf" I get the following error
> ### C:\BentleyV8\Program\MicroStation\mdl\library\toolsubs.dlo:
> Unrecoverable errors detected.
> output file not created.
>
>
> In Version 7 they use also MdlPublic but not that often (see ditemlib.fdf),
> but never used this one.
...
 
Status
Not open for further replies.

Latest threads

Back
Top