Solved

borland builder code linking to visual studio static library

Posted on 2001-07-20
2
691 Views
Last Modified: 2013-12-14
a static library is built using visual studio

the *.lib file and its header is placed in the borland project folder

in borland the path to libraries is set to the project folder

the visual studio created header is #included in the borland code and the header compiles ok evidenced by the fact that the types defined in the header are available in the borland code

Q is: what is required to use the functions defined in the *.lib file?

keep in mind that a DLL is not desired!


0
Comment
Question by:lirtua
2 Comments
 

Author Comment

by:lirtua
ID: 6303982
Comment 1:

I have run COFF2OMF on the library and included the resulting *.lib in the borland project
0
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 50 total points
ID: 6304580
You can't use a static library made for VC++ (or any other compiler for
that matter). Static libraries are not cross-compiler, for any number
of reasons, from naming conventions to internal structure differences.

You can also do it yourself using impdef and such. A few pages
that are "Must See" for using 3rd party DLLs:

http://www.pacifier.com/~jgibbon/program_tip_4.html 
http://www.bcbdev.com/articles/vcdll.htm 
http://community.borland.com/article/0,1410,16599,00.html 
Alex
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now