Author Topic: Configure Codeblocks  (Read 557 times)

Offline tuchin

  • Single posting newcomer
  • *
  • Posts: 7
Configure Codeblocks
« on: November 24, 2018, 05:03:30 pm »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 11279
    • Travis build status
Re: Configure Codeblocks
« Reply #1 on: November 24, 2018, 05:19:44 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!]

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6368
    • My Best Post
Re: Configure Codeblocks
« Reply #2 on: November 24, 2018, 06:42:26 pm »
Edit: The below is for MSys2 with 64 bit MinGW GCC!!

Installation directory of
Code: [Select]
C:\msys64\mingw64Works 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++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline tuchin

  • Single posting newcomer
  • *
  • Posts: 7
Re: Configure Codeblocks
« Reply #3 on: November 24, 2018, 09:14:49 pm »
Tim S, thanks for the answer. An error occurred in the console project C++:
Code: [Select]
#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
Code: [Select]
#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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6368
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6368
    • My Best Post
Re: Configure Codeblocks
« Reply #5 on: November 24, 2018, 11:11:40 pm »
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.
« Last Edit: November 25, 2018, 12:04:56 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline tuchin

  • Single posting newcomer
  • *
  • Posts: 7
Re: Configure Codeblocks
« Reply #6 on: November 25, 2018, 09:17:14 am »
I already work with a directory MSYS64/mingw64 like yours. I use MSYS2.

Offline tuchin

  • Single posting newcomer
  • *
  • Posts: 7
Re: Configure Codeblocks
« Reply #7 on: November 25, 2018, 09:22:15 am »
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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6368
    • My Best Post
Re: Configure Codeblocks
« Reply #8 on: November 25, 2018, 09:36:49 am »
Do the MSys2 Upgrade command of
Code: [Select]
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
Code: [Select]
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.
« Last Edit: November 25, 2018, 09:50:17 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline tuchin

  • Single posting newcomer
  • *
  • Posts: 7
Re: Configure Codeblocks
« Reply #9 on: November 25, 2018, 07:51:43 pm »
Thank you very much! Reinstalled msys2, entered the commands that you specified, and everything worked out!

Offline tuchin

  • Single posting newcomer
  • *
  • Posts: 7
Re: Configure Codeblocks
« Reply #10 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6368
    • My Best Post
Re: Configure Codeblocks
« Reply #11 on: November 25, 2018, 09:32:35 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
Code: [Select]
pacman -S --needed mingw-w64-x86_64-toolchain

Code: [Select]
pacman -S --help
or
Code: [Select]
pacman --help

Tim S.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6368
    • My Best Post
Re: Configure Codeblocks
« Reply #12 on: November 25, 2018, 11:33:25 pm »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline tuchin

  • Single posting newcomer
  • *
  • Posts: 7
Re: Configure Codeblocks
« Reply #13 on: November 27, 2018, 07:25:36 am »
Thank you very much! Very necessary information!