Click here to Skip to main content
15,899,754 members
Please Sign up or sign in to vote.
1.33/5 (3 votes)
See more:
hi friends..
can any one teach me how to link two c programs compiled from different compilers. i am using turboc and GCC.
Posted
Comments
Sergey Alexandrovich Kryukov 16-Jun-11 11:34am    
Why on Earth? You can re-build whole solution using one compiler. If you're not able to do so, you're in trouble anyway.
--SA
Albert Holguin 16-Jun-11 11:36am    
he's expanding his horizons...lol :)
CPallini 16-Jun-11 11:38am    
Could you please elaborate? Maybe there is a better solution.

1 solution

I suspect not.
Somewhere from a dark recess of my memory, I can hear a voice telling me that they've different calling conventions.

If you've the lib or dll files of both modules, you'd ideally decompile, modify and then recompile using the same (gcc?) compiler.

For curiosity's sake, may I ask what the intention/limitations are?

IDAPro, OllyDbg and td.exe (Turbo Debugger) all come to mind. Don't suppose the gcc portion was compiled with djgpp, was it? That brings back memories from 15 years ago. :)


[EDIT:] A little more poking about has led me to the homepage for Boomerang[^], which touts itself as being "A general, open source, retargetable decompiler of machine code programs" perhaps this will help you in your quest.

I also came across a paper that goes into techniques for decompilation, you may find the paper here[^] (It's where I found out about Boomerang) I haven't checked to see if the program described in the paper is available for download or not, but hopefully Boomerang will be able to do this for you anyway. If I were you, I'd look at the Help! I've lost my source code[^] section.

Cheers!
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900