Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: Del Noble on June 05, 2015, 05:06:15 am

Title: My 1st wx Program
Post by: Del Noble on June 05, 2015, 05:06:15 am

Even though Code Blocks has a template for wxWidgets, I’d like to start my application from zero. So, I created an application using the ‘Console Application’ template and added the ‘#include <wx/window.h>’ as the first step, as suggested here [http://docs.wxwidgets.org/stable/overview_helloworld.html]. But I get an error saying :
D:\Dev\Projects\CodeBlocks\wx001\main.cpp:2:23: fatal error: wx/window.h: No such file or directory #include <wx/window.h>
I know that this is not a wx problem, since the ‘wxWidgets Template’ does work, but CB does not have a mailing list to post this question and, thus, I hope someone here can help me set up the project from zero, or point out to me a site that provides the solution to this problem.
 

I added this settings:
Debug
Linker settings = libwxmsw30ud.a
Search Directory -> Compiler = $(#wx)\lib\gcc_dll\mswud
Search Directory -> Linker = $(#wx)\lib\gcc_dll
Search Directory -> Resource compiler = $(#wx)\lib\gcc_dll\mswud


Release
Linker settings = libwxmsw30u.a
Search Directory -> Resource compiler = $(#wx)\lib\gcc_dll\mswu
but, still, no cheese Sad smile
Thanks
Title: Re: My 1st wx Program
Post by: ollydbg on June 05, 2015, 07:43:57 am
You have post the same question in wx maillist, right?
I think it is quite simple to solve your problem.
project1: create a simple console app, and did what have said, it surely failed with build errors.
project2: create a simple wxWidgets app by C::B's wx wizard, then you have a minimal workable project.

Now, compare the compiler command between project2 and project1, you will notice what is missing for project1. Then add them manually. (that is what our wx wizard do automatically for you)

That's simple, right?