Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Help / Re: Terminal to launch consol programs is grayed and not working
« Last post by Pecan on Today at 06:39:13 am »
Thank you for your response. I would like to keep the console windows open all the time when I am working on a project.

Could you please let me know how can it be done.

Regards,

Hamid

I'm confused by this request. A console is either a stand-alone process that belongs to no project, or it is a console attached to a running project that takes input for the running project and accepts output from the running project.

How do you expect a console to be attached to a non-running project that you are working on?

If all you want is a console that is running on it's own behalf, in Windows, hit the windows key+r and type "cmd".

If you want a console attached to a process to accept input and produce output to the a console, write a program that reads (see reading from stdin) from a console and write output to the console (see writing to stdout).

Google "c++ stdin and stdout and stderr"

In C++, stdin, stdout, and stderr are standard input, output, and error streams, respectively. They allow you to interact with the console.
Here's a breakdown:

    stdin:
    Represents the standard input stream, typically connected to the keyboard. You can use it to read input from the user.
    stdout:
    Represents the standard output stream, typically connected to the console window. You can use it to write output to the console.
    stderr:
    Represents the standard error stream, typically connected to the console window. You can use it to write error messages to the console.

How to use them:

    cin: The cin object is used to read input from stdin.
    cout: The cout object is used to write output to stdout.
    cerr: The cerr object is used to write error messages to stderr.

Example:
C++

#include <iostream>

int main() {
    int number;

    // Read input from stdin
    std::cout << "Enter a number: ";
    std::cin >> number;

    // Write output to stdout
    std::cout << "You entered: " << number << std::endl;

    // Write error message to stderr
    std::cerr << "This is an error message!" << std::endl;

    return 0;
}

Important points:

    You need to include the <iostream> header to use these streams.
    cin, cout, and cerr are objects of classes istream, ostream, and ostream, respectively.
    You can use the >> operator with cin to read different data types.
    You can use the << operator with cout and cerr to write different data types.
    You can redirect these streams using the <, >, and 2> operators in the command line.
 
2
Development / Re: CB 24.12 & MAC
« Last post by Wkerry on Yesterday at 09:14:10 pm »
So GDB debugging works on the latest MAC OS?
Have you actually checked or assumed?

I am asking as there have been multiple reports on CB forum and on other forums that GDB has issues and it relates to a security change/changes Apple made a long time ago.
3
Development / Re: Add force switch to installation file
« Last post by olivier sc on Yesterday at 06:27:24 pm »
Or maybe add a real update process by a /update ?
4
Development / Re: Add force switch to installation file
« Last post by olivier sc on Yesterday at 06:26:30 pm »
Yes we have CalledProcessErrorOutput: Command '"codeblocks-20.03mingw-setup.exe" /S' returned non-zero exit status 2.
Just because old "codeblocks" is in place.

So add a /force option make sens to complet the update by overwriting.
5
Help / Re: Terminal to launch consol programs is grayed and not working
« Last post by hamid on Yesterday at 08:22:53 am »
Thank you for your response. I would like to keep the console windows open all the time when I am working on a project.

Could you please let me know how can it be done.

Regards,

Hamid
7
Embedded development / Including IAR-specific Library Function Definitions
« Last post by Elliott99 on December 02, 2024, 11:28:14 pm »
I am building a generic CodeBlocks project using the IAR compiler.

When I attempt to build, I get the error message:

"Error[Li005]: no definition for "__write" [referenced from
          putchar.o(dl7M_tlf.a)]"

It seems that the linker cannot find a definition for the IAR library function __write. The IAR compiler includes a definition for this library function in the installation directory arm/src/lib/file, where there is a write.c file. Adding the write.c file directly to the project allows me to fully link and generate a project executable. The problem is, this is very clunky and as other people at my job will be using this CodeBlocks + IAR framework, I'd prefer to not have to include a long relative path dependent on the install location of the IAR compiler.

Is there some compiler-dependent flag I can use to avoid this? Perhaps I can redirect the __write library Or some better inclusion method that doesn;t involve including a very long relative path? Even just defining a dummy void write() function somewhere?
8
Plugins development / Re: rss reader plugin
« Last post by Михаил Агарков on December 02, 2024, 07:25:09 pm »
How much effort would it take to make it work with 20.03?
9
Development / Re: CB 24.12 & MAC
« Last post by kencu on December 02, 2024, 05:15:33 pm »
current builds of codeblocks are available via macports and work very well on all systems from MacOSX 10.6 to current systems.
10
https://wiki.codeblocks.org/index.php/FAQ-General#Q:_What_Code::Blocks_is_not.3F

Quote
Code::Blocks is not a compiler, nor a linker. Release packages of Code::Blocks may include a compiler suite (MinGW/GCC), if not provided by the target platform already. However, this is provided "as-is" and not developed/maintained by the Code::Blocks development team.
Pages: [1] 2 3 4 5 6 ... 10