在VS.NET 2005中编译C程序 [英] Compiling C Programs in VS.NET 2005

查看:71
本文介绍了在VS.NET 2005中编译C程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在VS.NET 2005中编译C程序时,出现以下错误:

When I try to compile a C Program in VS.NET 2005, I get the below mentioned errors:

链接...
btrapi.obj:错误LNK2019:函数_RQSHELLINIT @ 4中引用的未解析的外部符号_WBRQSHELLINIT @ 4
btrapi.obj:错误LNK2019:函数_BTRV @中引用的未解析的外部符号_BTRCALL @ 28 24
btrapi.obj:错误LNK2019:在函数 _BTRVID @ 28

致命错误LNK1120:3个未解决的外部组件

fatal error LNK1120: 3 unresolved externals

过去1星期令人沮丧,这个错误浪费了我们很多时间.真的很感谢任何帮助.还请告诉我您是否需要任何其他信息.

Its been frustating for the past 1 week and this error has wasted us a lot of time. Any kind of help is really appreciated. Also let me know if you would require any additional information.

推荐答案

正如我之前说的,您有一些图书馆 >从您的构建设置中丢失.检查BTRIEVE库文件的存储位置,然后将路径添加到项目的链接器属性,或将其添加到Visual Studio的Lib目录.

As I said previously you have some libraries missing from your build settings. Check where you have stored the BTRIEVE library files and either add the path to the Linker properties for the project, or add it to the Lib directories for Visual Studio.


看起来好像项目中缺少某些对象或库.您是否要使用某些第三方产品?

It looks as if you have some objects or libraries missing from your project. Are you trying to use some third party product?


理查德,

我的程序正在与BTRIEVE API通信以访问平面文件.

My program is communicating with the BTRIEVE APIs to access the flat files.

问题摘要:
我们有一些用MC6(Microsoft C)编写的现有程序.我们必须在VS.NET 2005环境中运行(编译)这些现有的C程序.

Summary of the problem:
We have some exisiting programs written in MC6 (Microsoft C). We have to run (compile) these existing C programs in the VS.NET 2005 environment.

我们还使用Pervasive.SQL V8/BTRIEVE API与平面文件进行连接,因为现有应用程序与BTRIEVE数据库(即平面文件)进行交互.

Also we are using Pervasive.SQL V8 / BTRIEVE APIs for the connections with the flat files because the existing application interacts with the BTRIEVE databases, which is flat files.

我们在编译过程中遇到了问题.我们必须将现有程序与obj文件"btrapi.obj"链接,该文件用于访问BTRIEVE文件.因此,最终,我们在链接时遇到了问题.

We are facing problems during the compilation process. We have to link the existing programs with the obj file "btrapi.obj", which is meant for accessing the BTRIEVE files. So ultimately, we are having problems while it is linking.

构建日志已随此邮件一起被附加,并且错误已在附加的构建日志中列出. VS.NET 2005中现有C程序的编译结果,我们得到了此构建日志.请让我知道您是否需要任何其他信息.

The build log has been attached along with this mail and the errors are listed in the attached build log. We got this build log as a result of the compilation of the existing C program in VS.NET 2005. Pls let me know if you would any additional information.

我们需要帮助来解决BuildLog.txt文件中所附的问题.

We wanted help in resolving the problem attached in the BuildLog.txt file.

遵循的编译步骤:

1)在Developer Studio编程环境中,从文件"菜单中选择新建".
2)在新建"对话框的项目"选项卡上,执行以下操作:
将类型设置为控制台应用程序".
将名称设置为Sample.
将位置设置为所需目录.
单击OK.
3)从项目"菜单中选择设置".在"C ++"选项卡上,执行以下操作:

1) In the Developer Studio programming environment, choose New from the File menu.
2) In the New dialog, on the Projects tab, do the following:
Set the type to Console Application.
Set the Name to Sample.
Set the location to your desired directory.
Click OK.
3) Choose Settings from the Project menu. On the C++ tab, do the following:

在预处理器"类别中,在预处理器定义"框中添加BTI_WIN_32,并在其他包含目录"框中添加当前目录(.).
在代码生成"类别中,将结构成员对齐"设置为1字节. >单击确定".
4)从构建"菜单中选择全部重建". Microsoft Visual C ++会生成程序,并将exe放在项目文件目录中.

In the Preprocessor category, add BTI_WIN_32 in the Preprocessor Definitions box and add the current directory (.) in the Additional Include Directories box.
In the Code Generation category, set the Structure Member Alignment to 1 Byte.
Click OK.
4) Choose Rebuild All from the Build menu. Microsoft Visual C++ builds the program and places the exe in the project file directory.

我们已经通过Google搜索尝试了很多选择,但是我们无法取得突破.

We had tried many option through google search, but we are not able to get a breakthrough.

我们非常感谢您的帮助....

Any help is really appreciated....


这篇关于在VS.NET 2005中编译C程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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