本文介绍了#import .tlb文件在特定配置和特定项目文件夹位置中生成编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好


我进口



stdafx.h中的

// ----- Inventor接口包括


#pragma
警告 disable :4192
4049)


#import
< RxInventor.tlb>   
rename_namespace(
" Inventor" )named_guids raw_dispinterfaces
raw_method_prefix (
"" )high_method_prefix( "方法"
\


      
重命名(
" DeleteFile"  
" IVDeleteFile"    
\\ \\


      
重命名(
" CopyFile"
"IVCopyFile"  
\


重命名( " MoveFile"
" APIMoveFile"
\


      
重命名(
" GetObject"
" IVGetObject"
       \


      
重命名(
" SetEnvironmentVariable"   
" IVSetEnvironmentVariable" )\


      
重命名(
" MoveFile"
"IVMoveFile" ),no_implementation                   




在cpp文件中:



// ----- Inventor接口包括


#pragma
警告 disable :4192
4049)


#import
< RxInventor.tlb>   
rename_namespace(
" Inventor" )named_guids raw_dispinterfaces
raw_method_prefix (
"" )high_method_prefix( "方法"
\


      
重命名(
" DeleteFile"  
" IVDeleteFile"    
\\ \\


      
重命名(
" CopyFile"
"IVCopyFile"  
\


重命名( " MoveFile"
" APIMoveFile"
\


      
重命名(
" GetObject"
" IVGetObject"
       \


      
重命名(
" SetEnvironmentVariable"   
" IVSetEnvironmentVariable" )\


      
重命名( " MoveFile"
" IVMoveFile" ),implementation_only         


并收到错误消息:



错误  1186 错误C2440:'return':无法con从 '发明者:: iFeatureEntityInput :: GetEntityType :: miFeatureEntityInputTypeEnum' 到 '发明者:: iFeatureEntityInputTypeEnum' &NBSP VERT; d:\install_2014\solidcam\output\releasewin32\tmp\hostlibiv2012\rxinventor.tli&NBSP; 218757


关于这个问题的奇怪之处是它在配置版本Win32中发生但在版本x64中没有发生


请指教

解决方案

Hi

I make import

in stdafx.h

//----- Inventor interfaces include

#pragmawarning(disable:4192 4049)

#import<RxInventor.tlb>  rename_namespace("Inventor") named_guids raw_dispinterfaces raw_method_prefix("") high_method_prefix("Method") \

      rename("DeleteFile" , "IVDeleteFile")   \

      rename("CopyFile","IVCopyFile") \

rename("MoveFile","APIMoveFile")\

      rename("GetObject","IVGetObject")       \

      rename("SetEnvironmentVariable"  , "IVSetEnvironmentVariable")\

      rename("MoveFile","IVMoveFile"), no_implementation                 

in a cpp file:

//----- Inventor interfaces include

#pragmawarning(disable:4192 4049)

#import<RxInventor.tlb>  rename_namespace("Inventor") named_guids raw_dispinterfaces raw_method_prefix("") high_method_prefix("Method") \

      rename("DeleteFile" , "IVDeleteFile")   \

      rename("CopyFile","IVCopyFile") \

rename("MoveFile","APIMoveFile")\

      rename("GetObject","IVGetObject")       \

      rename("SetEnvironmentVariable"  , "IVSetEnvironmentVariable")\

      rename("MoveFile","IVMoveFile"), implementation_only        

and get an error:

Error 1186 error C2440: 'return' : cannot convert from 'Inventor::iFeatureEntityInput::GetEntityType::miFeatureEntityInputTypeEnum' to 'Inventor::iFeatureEntityInputTypeEnum' d:\install_2014\solidcam\output\releasewin32\tmp\hostlibiv2012\rxinventor.tli 218757

the strange thing about this problem is it happens in configuration Release Win32 but not in Release x64

Please advise

解决方案


这篇关于#import .tlb文件在特定配置和特定项目文件夹位置中生成编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 05:01