马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
下面是一个生成二维视图的 c文件,编译时没错,链接时出现如下错误,请各位大侠帮忙,先谢了!
Linking...
DrawingFromTmpltCreate.obj : error LNK2001: unresolved external symbol _ProUtilWstrcpy
Debug/MouldCAD.dll : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
MouldCAD.dll - 2 error(s), 3 warning(s)
//UserDrawingCreateDemo.c
#include <roToolkit.h>
#include <roDrawing.h>
#include <roMdl.h>
#include <TestError.h>
#include "UtilString.h"
#include "roWstring.h"
#include "roUtil.h"
#include "DrawingFromTmpltCreate.h"
#define TEMPLATE_NAME "c_drawing"
/*==================================================================*\
FUNCTION: UserDrawingCreateDemo()
PURPOSE: Creates a drawing for the current model.
\*==================================================================*/
int UsrDrawingCreateDemo()
{
 roError err;
 roMdl solid_mdl;
 roMdlType mdl_type;
 roMdldata data;
 roModel model;
// ProFileName msgfil;
ProName predefined_template;
ProName name;
ProDrawing created_drawing;
ProDwgcreateOptions options = (ProDwgcreateOptions)0;
ProDwgcreateErrs errors;
created_drawing = NULL;
/*------------------------------------------------------------------*\
Set up the name of the message file.
\*------------------------------------------------------------------*/
//ProStringToWstring (msgfil, "msg_ugdrawing.txt");
/*------------------------------------------------------------------*\
Use the current model to create the drawing.
\*------------------------------------------------------------------*/
err = ProMdlCurrentGet ([$solid_mdl)]
if (err != PRO_TK_NO_ERROR)
return (err);
err = ProMdlTypeGet (solid_mdl, [$mdl_type)]
if (err != PRO_TK_NO_ERROR ||
(mdl_type != PRO_MDL_PART && mdl_type != PRO_MDL_ASSEMBLY))
return PRO_TK_INVALID_TYPE;
err = ProMdlDataGet (solid_mdl, [$data)]
ProUtilWstrcpy(model.name,data.name);
ProUtilWstrcpy (model.type,data.type);
/*------------------------------------------------------------------*\
Initialize the template name.
\*------------------------------------------------------------------*/
ProStringToWstring (predefined_template, TEMPLATE_NAME);
/*------------------------------------------------------------------*\
Read in the root of the new name of the drawings to create.
\*------------------------------------------------------------------*/
// err = ProMessageDisplay (msgfil, "USER Enter new drawing name: ");
err = ProMessageStringRead (PRO_NAME_SIZE, name);
if (err != PRO_TK_NO_ERROR)
return (err);
/*------------------------------------------------------------------*\
Create the required drawing.
\*------------------------------------------------------------------*/
err = ProDrawingFromTmpltCreate (name, predefined_template,
&model, options, &created_drawing,
[$errors)]
if (err != PRO_TK_NO_ERROR || err != PRO_TK_DWGCREATE_ERRORS)
return err;
//if (err == PRO_TK_DWGCREATE_ERRORS)
// {
//ProMessageDisplay (msgfil,"USER Errors found when creating drawing %w", name);
// }
return (PRO_TK_NO_ERROR);
} |