User forums > Help
Compiled wxWidgets executables will not run.
jon4514:
All,
I agree with the last post. I do not think that it is an IDE problem. But, I also do not think that it was a problem with my source because the wizard generated example would not work. I think the key is that you have to get wxWidgets compiled with the correct configuration and use the correct settings in the IDE.
I figured out my problem thanks to Tim (thanks for getting me out of the rut I was stuck in). I had been using a setup of Code::Blocks that had a lot of utilities with it in a folder I carried around on a portable hard drive. When I switched to use wxWidgets code in windows, I copied this folder to my hard drive and tried to fix the compiler settings to point to a new compiler installed locally. The problem is that the settings reverted back the to old complier in the the Code::Blocks directory. The effect was that I was compiling wxWidgets with a much newer GCC than my codes compiled in code::blocks. I definitely think (I am not an expert on Code::Blocks or xxWidgets) that wxWidgets should be compiled with GCC 3.4.x and not 4.2. When I used 4.2, I would get a lot of warnings where as 3.4.x compiled with few warnings.
After fixing the compiler configuration and recompiling wxWidgets, the basic wxWidgets example worked fine. All that is left for me to do figure out what changes were made to the new version of wxWidgets that keep my old code from compiling in Windows (but this certainly isn't appropriate for the C::B forms).
In the end I used:
wxWidgets 2.8.4 compiled in GCC 3.4.4.
Thanks everyone for your help,
Jonathan
Biplab:
--- Quote from: jon4514 on September 28, 2007, 07:09:18 pm ---When I used 4.2, I would get a lot of warnings where as 3.4.x compiled with few warnings.
--- End quote ---
Add -Wno-attributes to the command line. This would reduce the warnings.
--- Code: ---mingw32-make -f makefile.gcc CXXFLAGS="-Wno-attributes" ...
--- End code ---
Replace ... with rest of the command line. :)
eckard_klotz:
Hello Biplab.
Don't take me wrong, I din't want to say use DevCpp instead of Code::Blocks. You are absolutly right if you say:
--- Quote ---You should remember one point. Your IDE is not responsible for your good or bad program. IDEs are interface to the compilers and it solely depends on the users how they drive the compiler through IDE. So if you use garbage settings, you'll get a garbage output (exe file in this case).
--- End quote ---
But if I use an alternative IDE to complie my sources and the program works I don't have to search the error in my source-code, do I?
It took me long frustrating time to find out, that the reason was not a change in wxWidgets-functionalty (because evrything worked fine under wxWidgets 2.6.x).
Now I now I have to change the C::B project-settings (the "garbage settings" made by the project-wizzard of C::B). But it is possible to change all options? For example where do I change the wxWidgets library-settings I made with the project-wizzard? Why are the library-names inserted by the wizzard not the same as in the lib-directory?
Regards,
Eckard Klotz.
Biplab:
--- Quote from: eckard_klotz on October 01, 2007, 06:35:26 am ---Now I now I have to change the C::B project-settings (the "garbage settings" made by the project-wizzard of C::B). But it is possible to change all options? For example where do I change the wxWidgets library-settings I made with the project-wizzard? Why are the library-names inserted by the wizzard not the same as in the lib-directory?
--- End quote ---
I would like to see which library names are not matching with the libraries present in lib directory. Honestly, if there is any bug I'd be happy to fix it. :)
eckard_klotz:
Hello Biplab
This are the library-names created by C::B (build 4421 fom Aug 28 2007)
--- Quote --- libwxmsw28_xrc.a
libwxmsw28_aui.a
libwxmsw28_dbgrid.a
libwxbase28_odbc.a
libwxmsw28_media.a
libwxbase28_net.a
libwxmsw28_gl.a
libwxmsw28_qa.a
libwxbase28_xml.a
libwxmsw28_adv.a
libwxmsw28_html.a
libwxmsw28_core.a
libwxbase28.a
libwxpng.a
libwxjpeg.a
libwxtiff.a
libwxzlib.a
libwxregex.a
libwxexpat.a
--- End quote ---
And this are the librarys in the lib-folder of the installed wxWidgets-devpak(2.8.4)
--- Quote --- libwxexpat-2.8.a
libwxjpeg-2.8.a
libwxpng-2.8.a
libwxregex-2.8.a
libwxtiff-2.8.a
libwxzlib-2.8.a
libwx_base-2.8.a
libwx_base_net-2.8.a
libwx_base_odbc-2.8.a
libwx_base_xml-2.8.a
libwx_msw_adv-2.8.a
libwx_msw_aui-2.8.a
libwx_msw_core-2.8.a
libwx_msw_dbgrid-2.8.a
libwx_msw_gl-2.8.a
libwx_msw_html-2.8.a
libwx_msw_qa-2.8.a
libwx_msw_richtext-2.8.a
libwx_msw_xrc-2.8.a
--- End quote ---
Is there a posibility to adjust the default-names by myself? Because if you define them hard in the source-code and in the next devpak they change again you are the only one who can help.
Regards,
Eckard Klotz.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version