如何将.obj文件包含到项目中 [英] How to include .obj files into the project

查看:167
本文介绍了如何将.obj文件包含到项目中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下问题:
我被赋予任务 - 构建一个应用程序。有一个准备文件counter.h和一些其他文件 - counter.obj。原来,在counter.h中只有函数的声明 - 我如何将.obj文件包含在.cpp文件中,以便它编译?我使用的是Microsoft Visual Studio 2010 - 并且在哪个文件夹应该是文件本身?

I have the following question: I was given the task - to build an application. There was a ready file counter.h and some other file - counter.obj. It turned out that in the counter.h there were only declarations of the functions - how can I include .obj file into the .cpp file so that it compiles? I am using Microsoft Visual Studio 2010 - and in which folder should the file itself go?

推荐答案

将obj文件添加到解决方案就像你对cpp文件一样(我通常通过拖放来实现,也就是将文件从Windows资源管理器拖放到解决方案展开窗口中的项目上)。

Add the obj-file to the Solution just as you would do with cpp-files (i usually do this by drag-and-drop, that is, drag the file from the Windows Explorer and drop it on a project in the Solution Exporer window).

你可以把obj文件和cpp文件放在一起;它并不重要。

You can put the obj-file together with cpp-files; it doesn't really matter.

这篇关于如何将.obj文件包含到项目中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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