使用RAD studio XE3构建简单的.exe + static.lib [英] Building simple .exe +static.lib with RAD studio XE3

查看:120
本文介绍了使用RAD studio XE3构建简单的.exe + static.lib的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很明显错过了显而易见但我似乎找不到在RAD工作室(以前的CPPBuilder)的构建的链接阶段添加或删除静态库的方法

我有一个很好的静态库项目。 MyStatic.lib位于与组中其他项目共享的输出Win32 \Debug文件夹中。

其中一个项目TestCmp.exe需要链接MyStatic.lib。容易对吗?除了我找不到任何地方实际添加它。在TestCmp.exe的命令行上有一堆东西,包括IDE清楚地放置的一些静态库,但我找不到任何编辑方法。



目前命令行如下所示:

I''m clearly missing the obvious but I can''t seem to find a way of adding or removing static libraries from the Link stage of a build in RAD studio ( Formerly CPPBuilder )
I have a static library project that builds fine. MyStatic.lib is in the output Win32\Debug folder shared with the other projects in the group.
One of those other projects TestCmp.exe needs to have MyStatic.lib linked in. Easy right? Except I can''t find anywhere to actually add it. There are a bundle of things on the command line for TestCmp.exe including some static libs clearly put there by the IDE but I can''t find any way to edit it.

Currently the command line looks like this:

c:\program files\embarcadero\rad studio\10.0\bin\ilink32.exe -L.\Win32\Debug;"c:\program files\embarcadero\rad studio\10.0\lib\Win32\debug";"c:\program files\embarcadero\rad studio\10.0\lib\win32\release";"c:\program files\embarcadero\rad studio\10.0\lib\win32\release\psdk";"C:\Program Files\FastReports\LibD17";"C:\Program Files\Raize\CS5\Lib\RS-XE3\Win32";"C:\Documents and Settings\All Users\Documents\RAD Studio\10.0\DCP" -j.\Win32\Debug;"c:\program files\embarcadero\rad studio\10.0\lib\Win32\debug";"c:\program files\embarcadero\rad studio\10.0\lib\win32\release";"c:\program files\embarcadero\rad studio\10.0\lib\win32\release\psdk";"C:\Program Files\FastReports\LibD17";"C:\Program Files\Raize\CS5\Lib\RS-XE3\Win32";"C:\Documents and Settings\All Users\Documents\RAD Studio\10.0\DCP" -l.\Win32\Debug -r -v -w -G8 -Tpe  c0x32 .\Win32\Debug\TestCmp.obj , .\Win32\Debug\TestCmp.exe , .\Win32\Debug\TestCmp.map , import32.lib cw32mti.lib , , TestCmp.res





我想看 MyStatic。 lib cw32mti.lib 之后就在那里,我想这条路径需要在那里作为 -L 选项。



任何帮助都会非常感激。



I''d like to see MyStatic.lib right in there after cw32mti.lib and I guess the path would need to be in there as an -L option as well.

Any help would be much appreciated.

推荐答案

好的恐慌我终于在这篇文章中找到了非常明显且令人难以置信的愚蠢解决方案 http://edn.embarcadero.com / article / 22694 [ ^ ]摘要是,将文件添加到.exe项目中,就像添加现有源文件一样,只是调整文件扩展名,以便显示.lib文件并添加构建的静态库。遗憾的是,这意味着没有办法直接实际控制链接器命令行,没有相当于--nodefault libs和Code Gear / RAD Studio / CppBuilder技术锁定到他们自己的库。即使微软和苹果也不这样做。这意味着我必须从我的项目中放弃对它的支持:-(但至少我认为我已经找到了问题的根源。

我等待希望得到纠正任何知道更好方法的CodeGear RAD Studio用户。
OK panic over I finally found the incredibly obvious and incredibly dumb solution in this article http://edn.embarcadero.com/article/22694[^] which in summary is, add a file to the .exe project as if you were adding an existing source file, only fiddle the file extension so it shows .lib files and add the built static lib. Sadly this means there is no way to actually control the linker command line directly, no equivalent of --nodefault libs and Code Gear/RAD Studio/CppBuilder is technology locked to their own libraries. Even Microsoft and Apple don''t do that. This means I''ll have to drop support for it from my project :-( but at least I think I''ve got the bottom of the issue.
I wait in hope to be corrected by any CodeGear RAD Studio users out there who know a better way.


我希望在cw32mti.lib之后看到MyStatic.lib



你很欣赏你需要在某个地方添加它。手动到你的链接器命令字符串或通过一些项目设置。
I''d like to see MyStatic.lib right in there after cw32mti.lib

You do appreciate that you will need to add it in somewhere. Either manually to your linker command string or via some project settings.


这篇关于使用RAD studio XE3构建简单的.exe + static.lib的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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