Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!wuarchive!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!m.cs.uiuc.edu!reed From: reed@m.cs.uiuc.edu Newsgroups: comp.lang.c++ Subject: C/C++ link in TC++ Message-ID: <4800101@m.cs.uiuc.edu> Date: 11 Sep 90 03:17:00 GMT Lines: 44 Nf-ID: #N:m.cs.uiuc.edu:4800101:000:856 Nf-From: m.cs.uiuc.edu!reed Sep 10 22:17:00 1990 I've been trying to link C object modules with C++, both created using Turbo C++. I must be doing something stupid, because the Turbo linker is unable to find the C reference. I've attached a code sample below that fails when I do the following: tcc -c y.c tcc -c x.cpp y.obj This fails to resolve the reference to "try" Any ideas on what I'm overlooking? Thanks in advance, Dan Reed reed@cs.uiuc.edu Associated Professor Department of Computer Science University of Illinois ================================ y.c ========================= #include void try (int x) { printf ("Value is %d\n", x); } ================================ x.cpp ======================= #include extern void try(int x); main() { int y; cout <<"Before call\n"; y = 10; try (y); cout<<"After call\n"; } ========= end of x.cpp ==========