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.
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.
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.
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?
Post a full rebuild log.
http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php/FAQ-Compiling_(errors)#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)
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.
I already work with a directory MSYS64/mingw64 like yours. I use MSYS2.
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.
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/ (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.
Thank you very much! Reinstalled msys2, entered the commands that you specified, and everything worked out!
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?
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.
https://github.com/stahta01/cb_misc/blob/master/Notes/MSys2/Setting%20up%20MSys2%20for%20using%20GTK3%20with%20external%20CodeBlocks%20IDE.txt (https://github.com/stahta01/cb_misc/blob/master/Notes/MSys2/Setting%20up%20MSys2%20for%20using%20GTK3%20with%20external%20CodeBlocks%20IDE.txt)
Link to directions I wrote a while back on this subject.
Tim S.
Thank you very much! Very necessary information!