User forums > Help
willling to use codeblocks and wxwidgets
nesquik:
Thanks for the answer Christopher and Thomas
Indeed Thomas you are right, I didn’t read the first lines.
No I don’t need to compile codeblocks from source. So I won’t be needing the codeblocks.cbp project.
But I suppose to work with wxwidgets I do need to compile wxwidgets with Code? :
set path=c:\mingw\bin;c:\mingw\mingw32\bin
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
I want to have an IDE which I can use to learn working with C++ and to build GUI –application and use the SDK for C++ that comes with the software I use now. So I would like to start with a simple hello world progam like http://wxwidgets.org/docs/tutorials/hworld.txt
Christopher; those three directories, GNUWIN32, WXMSW, WXUSINGDLL
are not in my codeblocks nor wxwidget directories?
I will uninstall codeblocks and wxwidgets and try the nightly build as explained by Thomas.
MortenMacFly:
--- Quote from: nesquik on July 07, 2006, 01:46:46 pm ---Christopher; those three directories, GNUWIN32, WXMSW, WXUSINGDLL
--- End quote ---
IMHO these are defines, passed to the compiler while compiling the wxWidhgets libs/applications and not directiories.
nesquik:
--- Quote ---IMHO these are defines, passed to the compiler while compiling the wxWidhgets libs/applications and not directiories
--- End quote ---
ok didn't get that at first
I have those defines in the build options now
thomas:
--- Quote ---But I suppose to work with wxwidgets I do need to compile wxwidgets with Code? :
set path=c:\mingw\bin;c:\mingw\mingw32\bin
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1 clean
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1
--- End quote ---
This is one way of doing it (the easiest one, to start with). There are other ways of building wxWidgets (can be built as static library or several smaller libraries, too), but monolithic shared is the easiest and least error-prone thing to do.
You will get one huge DLL, which means that when writing your own programs, you will have to make sure that WXUSINGDLL is defined (as stated by Christopher), or you will get a thousand strange linker errors. Also, you must have wxUSE_UNICODE defined (because you're building a Unicode library).
The project wizard should take care of that if you click on the right buttons, but it is always good to check again under build options.
Also, you will have to copy your DLL to either a system folder (or any folder that is in the path) or you will have to put a copy into the same folder as the applications you build. The latter is preferrable, as it prevents possible dll conflicts.
thomas:
--- Quote ---Do you mean in the same directroy as the "exe"?
--- End quote ---
Yes, either that, or you can copy it to a system directory (C:\Windows or something).
However, behold the dangers of Dll Hell when copying anything to a system directory.
Keeping one separate copy with the executable defeats the advantage of a dll (saving space), and it is tedious. However, it is bulletproof, too. Copying dlls to a system folder will work nicely for a long time, but one day in the future (possibly never), you will shoot your foot.
I had such a thing happen with Cygwin and Gaim about a year ago. After installing Cygwin, Gaim would crash every time at startup (it had worked all the time before). There was absolutely no reason why it should suddenly do that. I tried everything to get it to work again, in vain.
As it turned out (after a long, long time spent searching), it was a dll conflict, and removing the offending Cygwin dll from path made Gaim work like a charm again.
Such things happen rarely, but they are extremely annoying if they do (because you have no clue what's wrong). Therefore, I recommend to people to avoid copying DLLs to system dirs.
--- Quote ---so I opened a project using the wxwidgets application an I build it and got:
--- End quote ---
You missed that:
--- Quote from: thomas on July 07, 2006, 02:51:02 pm ---Also, you must have wxUSE_UNICODE defined (because you're building a Unicode library).
--- End quote ---
The program is compiled non-Unicode and the linker does not find any non-Unicode functions because the functions in the library are Unicode ones (whenever you see a lot of __imp__blahblah__STRING_blah errors, it's almost certain a Unicode/non-Unicode problem). Add wxUSE_UNICODE to your compiler defines, and it will work.
Navigation
[0] Message Index
[*] Previous page
Go to full version