Code::Blocks Forums

User forums => Help => Topic started by: Mvice21 on July 05, 2021, 06:16:51 pm

Title: Can't start a project due to some unknown problems
Post by: Mvice21 on July 05, 2021, 06:16:51 pm
I have just installed "codeblocks-20.03mingw-setup.exe" on Windows 10 under 'G:\CodeBlocks'. My C: is occupied and have little space. I also have Microsoft Visual Studio 2019 IDE which has C++ compiler. But I want to create windows forms and to write code for it. Visual Studio offers me C# for this. I don't want C#. I want C++. So I try Code::Blocks.

I have successfully installed it onto SSD. I launched it and tried to start Win32 GUI project. As soon as I pressed 'Finish' in the wizard the program reported me an error:

(https://i.ibb.co/hYcqscS/kyrfhbv.png)
(https://i.ibb.co/483DM3r/kyrfhbvhe.png)

What's going on here? Why can't I start it?
Title: Re: Can't start a project due to some unknown problems
Post by: oBFusCATed on July 05, 2021, 06:27:14 pm
What path have you selected as the output for the project?
Title: Re: Can't start a project due to some unknown problems
Post by: Mvice21 on July 05, 2021, 06:33:14 pm
path_1:
(https://i.ibb.co/t40ZMRS/image.png)
path_2:
(https://i.ibb.co/g3R7gfN/image.png)

Do I have to select strict file path? Here: Link (https://pluscplus.blogspot.com/2011/12/first-gui-application-in-code-blocks.html#:~:text=%20First%20GUI%20application%20in%20Code%20Blocks%20,the%20main.cpp%20file%20that%20contains%20the...%20More%20) it says that I don't have to type any specific path.
Title: Re: Can't start a project due to some unknown problems
Post by: oBFusCATed on July 05, 2021, 06:43:40 pm
Set something valid in the "folder to create the project in" field and it will work.

Interesting:
1. why "next" is enabled in this case.
2. why you're ignoring all the text on this page and pressing blindly next :)
Title: Re: Can't start a project due to some unknown problems
Post by: Mvice21 on July 05, 2021, 06:48:43 pm
I have selected a folder into which to put files. Now it works. Ok.
2. I ignored it because in  Here (https://pluscplus.blogspot.com/2011/12/first-gui-application-in-code-blocks.html#:~:text=%20First%20GUI%20application%20in%20Code%20Blocks%20,the%20main.cpp%20file%20that%20contains%20the...%20More%20) it says that it is enough to just enter project name and to press next.

In prior dialog window I chose "dialog based" project type.
Title: Re: Can't start a project due to some unknown problems
Post by: Mvice21 on July 05, 2021, 06:51:17 pm
Tell me, oBFusCATed, is "Win32 GUI project" the right project if I want to create special window, to put there memo1 text field, buttons, radio boxes, checkboxes etc.. ? How to work with windows forms? What type of project to start?
Title: Re: Can't start a project due to some unknown problems
Post by: oBFusCATed on July 05, 2021, 07:50:00 pm
What do you mean by "windows forms"? The official API behind this name is a C#/.net based one (and probably already deprecated and replaced by many others).
If you want to make a GUI application using the Win32 API, I guess the project type you're currently using is fine. :)
Title: Re: Can't start a project due to some unknown problems
Post by: Mvice21 on July 06, 2021, 01:37:47 pm
There is a way to use "gooey" GUI in a C++ using wxWidgets framework. One amateur is showing how to use it in MS Visual Studio: https://www.youtube.com/watch?v=FOIbK4bJKS8 (https://www.youtube.com/watch?v=FOIbK4bJKS8)

Isn't it the same in CodeBlocks? I saw wxWidgets icon in projects wizard menu.
Title: Re: Can't start a project due to some unknown problems
Post by: Miguel Gimenez on July 06, 2021, 01:58:19 pm
You can use the wxWidgets project wizard and then wxSmith to create your application, but before you must download the binary wxWidgets library (if it exists for your compiler) or compile it yourself.

For the latter you can use the guide in the wiki (https://wiki.codeblocks.org/index.php/Installing_Code::Blocks_from_source_on_Windows#Build_wxWidgets_Support_Library)