Author Topic: [solved]msys32 and codeblocks  (Read 4575 times)

Offline visir

  • Multiple posting newcomer
  • *
  • Posts: 76
[solved]msys32 and codeblocks
« on: May 20, 2017, 12:03:09 pm »
Hello. Very new to codeblocks. Want to make codeblocks work with msys32 mingw compiler.

When I first started codeblocks, there was a window where I could select my compiler. How to open that window again?
« Last Edit: May 20, 2017, 07:39:30 pm by visir »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: msys32 and codeblocks
« Reply #1 on: May 20, 2017, 02:21:15 pm »
Settings -> Compiler
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline visir

  • Multiple posting newcomer
  • *
  • Posts: 76
Re: msys32 and codeblocks
« Reply #2 on: May 20, 2017, 02:37:55 pm »
Hm, no, that window could autodetect compilers.

Maybe I'll manage to get it to work, give me a minute. I just need to set paths correctly.

Offline visir

  • Multiple posting newcomer
  • *
  • Posts: 76
Re: msys32 and codeblocks
« Reply #3 on: May 20, 2017, 02:57:50 pm »
This is not very codeblocks related, but maybe somebody here knows.

I have 4 different include folders right now:
C:\msys64\mingw32\include
C:\msys64\mingw32\i686-w64-mingw32\include
C:\msys64\mingw64\include
C:\msys64\mingw64\x86_64-w64-mingw32\include
What's the difference between them?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: msys32 and codeblocks
« Reply #4 on: May 20, 2017, 03:03:44 pm »
For 32 bit MSys2 GCC Compiler I use these settings

Compiler Installation Directory: C:\Apps32\MSys2\mingw32
C Compiler: i686-w64-mingw32-gcc.exe
C++ Compiler: i686-w64-mingw32-g++.exe
Linker for Dynamic Libs: i686-w64-mingw32-g++.exe
Linker for static Libs: ar.exe    (I am NOT sure that this is correct I have yet to make a static lib)

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

Offline visir

  • Multiple posting newcomer
  • *
  • Posts: 76
Re: msys32 and codeblocks
« Reply #5 on: May 20, 2017, 04:51:29 pm »
Okay, made a simple c++ project, it compiles and runs fine.

Can't get debugger to work though.

1) I'm setting breakpoints,
2) in settings -> debugger -> Default -> Executable path I have set full path to gdb.exe,
3) in project -> build options -> debug I have set "Produce debugging symbols -g"
4) set build target to debug
5) rebuild everything just in case

But program ignores all breakpoints and finishes. Did I miss something?

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: msys32 and codeblocks
« Reply #6 on: May 20, 2017, 05:52:49 pm »
please post a full debugger log.
You maybe have to enable the full debugger logging in Settings->Debugger->Common (i do not remember the correct path to the setting, but  it should be there somewhere)

The debugger log is found under the Debugger log tab in the messages panel

greetings

Offline visir

  • Multiple posting newcomer
  • *
  • Posts: 76
Re: msys32 and codeblocks
« Reply #7 on: May 20, 2017, 06:35:06 pm »
Sorry, I was pressing "run" arrow instead of "debug" arrow.

Seems to work now, thanks!