如何解决Borland c++ builder 6中未解决的[链接错误]?

时间:2022-05-07 19:28:09

I downloaded DeltaCopy source code and tried to compile it using Borland C++ builder 6.0.

我下载了DeltaCopy源代码,并尝试使用Borland c++ builder 6.0编译它。

The downloaded code has three projects.I tried to build one named as "deltaS" and got runtime error as :

下载的代码有三个项目。我尝试构建一个名为“delta”的函数,并将运行时错误设置为:

Linker Error] Unresolved external 'TConsoleRunner :: Run (System :: AnsiString, _STL :: vector <_STL :: basic_string , _STL :: allocator > _STL :: allocator <_STL :: basic_string , _STL :: allocator >>> *, void *) 'referenced from C: \ DeltaCopy \ MAINFORMSERVER.OBJ

[endnoteref: 1]::,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,:,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,从C: \ DeltaCopy \ MAINFORMSERVER.OBJ中引用。

I am completely new to C++ environment of Borland and don't know how to resolve it.But by reading the message I assume there is some header file most probably STL library which was not linked at runtime.

If anyone has faced this issue then please guide me.

我对Borland的c++环境完全陌生,不知道如何解决它。但是,通过读取消息,我假定有一些头文件很可能是STL库,在运行时没有链接。如果有人遇到这个问题,请指导我。

1 个解决方案

#1


0  

Add this line to one of your .cpp files:

将这一行添加到您的.cpp文件中:

#pragma comment(lib, "libcpmt.lib")

It tells the linker to link to libcpmt.lib so any references to its code can be resolved.

它告诉链接器链接到libcpmt。lib因此可以解析任何对其代码的引用。

Alternatively, you can add the libcpmt.lib file itself to your project, which has the same effect.

或者,您可以添加libcpmt。lib文件本身对您的项目,也有同样的效果。

#1


0  

Add this line to one of your .cpp files:

将这一行添加到您的.cpp文件中:

#pragma comment(lib, "libcpmt.lib")

It tells the linker to link to libcpmt.lib so any references to its code can be resolved.

它告诉链接器链接到libcpmt。lib因此可以解析任何对其代码的引用。

Alternatively, you can add the libcpmt.lib file itself to your project, which has the same effect.

或者,您可以添加libcpmt。lib文件本身对您的项目,也有同样的效果。