Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Modified & Improved wxWidgets Project Wizard
RJP Computing:
Here are my problems with the wizard when compiling VC7.1 toolkit. I choose the monolithic Unicode library as the options.
* It is missing 'Rpcrt4.lib' from the library list.
* The run-time needs to be selected. For Debug it should be 'Mulit-threaded Debug Runtime Library' and for Release it should be 'Mulit-threaded Runtime Library'. This will also make it so that you manually don't need to add the msvcrt[d].lib in the vc8.0 setup.
* I had to add /NODEFAULTLIB:libcmtd.lib to the linker other options. (I think this might be fixed with building the libraries including the static runtime)
* I found out that I built the monolithic libraries without using the static run-time library which I will have to fix and repost wxPack. This will make the above work as expected. When using a static library there should be no reason to include a dll of the runtime. That defeats the purpose in my opinion.
More details to come after I fix the builds of the compiled wxWidgets.
Biplab:
If you add wx_pch.h file in NOPCH mode, it has no effect on PCH generation. It includes wx/wxprec.h file only.
--- Quote from: RJP Computing on January 10, 2007, 03:59:49 pm ---Here are my problems with the wizard when compiling VC7.1 toolkit. I choose the monolithic Unicode library as the options.
* It is missing 'Rpcrt4.lib' from the library list.
* The run-time needs to be selected. For Debug it should be 'Mulit-threaded Debug Runtime Library' and for Release it should be 'Mulit-threaded Runtime Library'. This will also make it so that you manually don't need to add the msvcrt[d].lib in the vc8.0 setup.
* I had to add /NODEFAULTLIB:libcmtd.lib to the linker other options. (I think this might be fixed with building the libraries including the static runtime)
* I found out that I built the monolithic libraries without using the static run-time library which I will have to fix and repost wxPack. This will make the above work as expected. When using a static library there should be no reason to include a dll of the runtime. That defeats the purpose in my opinion.
More details to come after I fix the builds of the compiled wxWidgets.
--- End quote ---
I'm assuming you are compiling an app with MSVC7.1 generated by new wizard.
Problem 1-3 will come as nothing has been added for MSVC 7.1 or 6. So you are getting those errors. I had deliberately skipped adding any compiler options to MSVC 7.1 (some are very similar to MSVC 8 ) as I couldn't test it.
wx Dev team does not suggest us to use static library for MSVC in some cases. I'm quoting the following line from src/common/string.cpp file.
--- Code: ---#if defined(__VISUALC__) && defined(_MT) && !defined(_DLL)
# pragma message (__FILE__ ": building with Multithreaded non DLL runtime has a performance impact on wxString!")
--- End code ---
This warning was one of the reason I took a longer route of embedding manifest file for MSVC 8 to exe file after the build is finished. And I think it would be better if you continue building wxPack with dynamic runtime lib. :D
RJP Computing:
--- Quote from: Biplab on January 10, 2007, 04:30:45 pm ---If you add wx_pch.h file in NOPCH mode, it has no effect on PCH generation. It includes wx/wxprec.h file only.
--- End quote ---
That would be fine but you are not creating the wx_pch.h file at all. It is missing.
--- Quote from: Biplab on January 10, 2007, 04:30:45 pm ---...
I'm assuming you are compiling an app with MSVC7.1 generated by new wizard.
--- End quote ---
Yes I am.
--- Quote from: Biplab on January 10, 2007, 04:30:45 pm ---Problem 1-3 will come as nothing has been added for MSVC 7.1 or 6. So you are getting those errors. I had deliberately skipped adding any compiler options to MSVC 7.1 (some are very similar to MSVC 8 ) as I couldn't test it.
--- End quote ---
OK, well that explains why it doesn't work very well.
--- Quote from: Biplab on January 10, 2007, 04:30:45 pm ---wx Dev team does not suggest us to use static library for MSVC in some cases. I'm quoting the following line from src/common/string.cpp file.
--- Code: ---#if defined(__VISUALC__) && defined(_MT) && !defined(_DLL)
# pragma message (__FILE__ ": building with Multithreaded non DLL runtime has a performance impact on wxString!")
--- End code ---
This warning was one of the reason I took a longer route of embedding manifest file for MSVC 8 to exe file after the build is finished. And I think it would be better if you continue building wxPack with dynamic runtime lib. :D
--- End quote ---
I have done some reading and a bit of testing and have determined that the impact for most uses is minimal. In my opinion you should be able to use the statically linked library with no other files to distribute. (Yes I know the Windows is coming with them more and more) and if you would be willing to use the runtime dll you will be willing to use wxWidgets as a dll as well. So I think this is the best compromise between speed and extra files needed to distribute. :)
Biplab:
--- Quote from: RJP Computing on January 10, 2007, 08:05:19 pm ---
--- Quote from: Biplab on January 10, 2007, 04:30:45 pm ---If you add wx_pch.h file in NOPCH mode, it has no effect on PCH generation. It includes wx/wxprec.h file only.
--- End quote ---
That would be fine but you are not creating the wx_pch.h file at all. It is missing.
--- End quote ---
I found that stupid bug later. Thanks a lot for pointing that out. I'll fix it in next revision. :D
--- Quote from: RJP Computing on January 10, 2007, 08:05:19 pm ---
--- Quote from: Biplab on January 10, 2007, 04:30:45 pm ---wx Dev team does not suggest us to use static library for MSVC in some cases. I'm quoting the following line from src/common/string.cpp file.
--- Code: ---#if defined(__VISUALC__) && defined(_MT) && !defined(_DLL)
# pragma message (__FILE__ ": building with Multithreaded non DLL runtime has a performance impact on wxString!")
--- End code ---
This warning was one of the reason I took a longer route of embedding manifest file for MSVC 8 to exe file after the build is finished. And I think it would be better if you continue building wxPack with dynamic runtime lib. :D
--- End quote ---
I have done some reading and a bit of testing and have determined that the impact for most uses is minimal. In my opinion you should be able to use the statically linked library with no other files to distribute. (Yes I know the Windows is coming with them more and more) and if you would be willing to use the runtime dll you will be willing to use wxWidgets as a dll as well. So I think this is the best compromise between speed and extra files needed to distribute. :)
--- End quote ---
I'm not sure what is the exact performance impact. But if you are using dynamic CRT, then you do not need to use wxwidgets as DLL; you may use static wx lib too. That _DLL flag checks whether CRT is dynamic or not when Multi-threaded option is selected. For more info please visit the following link.
--- Quote ---http://msdn2.microsoft.com/en-us/library/abx4dbyh(VS.80).aspx
--- End quote ---
If you create static lib of wxWidgets using dynamic CRT, only external dependency will be your CRT and therefore you'll be able to solve dll distribution problem. :D
Biplab:
Here is another upgrade. This has some important fixes. So if you are using older revision, please download and use this revision.
Changes:
* Wizard now sets Appropriate wxWidgets lib order. But do not forget to add any necessary additional wx libs (Jpeg, Tiff, expat or regex) if you are using advanced lib (RichText, AUI, etc); wizard will not add them. Thanks to three_minute_hero for pointing this.
* Now XML and XRC lib can be selected separately.
* Wizard now stops compilation of wx_pch.h in Non-PCH project builds (This is a temporary fix, needs Improvement). Thanks to Ryan for pointing this.
* Wizard supports BCC 5.82 Compiler. You can now build wx app with it.
Known Issues:
* Does not support MSVC 7.1 or 6.
* PCH support needs improvement.Some Informations:
BCC 5.82 Compiler: This compiler comes with Turbo C++ Explorer edition. Get it for free from (http://www.turboexplorer.com/cpp). To add the compiler to Code::Blocks, see my video tutorial.
wx lib order: Only 3 libraries are vulnerable to lib orders; RichText, DB_Grid and XRC. Their additional dependencies (partial) are -
* DB_Grid - wxbase_odbc, wxmsw_adv
* RichText - wxbase_xml, wxmsw_adv, wxmsw_html
* XRC - wxbase_xml, wxmsw_adv, wxmsw_html
By the way, you may also need to add JPEG, TIFF, Expat and Regex libraries if you add them. Sorry I could not find out their complete dependency chart. Any help would be greatly appreciated. :D
[attachment deleted by admin]
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version