C ++ builder uses an external library file to solve the problem of Link errors

Source: Internet
Author: User

Tools]
Borland C ++ Builder 6.0/codegear C ++ builder 2007/2009

[Problem]
When you use the external library file (static lib file, static Call DLL) Link, an error is reported: some functions cannot be found.

[Solution]
Method 1:
Right-click the project and select "add..." in the pop-up menu ...".
In the file selection box, select ". lib" as the file type ",
Find the corresponding lib file and click "open". The LIB file will be added to the project.
Recompile the link.

Method 2:
On the "Project --> options" setting interface, switch to "directories/conditionals ",
Click "..." next to "library path,
On the "directories" interface, add the directory where the Lib file is located,
Take iphlpapi. Lib as an example. The directory is "$ (BCB)/lib/psdk ".
Then, in the "# pragma..." section of the main project file to use this Lib,
Add the following statement:
# Pragma link "iphlpapi. lib"
Recompile the link.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.