MSVC10自定义构建步骤-无法按预期工作 [英] MSVC10 custom build step -- not working as expected

查看:74
本文介绍了MSVC10自定义构建步骤-无法按预期工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个* .lib文件,我想向其中添加* .obj文件.过去,我在MSVC中使用了自定义构建步骤功能.我构建* .lib,然后添加其他* .obj文件以创建备用和其他* .lib文件.

过去,我在自定义构建步骤"命令行中使用了以下脚本:

I have a *.lib file that I want to add a *.obj file to. In the past, I used the custom build step feature in MSVC. I build the *.lib then add the additional *.obj file to create an alternate and additional *.lib file.

In the past, I have used the following script in the Custom Build Step command line:

CommandLine="lib /OUT:..\lib\tGenesisi.lib $(IntDir)\ramdll.obj $(TSTUDIO3D)\lib\tgenesis.lib

Outputs="$(TSTUDIO3D)/lib//tGenesisi.lib"

这将使用tGenesis.lib(在当前项目中进行构建)并添加ramdll.obj并构建一个新库名为tGenesisi.lib的文件.这两个库文件都会生成.

此技术不再适用于MSVC10.我已经连续12个小时尝试各种替代方法,包括阅读我在msdn站点上可以找到的所有内容.如果我指定一个输出文件,则将其解释为输入文件并尝试找到它...当然找不到该文件,因为我正在尝试构建它.如果我将其切换,MSVC会说输入文件与输出文件相同.我不能休息.

产生ramdll.obj的rammdll.c文件实际上是当前项目的一部分,但未链接.它是这个古老游戏引擎中愚蠢的外部变量方案的一部分.太复杂了.

无论如何,我需要将此* obj修补到我的* .lib文件中.如果MSVC不能达到预期的效果,是否可以使用lib实用程序手动进行操作,或者采用其他方法?

This would take the tGenesis.lib (build in the current project) and add the ramdll.obj and build a new library file called tGenesisi.lib. BOTH library files would get built.

This technique no longer works with MSVC10. I have been trying all sorts of alternatives for 12 hours straight, including reading everything I can find on the msdn site. If I designate an output file, it is interpreted as an input file and tries to find it... which of course it can''t find because I''m trying to BUILD it..If I switch it around, MSVC says that the input file is the same as the output file. I can''t get a break.

The rammdll.c file that produces the ramdll.obj is actually PART of the current project but doesn''t get linked. It is part of a goofy extern variable scheme in this ancient game engine. It''s complicated.

At any rate, I need to get this *obj patched in to my *.lib file. If MSVC won''t behave as expected, is there a way I can manually do it with a lib utility, or some other way?

Thanks.

推荐答案

(IntDir)\ ramdll.obj
(IntDir)\ramdll.obj


(TSTUDIO3D)\ lib \ tgenesis.lib
(TSTUDIO3D)\lib\tgenesis.lib

Outputs="


(TSTUDIO3D)/lib//tGenesisi.lib"
(TSTUDIO3D)/lib//tGenesisi.lib"

这将使用tGenesis.lib(在当前项目中构建)并添加ramdll.obj并构建一个名为tGenesisi.lib的新库文件.这两个库文件都会生成.

此技术不再适用于MSVC10.我已经连续12个小时尝试各种替代方法,包括阅读我在msdn站点上可以找到的所有内容.如果我指定一个输出文件,则将其解释为输入文件并尝试找到它...当然找不到该文件,因为我正在尝试构建它.如果我将其切换,MSVC会说输入文件与输出文件相同.我不能休息.

产生ramdll.obj的rammdll.c文件实际上是当前项目的一部分,但未链接.它是这个古老游戏引擎中愚蠢的外部变量方案的一部分.太复杂了.

无论如何,我需要将此* obj修补到我的* .lib文件中.如果MSVC不能达到预期的效果,是否可以使用lib实用程序手动进行操作,或者采用其他方法?

谢谢.

This would take the tGenesis.lib (build in the current project) and add the ramdll.obj and build a new library file called tGenesisi.lib. BOTH library files would get built.

This technique no longer works with MSVC10. I have been trying all sorts of alternatives for 12 hours straight, including reading everything I can find on the msdn site. If I designate an output file, it is interpreted as an input file and tries to find it... which of course it can''t find because I''m trying to BUILD it..If I switch it around, MSVC says that the input file is the same as the output file. I can''t get a break.

The rammdll.c file that produces the ramdll.obj is actually PART of the current project but doesn''t get linked. It is part of a goofy extern variable scheme in this ancient game engine. It''s complicated.

At any rate, I need to get this *obj patched in to my *.lib file. If MSVC won''t behave as expected, is there a way I can manually do it with a lib utility, or some other way?

Thanks.


这篇关于MSVC10自定义构建步骤-无法按预期工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆