Xref: utzoo comp.lang.c++:9064 comp.sys.ibm.pc.misc:937 alt.msdos.programmer:2052 Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!khan From: khan@ux1.cso.uiuc.edu (Scott Coleman) Newsgroups: comp.lang.c++,comp.sys.ibm.pc.misc,alt.msdos.programmer Subject: On Linking TC++ to Assembly Language Message-ID: <1990Aug20.143139.7100@ux1.cso.uiuc.edu> Date: 20 Aug 90 14:31:39 GMT Sender: khan@ux1.cso.uiuc.edu (Scott Coleman) Organization: University of Illinois at Urbana Lines: 35 Howdy, folks. Today's hopefully-not-too-dumb question concerns linking routines in Assembly Language to a Turbo C++ program. Specifically, I want to use a Curses library (Aspen Curses) with TC++. The library compiles and links when TC++ is in "ANSI C compiler" mode, but when I attempted to link it with a C++ program, TLink couldn't find any of the symbols. My next approach was to recompile all of the LIB source files with the -P option, which forces TC++ to treat them as C++ source files. I then rebuilt the library using TLib. Now, my C++ program can find all of the symbols in the library EXCEPT those which appear in the two .ASM files. A perusal of the library contents with TLib reveals that all the C++ functions have information on the parameters stored in the library along with the symbol names (e.g. instead of just 'foo' I see 'int foo(int,char *,unsigned)'. The Assembly modules, however, lack this extra information. With them, all I can see are the symbol names. My guess is that TC++ is doing some really intense type checking, and because the symbols in the .ASM modules don't match EXACTLY with the symbols that the C++ modules in the library are looking for, TLink gets upset. How can I work around this? Ideally, I would like to insert the "extra" parameter information which is lacking for the .ASM modules. Frantic scanning of the many TC++ manuals reveals no obvious way to do this, and the section on linking TC++ with .ASM doesn't even mention the problem. If I can't insert the parameter type info, can I force TLink to relax its type checking on those .ASM modules? Is there another solution? Any assistance will be greatly appreciated. -- Scott Coleman University of Illinois khan@ux1.cso.uiuc.edu