Subj : Linker error, 'undefined symbo l' To : borland.public.cpp.borlandcpp From : "Rob C" Date : Fri Jul 04 2003 12:01 pm -------- The errors I get : Info :Making... Info :Building... Info :Compiling C:\LEARN\color2.c Info :Compiling C:\LEARN\try2.cpp Info :Compiling C:\LEARN\try1.cpp Info :Transferring to C:\BC5\BIN\tlink.exe @C:\LEARN\TRY2.R$P Warn : (1,1):No module definition file specified: using defaults <-------- ?????????????? Error: (1,1):Undefined symbol _cprintf in module color2.c Error: (1,1):Undefined symbol _textbackground in module color2.c Error: (1,1):Undefined symbol _textcolor in module color2.c -------------------- [The linker warning, 'no module definition file specified: using defaults,'] [how do I fix that?] --------------------------- try1.cpp #include #include int try2(); int main() { cout << "This is module 1, try1.cpp \n"; try2(); return 0; } --------------------- try2.cpp #include extern "C" int color2(void ); int try2() { cout << "This is module 2, try2.cpp \n"; color2(); return 0; } ------------------------------- color2.c #include #include void textbackground(int newcolor); void textcolor(int newcolor); int cprintf(const char * ); ---------- [I think I got all the above function prototypes correct, but the linker still returns 'undefined symbol'] ---------- char message[] = "This is module 3, color2.c"; int color2() { int col=15, row=10; gotoxy( col, row ); textcolor(7); textbackground(1); cprintf(message); return(0); } .