News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Configure Codeblocks

Started by tuchin, November 24, 2018, 05:03:30 PM

Previous topic - Next topic

tuchin

Windows 10 Home 64bit. Using MSYS, I downloaded the MinGW distribution, as well as everything needed to create GTK programs. In the MSYS directory, I got the mingw64 directory. I transferred this directory to the C drive, then installed Codeblocks using the installer codeblocks-17.12-setup.exe. In the Settings-Compiler-Search Directory I select C:\mingw64\bin - I receive a message that the compiler was not found. Although in this directory there are gcc.exe, g ++. Exe, c ++. Exe, cmake.exe and others. Help, please, correctly configure the codeblocks.

oBFusCATed

Quote from: tuchin on November 24, 2018, 05:03:30 PM
C:\mingw64\bin - I receive a message that the compiler was not found.
I guess we should add explicit check and popup a message box when people do this.
In the dialog where you've entered this path is explicitly stated that you should omit the bin from the path!!!
Read please.
(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!]

stahta01

Edit: The below is for MSys2 with 64 bit MinGW GCC!!

Installation directory of
C:\msys64\mingw64
Works for me.

C Compiler: x86_64-w64-mingw32-gcc.exe
C++ Compiler x86_64-w64-mingw32-g++.exe
Linker for Dyn. x86_64-w64-mingw32-g++.exe

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

tuchin

Tim S, thanks for the answer. An error occurred in the console project C++:#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}
C:/msys64/mingw64/lib/gcc/x86_64-w64-mingw32/8.2.0/include/stddef.h:1:15: fatal error: stddef.h: No such file or directory. An error occurs on a line #include_next <stddef.h>in file c:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\8.2.0\include\stddef.h. How to fix it?

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

#5
Are you using MSys2 or MSys?

[If using MSys2,] Did you do the stupid thing you said by moving the files manually instead of using the MSys2 pacman installer?

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

tuchin

I already work with a directory MSYS64/mingw64 like yours. I use MSYS2.

tuchin

I did not move the directory mingw64 in the directory msys64, but simply copied it. After your message, the copied directory c:\mingw64 was deleted and started working with the directory in the directory msys64.

stahta01

#8
Do the MSys2 Upgrade command of

pacman -Syuu


To make sure your MSys2 installation is up to date.

After you get that done correctly.
Edit: You might need to kill the pacman.exe process to do the update https://winaero.com/blog/kill-process-windows-10/

Do

pacman -S mingw-w64-x86_64-gcc

to reinstall the GCC Compiler that must be damaged by you copying files around.

And, post a build log if you still have problems after that.

Tim S.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

tuchin

Thank you very much! Reinstalled msys2, entered the commands that you specified, and everything worked out!

tuchin

I have additional questions:
1. Did not find the gdb debugger in msys64\mingw64. How to install it?
2. How can I get information about all the parameters of pacman in msys2?
3. I would like to learn how to make gui using GTK+. When I tried to make a project GTK+, the codeblock requested the location of the files for creating the GTK application ($GTK). I did not find the directory GTK in msys64\mingw64. Tell me, please, how to set up a codeblock to create a project of the GTK?

stahta01

Quote from: tuchin on November 25, 2018, 08:57:07 PM
I have additional questions:
1. Did not find the gdb debugger in msys64\mingw64. How to install it?
2. How can I get information about all the parameters of pacman in msys2?
3. I would like to learn how to make gui using GTK+. When I tried to make a project GTK+, the codeblock requested the location of the files for creating the GTK application ($GTK). I did not find the directory GTK in msys64\mingw64. Tell me, please, how to set up a codeblock to create a project of the GTK?

Post a link to the website with the example GTK code you want to run; when I have time will see if I can figure it out once more.
Note: I believe the GTK and MSys2 might have already been answered in this forum. So, I would suggest searching.

To install the normal full MinGW 64 toolchain run

pacman -S --needed mingw-w64-x86_64-toolchain



pacman -S --help

or

pacman --help


Tim S.

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

stahta01

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

tuchin

Thank you very much! Very necessary information!