Code::Blocks Forums
User forums => Help => Topic started by: barbarello on January 10, 2006, 01:54:11 pm
-
Hi all,
I'm working with
CODEBLOCKS 1.0RC2
wxWidgets 2.6.2
When i create a wxFrame, it's work (compilation and execution) correctly
But if i create a wxDialog, the compilation return 0 error and 0 warning but the execution of exe file send a messagebox :
The process entry point _ZN8wxDialog17MSWProcessMessageEP6tagMSG not found in lib wxmsw26_gcc_cb.dll
I need to copy wxmsw26_gcc_cb.dll into a directory specified by the system 's path (windows or system32), the exe file execute without error.
I think the problem come from my compilations parameters....
Anybody already have this problem or can help me ?
Thanks a lot
-
Hello,
Can you try with the latest nightly build and see if you still have your problem?
Michael
-
You have the same problem as in your last thread.
http://forums.codeblocks.org/index.php?topic=1891.msg14602#msg14602
This is because you still do the same thing. You still link against the dll that comes with CodeBlocks. You should not do that.
Also, you should really abstain from copying around those dlls (in particular when using several different versions of the same dll as you apparently do), because that will certainly run you into problems sooner or later. It is very well possible that Code::Blocks ceases to function because of this, and you will not know why...
Compile your own version of wxWidgets, and either copy exactly one instance with an unambiguous name into a system path, or alternatively, keep one copy per program in the same folder as the programs that require it.
-
Yes problem is the same.
As i explain, I need to work on my project and prefer to come back to this problem later...but the time is come.
Compile your own version of wxWidgets, and either copy exactly one instance with an unambiguous name into a system path, or alternatively, keep one copy per program in the same folder as the programs that require it.
I believe,that's what i've made...But i really sure this error is due to my compilation parameters.
I followed point per point this link :
http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29 (http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29)
Is there anyboby working with the same configuration of mine ?
Sorry for my low english level... :oops:
Thanks for helping
-
You can try Therion's wxWindows 2.6.2 build (http://paginas.terra.com.br/informatica/mauricio/codeblocks/). May be it will work fine for you.
Michael
-
I believe,that's what i've made...But i really sure this error is due to my compilation parameters.
I followed point per point this link :
http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29 (http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.6.1_to_develop_Code::Blocks_%28MSW%29)
The instructions in this article are for building wxWidgets to compile Code::Blocks.
There is nothing wrong with using these libraries for other programs -- except one very important thing.
The VENDOR variable. If you look at your dll's name, you will see that it is still called wxBlahBlah_cb_Blah.dll, i.e. it has the exact same name as the library used by Code::Blocks. This is a problem because two libraries have the same name, but different layouts.
It gets worse if you have a few copies lying around somewhere else in the system path.
If Code::Blocks or any of your self-compiled programs is started, the loader will look for a dll with that name, and it will pick the first one it can find. Which one is found first depends on the dll location, the user and system path settings, the OS version, and the moon phase -- it is a nightmare.
Imagine you install some program that modifies the path variable. Then it might happen that the loader suddenly chooses a dll from another location with the same name but a different layout. That would mean that all of your self-made applications (and Code::Blocks, too) suddenly stop working. You did not change anything, you have no idea why, it just does not work. This is a really nasty condition, and you want to avoid that.
I had a simiar incident once after installing cygwin. The next morning, I turned on the PC, and gaim crashed immediately after startup. There was no apparent reason for that. It crashed every time right after startup. I ran virus scans, reinstalled gaim, I even tried kicking my PC, but that did not help either.
After several days, I found out that it was not gaim's fault at all... Cygwin had silently installed a bad version of zlib.dll in the system path.
So... the solution is to build your own wxWidgets with an unambiguous name (see VENDOR) and either keep exactly one copy in the system path, or distribute one copy with every program.
-
You are really a nice guy to help me !
If I understand correctly :
I need to rebuild my wxWIDGETS with another VENDOR option in command line :
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=cb
But i don't know what are the possible options.....
The DLL named wxmsw26_gcc_cb.dll because the option VENDOR=cb ???
Then each time i'll make a new program I had to add the DLL wxmsw26_gcc_cb.dll with the exe file, and change the system path !! ?
-
The DLL named wxmsw26_gcc_cb.dll because the option VENDOR=cb ???
Yes
Then each time i'll make a new program I had to add the DLL wxmsw26_gcc_cb.dll with the exe file, and change the system path !! ?
No, the other one, and don't touch the path :)
-
You just have to put it in the same dir with your app and that *only* if you create a wxWidgets app based on the "using wxWidgets DLL" template of cb. You can build wxWidgets in numerous ways and use it the way that best fits your needs (monolithic or not, shared or static, unicode or not etc)
-
You are really great people !!
It's boring me to need 6 Mo of DLL for and 140 ko of exe file !!!
In the past i used DEV-CPP/wxWIDGETS and I genrated exe file weighing 2.5 Mo, but don't need anything else....
It's doesn't matter....
Thanks a lot one more time Thomas, Yop, Michael etc.... !!
-
It's boring me to need 6 Mo of DLL for and 140 ko of exe file !!!
If a 2.5 Mb executable without any dlls is what you want, no problem. Just link statically then. :)
-
Is that mean :
My wxWIDGETS own build command line :
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=my_lib
become
mingw32-make -f makefile.gcc USE_XRC=1 STATIC=1 MONOLITHIC=1 BUILD=release UNICODE=0 VENDOR=my_lib
?
-
Yes, if you intend to build a monolithic ( = one big dll) library which includes support for XRC and does not include support for Unicode.