4,311 questions
2
votes
0
answers
55
views
How to pass multi-line code strings with proper indentation to a jsx component in Astro MDX?
I'm building a static site with Astro and trying to create a custom code block component that allows users to switch between different programming languages.
Current Implementation
CodeBlock.jsx:
...
0
votes
1
answer
46
views
Setting codeblocks as default app for file association
When I install codeblocks V25 (64-bit) in windows "Program Files" I seem to be unable to set the default file type association for cbp-files. Seems to work if I install in "Program ...
1
vote
1
answer
81
views
Cygwin GDB not working under Codeblocks, (error 2: The system cannot find the file specified.)
The title says it all.
This question is quite the same with this question. However, the difference is that now it is 2 years and 4 major versions of cygwin gdb later. I want to believe that keeping ...
0
votes
1
answer
116
views
How to install libraries in Code::Blocks on Linux
I recently started using code::blocks on Linux (Linux Mint). I've been trying to install GTK and its dependencies for C++.
I started by downloading each of the dependencies as a .tar.xz file, and then ...
-1
votes
1
answer
162
views
How to open/close a file in a function in an endless loop
My problem is that I get the "too many files open" (Process returned 1 (0x1) ) error and I don't know why. I close the file with fclose() every time. I do that in a function and this ...
0
votes
1
answer
58
views
How can I run the bits library on Codeblock
I want to ask why my Code::blocks suddenly cannot run when I include the <bits/stdc++.h> library (More detail in the pictures below), everything else works fine. This happened after I set up Git:...
-1
votes
1
answer
51
views
Highlight.js: Single line code block with scroll-x
I have set up Highlighterjs with my NextJS@13+ page routing, but the code block is taking single line with scroll-x. Look at the image...
If i remove the useEffect the highliger is gone, but the line ...
4
votes
3
answers
389
views
What to do if <threads.h> isn't recognize (in C11)?
I've been learning how to do multi-threading in C and wanted to use <threads.h>. But it (my compiler GCC 8.1) says that <threads.h> isn't a file or a directory when I wanted to compile ...
1
vote
1
answer
149
views
C pointers understanding
I have ran into an issue that has made me realise I don't know as much about pointers as I thought I did.
test.h
#ifndef TEST_H_INCLUDED
#define TEST_H_INCLUDED
void getDataAlt(char** dst);
#endif // ...
0
votes
0
answers
54
views
Where is my cbKeyBinder10.ini file in Code::Blocks?
A debug report has been generated in this directory: a dialog box open and my Code::Blocks suddenly stopped. How can I solve this problem? And where is my cbKeyBinder10.ini file in Code::Blocks. And ...
0
votes
1
answer
109
views
How to fix the entry point problem on Code::Blocks
I have a problem. Code::Blocks is showing this:
codeblocks.exe - Entry Point Not Found
The procedure entry point _initterm could not be located ion the dynamic link library D:\Program Files\...
0
votes
0
answers
70
views
SDL2 Code::Blocks unable to find lSDL2_image and lSDL2_ttf
I'm using Code::Blocks version 20.03 on my Windows 11 PC to compile C++ files, whenever I try to build the file, I get an error that it is unable to find -lSDL2_image and -lSDL2_ttf.
Here are the ...
0
votes
1
answer
55
views
Why does codeblocks memory dump window not show the error?
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
struct train
{
int id;
int hours;
int minutes;
char destination[21];
};
// ...
1
vote
0
answers
35
views
How to disable code completion suggestions from other open source files in Code::Blocks?
Code::Blocks always shows suggestions from other open source files. For example, if I write a function in another file like func(int a, char ch), Code::Blocks will automatically suggest func(int a, ...
0
votes
0
answers
73
views
Issues with using * in command line in windows [duplicate]
I was trying to solve the reverse polish calculator problem where the arguments can be entered on the command line. I am facing a peculiar problem. The program name is rpc.exe
A command line entry as ...
2
votes
1
answer
119
views
My program takes too long to start when there is an input needed from the user
I'm using Code::Blocks with the GCC compiler to write C programs as a first-year CS student. I encountered a strange issue when using scanf() in my programs.
The program compiles normally, but when I ...
2
votes
0
answers
39
views
Problem Including c files into a codeblocks project
I'm having trouble with a bmp editor project while using codeblocks.
Context: This is a group project I made alongside 2 friends, all the functions work and it's ready to be submitted as a codeblocks ...
1
vote
1
answer
99
views
Building up "Grading System" of a school by using "switch" control statement
I'm a new learner in my coding journey. I was trying to build up a system that can collect numbers and show the Grade according to every individual number. I'm doing it in Code::Blocks. But the system ...
0
votes
1
answer
216
views
How can I fix debugging error in Code::Blocks which uses MSYS2?
I installed gnu GCC and GDB with MSYS2.
This is the command I used:
pacman -Syu
pacman -S --needed base-devel mingw-w64-x86_64-toolchain
I added environment variable "C:\msys64\mingw64\bin" ...
0
votes
1
answer
101
views
Code::Blocks 20.03 - 64 bit Compiler error with C code: undefined reference to `IID_IShellFolder'
I cannot compile the winapi code below using Code::Blocks 20.03 - 64 bit Compiler and get the following error messages:
#include <tchar.h>
#include <windows.h>
#include <commctrl.h>
#...
0
votes
1
answer
146
views
Code::Blocks 20.03 - 64 bit Compiler error
I cannot compile the winapi code below using Code::Blocks 20.03 - 64 bit Compiler and get the following error messages:
#include <tchar.h>
#include <windows.h>
#include <commctrl.h>
#...
0
votes
1
answer
64
views
Get-childitem: Can not get the subfolders from another subfolders to out-gridview: Error Cannot find path because it does not exist
What is the goal of this script?
Need to delete big SQL dump files remotely.
When script is launched, we need to click on ok while parent folder is selected/highlighted.
After then we need click on ...
0
votes
0
answers
50
views
Execution of "...\sandbox.sys" failed Code::Blocks
Recently, I was trying to make very simple program in C about calculating rectangle area and perimeters for my students on Code::Blocks.
I am getting that done by header files and implementation files ...
0
votes
0
answers
32
views
lapack.lib does not install with CodeBlocks
I have installed codeblocks-20.03mingw-setup.exe. I have picked a GNU FORTRAN compiler, but I cannot find the libraries lapack and blas. I tried to reinstall Codeblocks but it didn't work. Does ...
0
votes
0
answers
220
views
How to compile for Linux when on Windows using Code::Blocks?
I have a console app which I want to compile for Linux.
I don't have access to a Linux operating system at the moment, but I really do need to compile this program for as many operating systems as ...
0
votes
0
answers
356
views
Connecting to MySQL in Qt6
I want to connect to MySQL in Qt6, but the connection is not working. My instructor said that you want to run a diesel car with gasoline and that you need to use a different library instead of ...
-2
votes
1
answer
225
views
FreeGLUT undefined references
I have tried to get FreeGLUT and been successful before, but now I get undefined reference errors when running any FreeGLUT apps
entire log:
g++.exe -L"C:\Program Files (x86)\CodeBlocks\MinGW\...
0
votes
0
answers
36
views
I keep getting errors with functions, even though I am following learncpp.com's couse and even copying the code [duplicate]
So far, since I'm still only on Unit 2 in the course (https://www.learncpp.com/) I haven't really learned any types of functions other than int and void. Whenever I use int or void, I always get an ...
-3
votes
1
answer
254
views
The unnecessary red block appearing in my code
I wrote the code up by following the instructions given by cplusplus and I don't why the red block keeps appearing in my code. I've installed the latest version of code blocks and also enabled the ...
0
votes
0
answers
42
views
wxWidgets wxFlexGridSizer not "sizing" with the others
I'm not sure if this is a wxWidgets issue or a Code::Block issue, both or just me... but I have this screen that I rearranged because the buttons in the middle would get hidden by a panel that's ...
0
votes
1
answer
48
views
Ubuntu CodeBlocks move windows around
Story: I am trying to migrate to using Ubuntu (I am aware of the existence of other distros, that is not the focus of the question) and I wanted to install CodeBlocks on it (I am aware that there ...
1
vote
0
answers
74
views
C++ Windows Compatibility Mode full complete List?
I have received help here with setting the compatibility mode for my program via C++. I was looking for a full list of options for this and I have guessed at a lot. Please tell me what the following ...
0
votes
0
answers
90
views
When using RegQueryValueExW how can I get the entire string which is an REG_SZ?
I should get ABCDEFG, but I only got A.
UPDATE: I added my current adjusted code and an example screen shot.
/// UNICODE version
DWORD NEW_dwType;
HKEY NEW_hKey = 0;
char ...
2
votes
1
answer
313
views
Why isn't the %F format specifier working with printf?
I'm encountering an issue while using the printf() function and I'd like to share the details. The two main sources I'm referring to, cplusplus.com and cppreference.com, indicate that I can use the %f ...
0
votes
0
answers
311
views
CodeBlocks Isn't Running On MacOs
I have been struggling to install CodeBlocks. After many attempts and watching some YouTube videos, I finally managed to install it. However, now I'm encountering a problem. When I open it, all I see ...
1
vote
0
answers
66
views
CodeBlock Vs Microsoft Visual Studio Different results compiling the same code
As a beginner in C++, I experimented with two different IDEs, running identical code. While Code Blocks compiled the code smoothly, Microsoft Visual Studio encountered an error. In both cases, I ...
1
vote
1
answer
72
views
How to debug in codeblock?
I am working on C++ and I created a file and put a breakpoint, but when I start debugging, it opens up a terminal, and suddenly it closes it. I am not sure what is wrong with debugging. If I run the ...
0
votes
0
answers
54
views
Using both C99 and C++11 in Code::Blocks 16.01
I recently realized that Code::Blocks (I use 16.01) was not configured to use C++11 (nullptr), but that I also need at least C99 to be present instead of ANSI C. For some reason the Have gcc follow ...
1
vote
1
answer
440
views
Error: id returned 5 exit status when building C++ code in Code::Blocks
I'm encountering an issue in Code::Blocks where attempting to build C++ code results in the error message "Error: id returned 5 exit status," even when there are no syntax errors present in ...
-2
votes
1
answer
273
views
Why does my c++ compiler put trash characters when displaying build messages? [duplicate]
||=== Build: Debug in prac4e2 (compiler: GNU GCC Compiler) ===|
C:\Users\...\producto.cpp||In function ‘void CargarProducto(Producto&)’:|
C:\Users\...\producto.cpp|8|warning: format ‘...
0
votes
1
answer
194
views
Cannot use Debugger in Codeblocks for AVR-Project
I am trying to code a new AVR project in Code::Blocks (using Ubuntu). However, every time I try to build my project the following error message appears:
Current compiler 'GNU GCC Compiler for AVR' ...
0
votes
1
answer
90
views
Cant recognise long long , long double in MinGW on Code::Blocks
I am rather new to programming in C. I am suing Code::Blocks 20.03 with MinGW (GCC) which comes as a default part of CB installation. I tried several times to declare and use long long int with %Ld or ...
0
votes
1
answer
95
views
Code Blocks auto completion working partly
I have a problem with autocompletion in Code Blocks. Let's say that I'm creating my own header file - it has <vector> library - then I'm creating .cpp file and I include there header, I had ...
0
votes
1
answer
122
views
"colour_themes.conf" file isn't entirely working as intended in the editor space
As it says in the title, the colour_themes.conf file when transferred over to default.conf doesn't span the entire editing space for me. The side bar where the number of lines of code are stays white, ...
0
votes
1
answer
168
views
GNU Fortran - Function 'dcosd' has no IMPLICIT type
I'm a newbie in Fortran coding also in GNU Fortran and Code::Blocks.
I've installed codeblocks-20.03mingw-setup on Win10 and now trying to run this piece of code from scratch:
program hello
implicit ...
1
vote
0
answers
46
views
Is it possible for a specific unit / desktop to be unable to execute ofstream?
So I am a second year computer science student and tinkering with a personal project as a practice before our school activity. I am trying to be familiar with the fstream header. Now, I (or my ...
1
vote
2
answers
363
views
Issues with hello world wxWidgets project in Code::Blocks
While I was building the "hello world" project from the official wxWidget site in Code::Blocks, I got the following error:
||=== Build: Debug in wxTest2 (compiler: GNU GCC Compiler) ===|
obj\...
1
vote
1
answer
1k
views
VSCode MSVC installation is once again giving me errors on the include path C++
this has been an ongoing issue with vscode where I keep getting include errors, I've finally reached my tipping point
This is the basic "Hello World" c++ program, as usual, vscode is giving ...
0
votes
0
answers
559
views
how can i fix this debug (no such file)?
/I can't run any code and i recive that/
Build messages :
||=== Build: Debug in tes (compiler: GNU GCC Compiler) ===|
obj\\Debug\\main.o||No such file or directory|
||error: no input ...
1
vote
0
answers
36
views
I can't install libsodium on code blocks for a C program
I'm new to programming and I can't install the libsodium library to make a program in C on code blocks, is this possible? If so, can you help me? thank you very much.
I've looked at quite a few forums ...