ProE二次开发之VS2005+ProE Wildfire 3.0开发环境配置

ProE Wildfire 3.0的Pro/Toolkit二次开发默认的开发工具是VS2003

但是公司里只有VS2005,所以团队Team只能用VS2005开发,而且经实践是完全OK的,甚至有人用VS2008也没有问题。

开发环境配置如下:

一、新增头文件路径

**********************Include Files*********************
Tools->Options->Projects and Solutions->VC++ Directories->Include files
[ProE Path]\protoolkit\includes
[ProE Path]\prodevelop\includes
[ProE Path]\protoolkit\protk_appls\includes

二、新增库文件路径

**********************Library files*********************
Tools->Options->Projects and Solutions->VC++ Directories->Library files
[ProE Path]\protoolkit\i486_nt\obj
[ProE Path]\prodevelop\i486_nt\obj

三、对应同步模式开发之Dll程式

1、设置[C/C++]->[Language]下的Treat  wchar_t  as  Built-in  Type 为 No (/Zc:wchar_t-)

2、增加静态库文件

      [Linker]->[Input]->[Additional Dependecies]
      --------------------------------------------

  mpr.lib
  wsock32.lib
  psapi.lib
  protk_dllmd.lib
  prodev_dllmd.lib

3、忽略静态库文件

      [Linker]->[Input]->[Ignore Specific Library]     Release版本Ignore:
     -------------------------------------------------------------------
     msvcrtd.lib

      [Linker]->[Input]->[Ignore Specific Library]     Debug版本Ignore:
     -------------------------------------------------------------------
     msvcrt.lib

4、设置Use MFC in a Shared DLL

新建的工程默认是选择use mfc in a shared dll

不可改为Use MFC in a Static Library,这样会报错。

四、对应异步模式之Exe程式

首先设置环境变量:PRO_COMM_MSG_EXE  = <ProE Path>\i486_nt\obj\pro_comm_msg.exe

如本人的电脑上设置的PRO_COMM_MSG_EXE = F:\PTC\Wildfire3\i486_nt\obj\pro_comm_msg.exe

具体设置方法:我的电脑->属性->高级->环境变量

1、设置Treat  wchar_t  as  Built-in  Type 为 No

      图片同上

2、增加静态库文件

      [Linker->Input]   Additional:
      ------------------
  libcmt.lib
  wsock32.lib
  mpr.lib
  psapi.lib
  advapi32.lib
  winspool.lib
  netapi32.lib
  protkmt.lib
  ptasyncmt.lib

3、忽略静态库文件(Release与Debug版本一样)

      Ignore:
      -----------------
      libc.lib
      libcp.lib

4、Linker->Command Line设置

      -----------------
     /Force /Ignore:4006

注意:对应同步模式之Dll的环境配置没有任何问题

           但对应异步模式之Exe的环境配置是有问题的,最后一项增加/Force /Ignore:4006其实是让编译器即使编译链接有错误也强制生成exe文件,没有加此项的话编译会有错误。但是经实践好像一般这样编译出来的程式运行好像也没有什么问题。当然更好的是编译没有任何错误和警告了,但也许只能用标配的VS2003才能做到吧。可惜没有VS2003没法实践。

原文地址:https://www.cnblogs.com/Hisin/p/2424021.html