How to resolve [Linker Error] Unresolved external in Borland C++ builder 6

8.7k views Asked by At

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

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

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

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.

1

There are 1 answers

2
Wiki Wang On

Add this line to one of your .cpp files:

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

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

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