Subj : mixing c/c++ To : borland.public.cpp.borlandcpp From : "Rob C." Date : Wed Jul 16 2003 01:39 pm Here is a C++ module, step01.cpp, that immediately calls a C module, color1.c, (prints screen of text) and then returns to the C++ module (prints window). I set the TARGET TYPE = ‘Application’ and the PLATFORM = ‘WIN32.’ The program compiles and links fine, but when I run it, the *.C module is totally ignored, (like it is being “mangled” along with the CPP). If I set the TARGET TYPE = ‘Application’ and the PLATFORM = ‘DOS (standard),’ . . then I get all kinds of problems from the CPP module. ----------------------- step01.cpp ------------------ #include #include #include extern "C" int color1(void); class TDrawApp : public TApplication { public: TDrawApp() : TApplication() {} void InitMainWindow() { color1(); //<--- would this go here? SetMainWindow(new TFrameWindow(0, "Sample ObjectWindows Program")); } }; int OwlMain(int /*argc*/, char* /*argv*/ []) { return TDrawApp().Run(); } ------------------------------- color1.c ----------------- #include #include char message[] = "C portion"; int color1(void ) { //89 int col= 1; int row=1; textcolor(7); textbackground(1); clrscr(); while( col < 65 ) //print screenfull of text { //9 gotoxy( col, row ); printf(message); // row++; if( row == 23 ) {//28 col+=15; row = 1; } //28 } //9 return (0); } //89 .