User forums > General (but related to Code::Blocks)
new-b
BMB:
Hi.
I've been programming for years with all flavors of BASIC, and have recently decided to switch to c/c++. I wrote a few programs while learning using Borland's Turbo C++ compiler 1.01, in other words, for DOS. Since I rather like a few of those programs, I wanted to recompile them to be native win32 programs (I think what I want is a console program, but I don't exactly know the difference between all those different types of programs. My only experience with window's programming is VB6). I am using the latest build of Code::Blocks and the MinGW compiler. How would I do this? Do I need to create a project, or can I just compile the source files? Can it even be done?
Since I'm completely new to C::B and to real windows programming but want to learn, I would really appreciate a detailed explanation, and if possible some background about the difference between DOS/Windows programming. (I guess that is probably outside the scope of this forum, so if someone could point me to the background I want)
Thanks
mariocup:
Hi,
you need a Codeblock project to compile your sources. Just check the wizards (New Project) to get a simple project.
BMB:
--- Quote from: mariocup on October 04, 2007, 11:38:05 pm ---Hi,
you need a Codeblock project to compile your sources. Just check the wizards (New Project) to get a simple project.
--- End quote ---
????
What type of project? Console?
AmR EiSa:
--- Quote from: BMB on October 04, 2007, 11:41:29 pm ---What type of project? Console?
--- End quote ---
yes and if u use printf (C) make language c or c++
BMB:
I tried that on one of the programs (one without graphics. I assume graphics won't work. Am I right?). It came up with a lot of errors.
:: === Tic, Debug ===
D:\My Documents\CB\Tic\main.cpp:: In function `int main()':
D:\My Documents\CB\Tic\main.cpp:23: error: `clrscr' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:23: error: (Each undeclared identifier is reported only once for each function it appears in.)
D:\My Documents\CB\Tic\main.cpp:24: error: `_NOCURSOR' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:24: error: `_setcursortype' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:: In function `int posswin(int)':
D:\My Documents\CB\Tic\main.cpp:92: warning: unused variable 'pos'
D:\My Documents\CB\Tic\main.cpp:: In function `void player_first()':
D:\My Documents\CB\Tic\main.cpp:166: error: `gotoxy' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:178: error: `RED' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:178: error: `textcolor' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:179: error: `cprintf' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:: In function `void start_game()':
D:\My Documents\CB\Tic\main.cpp:209: error: `gotoxy' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:210: error: `RED' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:210: error: `textcolor' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:211: error: `cprintf' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:: In function `void check_draw()':
D:\My Documents\CB\Tic\main.cpp:222: error: `gotoxy' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:223: error: `RED' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:223: error: `textcolor' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:224: error: `cprintf' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:: In function `void draw_board()':
D:\My Documents\CB\Tic\main.cpp:236: error: `gotoxy' undeclared (first use this function)
D:\My Documents\CB\Tic\main.cpp:: In function `void put_X_O(char, int)':
D:\My Documents\CB\Tic\main.cpp:281: error: `gotoxy' undeclared (first use this function)
:: === Build finished: 18 errors, 1 warnings ===
Navigation
[0] Message Index
[#] Next page
Go to full version