Solved

Borland compiler + microsoft linker

Posted on 1998-04-08
5
333 Views
Last Modified: 2010-04-10
Can borland c/c++ obj files be fed into a microsoft linker?
like this ---> bcc 1.c then link 1.obj

bye
0
Comment
Question by:whluk
  • 3
  • 2
5 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 1184146
Why would you want to do this?  It might be possible but, because of name decoration,  it is not possible to link together files produced by the two different compilers.  
0
 
LVL 7

Accepted Solution

by:
galkin earned 10 total points
ID: 1184147
No, it is impossible since Microsoft and Borland use different name mangling
0
 
LVL 22

Expert Comment

by:nietod
ID: 1184148
My thought was that would prevent limiing together two object files produced by the differnet compilers.  It should not prevent one linker from linking two (or more) object files produced on the same compiler.  I'm not saying that it is possible (i suspect it is not), but I don't think name mangling will really be a problem.
0
 
LVL 7

Expert Comment

by:galkin
ID: 1184149
I think linker when resolving function addresses loks for specific name using name mangling speicific to this linker. If object file conatins function produced by another compiler linker will not find it.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1184150
In most cases the names in the object file will be already mangled.  That is, the compiler should produce an object file that contains mangled names and the linker does not need to know about the mangling algorythm.  However this may not be true in the case of templates.  In addition their may be problems involving the run-time libraray and initialization of static objects.  But in general, name mangeling shouldn't be a problem.  However, even if it is only a little problem, that is enough.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

749 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