在C ++中使用.lib文件 [英] Using .lib files in C++

查看:335
本文介绍了在C ++中使用.lib文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用在borland C ++ 5.5编译期间生成的.lib文件中包含的类。



是否有任何预处理程序指令?

How can I use a class contained in a .lib file generated during its compilation in borland C++ 5.5.

Is there any preprocessor directive ?

推荐答案

没有。 (你真的不明白预处理器的作用,请阅读它,除非绝对需要,否则不要使用它。你还需要学习构建过程:编译器,链接器,系统进程加载了什么。)



库用于链接级别,而不是编译: http: //en.wikipedia.org/wiki/Linker_%28computing%29 [ ^ ]。



这是通过传递给链接器的参数完成的。 Borland IDE为链接器输入提供项目和环境选项,为链接库和目标文件的位置提供路径等。请扫描您的IDE UI以获取菜单和选项窗口以查找它。



-SA
No. (You don't really understand what a preprocessor does, please read about it, and avoid using it unless absolutely needed. You also need to learn the build process: what a compiler, linker, system process loaded do.)

Library is used at the level of linking, not compilation: http://en.wikipedia.org/wiki/Linker_%28computing%29[^].

This is done by parameters passed to the linker. Borland IDE provides project and environment options for linker input, path for location of link libraries and object files and so on. Please scan you IDE UI for the menu and option windows to find it out.

—SA


这篇关于在C ++中使用.lib文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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