iCAx开思工具箱

标题: 请问下面错误如何解决??? [打印本页]

作者: beibei    时间: 2003-4-3 11:09
标题: 请问下面错误如何解决???
/*----------------------------------------------------------------*\
  Pro/TOOLKIT includes
\*----------------------------------------------------------------*/
#include &ltroToolkit.h>
#include &ltroMdl.h>
#include &ltroFeature.h>
#include &ltroFeatType.h>
#include &ltroUtil.h>
#include &ltroAsmcomp.h>
#include "assembly.h"
#include "roSolid.h"
#include "test1.h"
/*----------------------------------------------------------------*\
  Application includes  
\*----------------------------------------------------------------*/
#include <TestError.h>
/*----------------------------------------------------------------*\
  Global definitions
\*----------------------------------------------------------------*/
#define FILENAME "assembly.lst"
  
typedef struct user_appdata
{
  FILE *fp;
  int   level;
} UserAppdata;
/*----------------------------------------------------------------*\
  Function prototypes  
\*----------------------------------------------------------------*/
int UserAsmCompVisit (void *dummy, int dummy2);
ProError UserAsmCompFilter (ProFeature *feature, ProAppData app_data);
ProError user_action (ProFeature *feature, ProError status,
   &nbsproAppData appdata);
/*================================================================*\
  Function to write out the members of the current assembly, and
  display the result in an information window.
\*================================================================*/
int UserAsmCompVisit (void *dummy, int dummy2)
{
 &nbsproMdl       asm;
  char         name[PRO_NAME_SIZE];
  char         type[PRO_TYPE_SIZE];
  wchar_t      wname[PRO_NAME_SIZE];
 &nbsproMdldata   mdldata;
  ProError     err;
  UserAppdata  appdata;
  FILE        *fp;
  
  ProMdlCurrentGet ([$asm)]
/*----------------------------------------------------------------*\
  Open the text file.
\*----------------------------------------------------------------*/
  strcpy (name,FILENAME);
  fp = fopen (name,"w");
  ProMdlDataGet (asm, [$mdldata)]
  ProWstringToString (name, mdldata.name);
  ProWstringToString (type, mdldata.type);
  fprintf (fp, "%s     %s\n",name,type);
  appdata.fp = fp;
  appdata.level = 1;
/*----------------------------------------------------------------*\
  List the assembly members.
\*----------------------------------------------------------------*/
  // ProSolidFeatVisit (asm, user_action, UserAsmCompFilter, [$appdata)]
/*----------------------------------------------------------------*\
  Close the file and display it.
\*----------------------------------------------------------------*/
  fclose (fp);
  ProStringToWstring (wname, FILENAME);
  ProInfoWindowDisplay (wname, NULL, NULL);
  return (PRO_TK_NO_ERROR);
}
/*================================================================*\
FUNCTION:  UserAsmCompFilter()
PURPOSE:   A filter used by ProSolidFeatVisit() to visit
           features that are assembly components
\*================================================================*/
ProError UserAsmCompFilter (
  ProFeature *feature,
  ProAppData app_data)
{
  ProError    status;
  ProFeattype ftype;
/*----------------------------------------------------------------*\
  Get the feature type
\*----------------------------------------------------------------*/
  status = ProFeatureTypeGet (feature, [$ftype)]
/*----------------------------------------------------------------*\
  If the feature is an assembly component,
     return NO ERROR,
  else
     return CONTINUE
\*----------------------------------------------------------------*/
  if (ftype == PRO_FEAT_COMPONENT)
      return (PRO_TK_NO_ERROR);
  return (PRO_TK_CONTINUE);
}
/*-----------------------------------------------------------------*\
  Write the information to a file.
\*-----------------------------------------------------------------*/
ProError user_action (
  ProFeature  *feature,
  ProError     status,
  ProAppData   appdata)
{
  FILE         *fp;
  int           l, level;
  ProError      err;
  ProMdl        mdl;
  char          name[PRO_NAME_SIZE];
  char          type[PRO_TYPE_SIZE];
  wchar_t       wname[PRO_NAME_SIZE];
  UserAppdata  *appd, appd1;
  ProMdldata    mdldata;
  
  appd = (UserAppdata *)appdata;
  fp = appd->fp;
  level = appd->level;
  ProAsmcompMdlGet (feature , [$mdl)]
  ProMdlDataGet (mdl, [$mdldata)]
  ProWstringToString (name,mdldata.name);
  ProWstringToString (type,mdldata.type);
  for (l = 0; l < level; l++)
       fprintf(fp,"    ");
  fprintf (fp,"%s      %s\n",name,type);
  if (strncmp (type,"ASM",3) == 0)
  {
      appd1.fp = appd->fp;
      appd1.level = appd->level+1;
      ProSolidFeatVisit (mdl, user_action, UserAsmCompFilter, [$appd1)]
  }
  if (feature != NULL)
      return(PRO_TK_NO_ERROR);
  return (PRO_TK_CONTINUE);
}
上面为后缀为.c文件,调试时出现如下错误,请哪为大虾帮帮忙。
fatal error C1010: unexpected end of file while looking for precompiled header directive
作者: C3P    时间: 2003-4-3 11:25
我也遇到过同样的问题,请把你整个程序传给我,让我帮你调试一下
作者: TOOL    时间: 2003-4-5 15:15
工程设置中修改:
 &nbsproject Settings
    C++项
    Category: Procompiled Headers修改为Automatic use of.....
作者: beibei    时间: 2003-4-8 22:06

改过了效果很好,本来只有一个错误的,现在变成了50个。
作者: TOOL    时间: 2003-4-8 22:35
程序不能按照错误多少而论的!
说明你还有其他错误,继续慢慢修改……




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3