Page 1 of 1

wxCrafter and wxWidgets

Posted: Thu Dec 12, 2019 1:42 pm
by Landslyde
Before I got wxCrafter, I built wxWidgets-3.1.3 with MinGW 8.1.0. I built for both Debug and Release, using this guide found here.

Code: Select all

mingw32-make -f makefile.gcc SHARED=0 BUILD=debug MONOLITHIC=0
mingw32-make -f makefile.gcc SHARED=0 BUILD=release MONOLITHIC=0
The tutorial eranif helped me understand last night is the one I'm trying to run, and I can't figure out what flag(s) to use for wxWidgets or where to put them so that wxCrafter can actually Build and run the small GUI. I'm new to C++ and would really appreciate help with this. Thank you.

Re: wxCrafter and wxWidgets

Posted: Thu Dec 12, 2019 3:00 pm
by DavidGH
Hi,

This isn't the best place to discuss wxWidgets things (instead there's wxForum, and #wxwidgets on IRC) but:
There's a simple sizer demo here which is well worth going through (though it doesn't mention the more-recent sizer types)
And of course there's a wxSizer docs page.

Regards,

David

Re: wxCrafter and wxWidgets

Posted: Thu Dec 12, 2019 3:37 pm
by Landslyde
I understand that, David. But I bet you and several others know what compiler flags a person needs for wxWidgets to work with wxCrafter. So I'll just hang around here and see if anyone is willing to help me. If not, then I'll keep using Qt for my C++ learning. It works right out of the box. But the thing with using that is, it isn't pure C++ like this is. While it's an excellent framework, and a whole lot of people use it, I'm trying my best to NOT be one of them. So maybe someone here will assist me in getting these flags set. If not today, then maybe tomorrow...or the next day, etc. It's a shame that people seem to think that everyone is on the same level as they are. I'm a C++ beginner, and I don't know so much, yet. I'm just asking for some help, man, help that I know can come from here. And if not, then I've made a mistake. No harm. No foul.

Re: wxCrafter and wxWidgets

Posted: Thu Dec 12, 2019 4:35 pm
by DavidGH
Apologies: I misunderstood your post. I thought (having read the previous thread) that you were asking about sizer flags, not compiler/linker ones.

I don't use Windows/mingw so I can't answer your question. But just to mention, it's CodeLite that will build your program, not wxCrafter. wxCrafter is CodeLite's form designer; it is where you design the gui of your program, but it doesn't try to compile or link it.

It might help to add that you can see and change CodeLite's compiler/linker settings for your active project by clicking the spanner icon in the Workspace View, then looking at the Compiler and the Linker sub-pages.

Re: wxCrafter and wxWidgets

Posted: Thu Dec 12, 2019 5:50 pm
by Landslyde
And my apologies for not making my post more clear.

I'm fully aware that wxCrafter is just the GUI designer and has no compiling capabilities. But I didn't make that clear enough, hence my asking for help on the compiler flag settings with no reference to CodeLite. I just thought everyone.... Oh well, my bad.

I absolutely need help setting the proper flags (in CodeLite) for MinGW 8.1.0. That's what I'm asking for, some help getting that done. And this is the error I get when I try to compile and run the wxCrafter Form from inside CodeLite:

Code: Select all

wx-config Error: No valid setup.h of wxWidgets has been found at location: C:/wxWidgets-3.1.3/lib/gcc_dll/mswud/wx/setup.h -mwindows
That's the error I'm getting. However, the file exists:

Image

In truth, I'm lost. Lost as hell, and this just keeps getting more and more convoluted.

Re: wxCrafter and wxWidgets

Posted: Thu Dec 12, 2019 6:04 pm
by DavidGH
wx-config is looking at:
C:/wxWidgets-3.1.3/lib/gcc_dll/mswud/wx/setup.h
but you have a setup.h in C:/wxWidgets-3.1.3/lib/gcc_lib/mswud/wx/

I would guess you need to alter the entries in CodeLite's Compiler and Linker settings to match the filesystem reality.

Re: wxCrafter and wxWidgets

Posted: Thu Dec 12, 2019 6:12 pm
by Landslyde
Right you are. Sorry, David. I'm just tired, I guess. Mom's in ICU and I'm worn out from the back and forth.

If you look at my initial post here, you'll see I opted NOT to use DLL files when I compiled wxWidgets: shared=0

So I need to know how to set in CodeLite for the compiler to recognize my Unicode Build. I guess that's what I want. Because it seems to me that the compiler is looking for a DLL dir (gcc_dll) that doesn't exist.

I tried this but got a LOT of errors:

Image

Here are the errors: https://pastebin.com/kBdd4XEB

Re: wxCrafter and wxWidgets

Posted: Thu Dec 12, 2019 6:56 pm
by DavidGH
So I need to know how to set in CodeLite for the compiler to recognize my Unicode Build. I guess that's what I want. Because it seems to me that the compiler is looking for a DLL dir (gcc_dll) that doesn't exist.
Exactly.

To give a sensible answer is hard when I don't know what you've already done. Did the CodeLite Wizard run when you first started CodeLite? If so, did it find your mingw? If not, run it again (Help > Run the Setup Wizard). You can also look in Settings > Build Settings and make sure the entries are valid.

I assume you created a Workspace and added a project to it, the one that you are now trying to build. If not, you need to do those things.

Finally, if the problem persists, look in your project's Workspace-View Compiler and Linker settings. and make sure they reflect the reality of your filesystem and mingw install. If you still have a problem, please post or pastebin screenshots of the Compiler and the Linker settings and/or attach a zip of your project/workspace.