i would like to know how i can use import the wxwidget sample code into codeblocks and start to build it, also how can i setup codeblocks so that it will allow me to view the UI resource with wxSmithUse the associated project wizard for this purpose. File -> New -> Project... -> Pich "wxWidgets" and follow the instructions.
hello in my effort to learn how to use wxWidgets, i've downloaded the wxwidgets code from svn head and was able to build it to install at /var/local
i would like to know how i can use import the wxwidget sample code into codeblocks and start to build it, also how can i setup codeblocks so that it will allow me to view the UI resource with wxSmith
Thanks!
´/usr/local/bin/wx-config --version=2.8 --toolkit=gtk2 --cxxflags´
´/usr/local/bin/wx-config --version=2.8 --toolkit=gtk2 --static=yes --libs´
Yes, you can create "Custom makefile projects".
Search the forum, wiki and docs for details...
Hi, you may find http://arnholm.org/cpde/cpde_20101120.pdf to be of some help.
If you have installed a special version of wxWidgets, in my experience you need to take special care in using the correct "wx-config" when compiling and linking, or else you can get the wrong public one. I have wxwidgets installed under /usr/local, and the way I have been able to make 100% sure I am using the right one, is with the follwing compiler setting (notice the backticks)Code´/usr/local/bin/wx-config --version=2.8 --toolkit=gtk2 --cxxflags´
and in linker optionsCode´/usr/local/bin/wx-config --version=2.8 --toolkit=gtk2 --static=yes --libs´
As for the placement of the wx-config command, where would I put it in C::B ? Is that outlined in the document, thanks!
CodeBlocks needs a painless makefile project importer, I think I am going to stick with NB where I need to import a project using only a makefile. C::B could learn something from NB!Yes, someone should write a project template for custom makefiles, simple as that...
CodeBlocks needs a painless makefile project importer, I think I am going to stick with NB where I need to import a project using only a makefile. C::B could learn something from NB!Yes, someone should write a project template for custom makefiles, simple as that...
The thing is that C::B assumes that you know what you're doing when dealing with custom makefile projects and so the steps are no problem for you.
Importing makefile projects (turning them in C::B native projects) is pretty much impossible, one should write a make implementation to do it right.
Won't happen in C::B, 99%...
well being a Windows software developer, I could also say C::B could assume that I knows what I'm doing with Visual Studio projects, but today there is a importer to make things easy.VS projects are easier to parse, way easier, than Makefiles, that is why there is such a feature. (Someone needed it and have contributed the code to C::B)
I don't know why I need to import a Win32 DLL project so I can work on it from Linux, with all the Win32 compiler pre-processor that don't make sense on Linux, but CB blindly & happily sets up a CB projects anyway.And the imported project compiles without modifications? I doubt...
the "custom" makefile is not something I created, but something someone else created, for CB to assume I know what I am doing is falseI meant that this option is for the people who know what a makefile is and how to write one, so they are comfortable with it and want to use it instead of C::B's native build system.
I guess what I am getting at, is when the folks at C:B change their language and possibly mindset towards creating a makefile importer, nothing will ever get done and it will always seem impossible, but it's not, unless core knowledge left CB with developers who are no longer a part of this project?Hm, it you so desperately need this feature provide a patch?
all i wanted to do was be able to build a open source project like wxWidgets and be able to walk through the code, since I am new too all this (on Linux) asking me to provide a patch is kind of pushing it :P ...i'm trying my best just to get started to make contributions to wxWidget project.But you can do it, see the Jens post...
This works flawlessly for the wxWidgets samples on linux, on windows, I sometimes (always?, do not remember exactly, I use linux almost every time) have to add the options used to build wxWidgets to the makefile-call.
- Create an empty project with the wizard,
- right click the project in the management pane,
- chose "Properties",
- check "This is a custom makefile",
- adjust the makefiles-name and probably its path (if needed, default path is the projects bas path),
- close the "Properties" dialog,
- right click the project in the management pane,
- chose "Build options"
- open the "Make commands" tab (rightmost),
- fix the make commands (most likely needed),
- close the dialog
- right click the project in the management pane,
- click "Add files" or "Add files recursively",
- add the files you want to your project,
- save your project (via menu, context menu or ALT+SHIFT+S)
- Create an empty project with the wizard,
- [...]
right click on project propertiesJens/devguy, might that be something to put into the WiKi?!
select "Build targets" tab
1) correct execution working folder to point to location of binary
2) correct output filename field to contain either a relative path or absolute path with filename
Surely yes.
- Create an empty project with the wizard,
- [...]
right click on project propertiesJens/devguy, might that be something to put into the WiKi?!
select "Build targets" tab
1) correct execution working folder to point to location of binary
2) correct output filename field to contain either a relative path or absolute path with filename
http://wiki.wxwidgets.org/Code::BlocksThanks for this, but I actually meant our WiKi (http://wiki.codeblocks.org)... :lol:
This works flawlessly for the wxWidgets samples on linux, on windows, I sometimes (always?, do not remember exactly, I use linux almost every time) have to add the options used to build wxWidgets to the makefile-call.
- Create an empty project with the wizard,
- right click the project in the management pane,
- chose "Properties",
- check "This is a custom makefile",
- adjust the makefiles-name and probably its path (if needed, default path is the projects bas path),
- close the "Properties" dialog,
- right click the project in the management pane,
- chose "Build options"
- open the "Make commands" tab (rightmost),
- fix the make commands (most likely needed),
- close the dialog
- right click the project in the management pane,
- click "Add files" or "Add files recursively",
- add the files you want to your project,
- save your project (via menu, context menu or ALT+SHIFT+S)
I usually create projects here: C:\Program Files\Code Blocks\projects
[...]Not if it is an existing project.
Can you please explain some of your steps:If the sample project uses frames shouldn't I create an "wxWidgets project" and use wxSmith? I called the project "My" since the cpp files use "MyFrame". Should I copy the sample project files into the same directory as the newly created "My" CB project?
- Create an empty project with the wizard,
On linux the makefile name is makefile.unx and the execution-dir for it is the directory it is locate in.Can you please check the attached screen shots and if wrong let me know what they should be?
- adjust the makefiles-name and probably its path (if needed, default path is the projects bas path),
How do I fix them and what do I set them to?
- fix the make commands (most likely needed),
Which files need to be added to the CB project? Is it enough with the .cpp files?
- click "Add files" or "Add files recursively",