Author Topic: Code::Blocks - Working in 'Old Mode'  (Read 9736 times)

diego_pmc

  • Guest
Code::Blocks - Working in 'Old Mode'
« on: October 01, 2009, 03:02:18 pm »
On sait depuis longtemps que travailler avec du texte lisible et contenant du sens est source de distractions, et empêche de se concentrer sur la mise en page elle-même. L'avantage du Lorem Ipsum sur un texte générique comme 'Du texte. Du texte. Du texte.' est qu'il possède une distribution de lettres plus ou moins normale, et en tout cas comparable avec celle du français standard.
« Last Edit: January 05, 2021, 12:00:46 am by diego_pmc »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Code::Blocks - Working in 'Old Mode'
« Reply #1 on: October 01, 2009, 03:44:45 pm »
1. CB is not compiler  :lol: :lol: :lol: :lol:
2. CB can be made to work with any compiler out there
3. Why on earth would you want to use such compiler and waste time on the past technology?  :shock: :?

Also, is there any way to make CB open up a new empty file every time I start it?
You could look at the scripting features of C::B
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: Code::Blocks - Working in 'Old Mode'
« Reply #2 on: October 01, 2009, 05:31:08 pm »
The below compiles and runs for me. No idea if cin works right your sample code does not test that well.
I used C::B SVN 5731. Should work with most C::B Nightly reply to this thread if 8.02 release does not work for you. The teacher/instructor would most likely want a set release to test it.

Note: Code::Blocks does NOT support debugging of Borland code; but, about 6 months ago someone mentioned a third party option for Borland debugging no idea if it supported the old Borland 5.5 code.
http://forums.codeblocks.org/index.php/topic,10597.0.html
http://www.ollydbg.de/ an shareware debugger no idea if it really works with Borland Code well or if using it will be easy with code blocks.

Added the libraries "cw32", "Kernel32", and "user32" to get it to link.
Note: the "cw32" library was a random guess.

Improved test code used below to test cin and set valid exit code was returning a weird exit code.
Code
#include <iostream.h>

void main()
{
    cout << "works\n";
    int a;
    cin >> a;

    cout << a << "\n";

    exit(0);
}

Cmd window output below for me entering a 7
Code
works
7
7

Process returned 0 (0x0)   execution time : 2.734 s
Press any key to continue.
Using Borland bcc 5.5 installed in folder "C:\GreenApps\BCC55"

Code
bcc32 -v
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland

ilink32.cfg contains
Code
-L"C:\GreenApps\BCC55\lib;C:\GreenApps\BCC55\Lib\PSDK"

bcc32.cfg contains
Code
-I"C:\GreenApps\BCC55\include"
-L"C:\GreenApps\BCC55\lib;C:\GreenApps\BCC55\Lib\PSDK"

Tim S.
« Last Edit: October 01, 2009, 06:10:16 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1441
    • CenizaSOFT
Re: Code::Blocks - Working in 'Old Mode'
« Reply #3 on: October 01, 2009, 06:03:35 pm »
It sucks when teachers do not get up to date. I also had a similar problem at the university. They were teaching us "C++" (it was actually C, except that we used iostream instead of stdio most of the time) using Turbo C++ 3.0. Good thing it was only the very first few semesters and not the whole career.

Using Code::Blocks with an old compiler may be an option to get things going, but your teacher should really consider learning and teaching the real and up to date thing. It's not like there are no options freely available at all. Code::Blocks is one of them, Visual C++ Express is another.

Good luck.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7699
    • My Best Post
Re: Code::Blocks - Working in 'Old Mode'
« Reply #4 on: October 04, 2009, 06:06:24 pm »
@stahta01: Thanks, but how do I make CB use the new debuger? (Where do I have to place odbg's files, how do I make CB aware that they exist, etc.)

Also, is it possible to do this:
is there any way to make CB open up a new empty file every time I start it?

Use it as a stand alone debugger or use the normal Borland debugger as a standalone.

If you wish to use it with Code::Blocks then you must learn to solve the problem yourself.

To make it a plugin will take many hours of work if it is possible.

To call it as an external tool will take less than 15 minutes work.

Students need to learn to think and solve problems please research the above and decide which you are going to do. Then do it.

Very Large hint: http://www.codeblocks.org/docs/main_codeblocks_en.html

Quote
an shareware debugger no idea if it really works with Borland Code well or if using it will be easy with code blocks.
NOTE: As I have implied I have never used Ollydbg.

Tim S.
Teaching Assistant
« Last Edit: April 13, 2010, 02:29:24 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org