kai
kai

Reputation: 1211

Generate an executable from object files in different formats

Say that I have two files main.o compiled from gcc and another file function.o compiled from MSVC; is it possible to generate an executable (by linking) from these files? Is this what BFS (binary file descriptor) library designed for? I mean can I use BFS to do this? If not, is there any way to do this?

Upvotes: 0

Views: 182

Answers (1)

Employed Russian
Employed Russian

Reputation: 213879

is it possible to generate an executable (by linking) from these files?

Perhaps.

C++ code produced by different compilers is not link compatible, but C code usually is (at least on UNIX). On Windows, it may or may not be possible. At a minimum, you should tell us which versions of MSVC and gcc you used to build the objects.

Is this what BFS (binary file descriptor) library designed for?

You probably mean the BFD library. No, that's not what it is for.

Upvotes: 0

Related Questions