Author Topic: Code::Blocks doesn't work  (Read 7641 times)

Offline PsychadelicGumballMachine

  • Multiple posting newcomer
  • *
  • Posts: 15
Code::Blocks doesn't work
« on: March 19, 2022, 05:53:01 pm »
I am starting an online program learning C programming. The instructor says he recommends CodeBlcoks to write C programs.  I have heard of codeblocks before but never got it to work on my laptop. I am trying again on my desktop.  i followed all of the instructions completely, exactly the same as the instructor in the video, and yet I get this error message when trying to start a new project (this is merely to test code blocks):
Create new project→Console Application→C→called it Dummy→my compiler is GNU GCC Compiler (I've also tried CYGWIN)→Finish

wxWidgets Debug Alert
A debugging check in this application has failed.
../../src/common/file.cpp(361): assert""(pBuf != _null) && IsOpened()""failed in Write().

If I hit Stop, the program freezes for a moment, then closes by itself.

What does this mean and how to I fix it?

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Code::Blocks doesn't work
« Reply #1 on: March 19, 2022, 06:32:28 pm »
Where are you saving the project? Are there spaces or non-ASCII symbols in the path? Do you have write permissions in the destination folder?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Code::Blocks doesn't work
« Reply #2 on: March 19, 2022, 07:41:45 pm »
Link to the C::B FAQ https://wiki.codeblocks.org/index.php/FAQ

But, I did not see anything that applied for the OP problem; other than the path having spaces or non ASCII in it as has already been suggested.

Edit: If the OP, original poster, is using Win11 then there might be a need for the OP to use a nightly build because there was a weird Win11 bug; but, I forgot what it was.

Tim S.
« Last Edit: March 19, 2022, 07:44:27 pm by stahta01 »
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 PsychadelicGumballMachine

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Code::Blocks doesn't work
« Reply #3 on: March 19, 2022, 08:23:27 pm »
Where are you saving the project? Are there spaces or non-ASCII symbols in the path? Do you have write permissions in the destination folder?

1) Nowhere. I don't get a chance to save it.  Instead of hitting stop, I hit continue and it says:
Warning
Couldn't save project (whatever I called it)
(Maybe the file is Write-protected?)

2) No. I always just save it as Dummy as that was the example given in the tutorial I watched.

3) Not sure.  How do I find out if I have write permissions?  Is the fact that the warning is asking if it's write-protected mean I don't?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Code::Blocks doesn't work
« Reply #4 on: March 19, 2022, 08:42:31 pm »
https://wiki.codeblocks.org/index.php/Creating_a_new_project

What did you put in "Folder to create project in"?

Edit: Or did the error happing sooner than that screen?
Edit2: We need Code::Blocks version and operating system info esp. if it happen before you put in the path to create project in.

Tim S.
« Last Edit: March 20, 2022, 12:47:12 am by stahta01 »
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 PsychadelicGumballMachine

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Code::Blocks doesn't work
« Reply #5 on: March 20, 2022, 04:25:02 pm »
First of all, thanks for getting back to me with help, it's very much appreciated.

Folder to create project in was left blank as it was not mentioned by the tutorial presenter.

Operating System is Windows 10

About information:
Version 20.03-r11983
SDK Version: 2.0.0
Scintilla Version: 3.7.5

wxWidgets Library (wxMSW port)
Version 3.1.3 (Unicode: wchar_t, debug level: 1),
compiled at Nov 1 2019 18:53:26

Runtime version of toolkit used is 10.0.


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Code::Blocks doesn't work
« Reply #6 on: March 20, 2022, 04:44:39 pm »
So, put something in it that is correct I suggest creating an folder like CB_Projects under your user folder.

Something like "C:\Users\USERNAME\CB_Projects"; Note: I would create the folder outside of Code::Blocks using the file explorer.

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 PsychadelicGumballMachine

  • Multiple posting newcomer
  • *
  • Posts: 15
Re: Code::Blocks doesn't work
« Reply #7 on: March 20, 2022, 05:53:44 pm »
That worked.  No error messages and I was able to start the project, granted it's just a dummy to test it, but it worked.

Thanks for all the help everyone.