Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Modified & Improved wxWidgets Project Wizard

<< < (2/41) > >>

TDragon:
Aside from throwing in a few libraries I don't really need (jpeg, tiff, etc.), this version works admirably well. My apologies for the earlier confusion.

Tested:
GCC, Debug, Shared, Multi-Lib, Non-Unicode
GCC, Release, Shared, Multi-Lib, Non-Unicode

Kudos!

Biplab:

--- Quote from: TDragon on December 25, 2006, 04:17:28 pm ---Aside from throwing in a few libraries I don't really need (jpeg, tiff, etc.), this version works admirably well. My apologies for the earlier confusion.

Tested:
GCC, Debug, Shared, Multi-Lib, Non-Unicode
GCC, Release, Shared, Multi-Lib, Non-Unicode

Kudos!

--- End quote ---

Thanks for your reply.  :D

jpeg, tiff libs are sometimes necessary for proper linking of application written in wxWidgets. Therefore I have added most of the libraries to avoid flood of errors. Sometimes a number of errors are generated if you don't add them.

Unfortunately, if some libraries or some other options are added to Global scope in the Code::Blocks project file, they do not show up in the Build Options dialog. Thus you didn't find other libs. If you open the .cbp file with a Text editor, you'll find a number of win32 specific libraries have been added. Though not all of the libraries are necessary to compile a simple application but they were necessary to support other compilers.

Also thanks for testing the wizard.  :D

TDragon:

--- Quote from: biplab on December 25, 2006, 04:51:23 pm ---jpeg, tiff libs are sometimes necessary for proper linking of application written in wxWidgets. Therefore I have added most of the libraries to avoid flood of errors. Sometimes a number of errors are generated if you don't add them.

--- End quote ---
Using GCC, wxbase28, wxmsw28, and wxmsw28_adv are all that I need to build and run one of my wxWidgets projects using the wxWidgets DLLs. None of the additional libraries from the wxWidgets lib directory appear to be necessary, nor do any of the Win32 libs. Conversely, most if not all of these additional libraries are necessary when statically linking wxWidgets.

If this is not the case for compilers other than GCC, then I would expect a well-designed wizard to distinguish among the various compilers and set the options accordingly.

Biplab:

--- Quote from: TDragon on December 25, 2006, 07:22:50 pm ---
--- Quote from: biplab on December 25, 2006, 04:51:23 pm ---jpeg, tiff libs are sometimes necessary for proper linking of application written in wxWidgets. Therefore I have added most of the libraries to avoid flood of errors. Sometimes a number of errors are generated if you don't add them.

--- End quote ---
Using GCC, wxbase28, wxmsw28, and wxmsw28_adv are all that I need to build and run one of my wxWidgets projects using the wxWidgets DLLs. None of the additional libraries from the wxWidgets lib directory appear to be necessary, nor do any of the Win32 libs. Conversely, most if not all of these additional libraries are necessary when statically linking wxWidgets.

--- End quote ---

To build an Win32 gui app, you need several libraries from Windows SDK. wxWidgets apps can't just be compiled only with wxbase, wxmswcore and wxmsw28_adv. Additional libraries are added by linkers. Try equivalent linker option of /NODEFAULTLIB (exists in MSVC and I don't know whether there are any equivalent option in GCC) in gcc and see which libraries it asks.


--- Quote from: biplab on December 25, 2006, 04:51:23 pm ---Unfortunately, if some libraries or some other options are added to Global scope in the Code::Blocks project file, they do not show up in the Build Options dialog.

--- End quote ---

I mentioned it to inform you that you may not see the couple of libraries that are added to your wxWidgets project even with the old wizard. These libraries are - comctl32, gdi32, ole32, oleaut32, uuid but you will not see them until you open the Code::Blocks Project file with Notepad. These are essential libraries and work for the minimal app. If the application uses any File Open/Save or any other common dialogs, you need to add comdlg32, for odbc related app add odbc32, for any network related calls you need wsock32, so on and so forth. So better add most of the common libraries otherwise user has to add them manually.


--- Quote from: TDragon on December 25, 2006, 07:22:50 pm ---If this is not the case for compilers other than GCC, then I would expect a well-designed wizard to distinguish among the various compilers and set the options accordingly.

--- End quote ---

The wizard first adds common essential libraries and then adds compiler specific libraries, if any, in the project file. E.g., you need to add import32.lib, cw32mti.lib if you are using Borland C++ 5.5.1 compiler. You won't find them if you are using any other compilers.

TDragon:

--- Quote from: TDragon on December 25, 2006, 07:22:50 pm ---Using GCC, wxbase28, wxmsw28, and wxmsw28_adv are all that I need to build and run one of my wxWidgets projects using the wxWidgets DLLs. None of the additional libraries from the wxWidgets lib directory appear to be necessary, nor do any of the Win32 libs.

--- End quote ---
"Read my lips." If this were not the case, I'd expect the following command line, copied and pasted directly from the Build log, to kick up a few errors:

--- Code: ---mingw32-g++.exe -LE:\Libraries\wxMSW-2.8.0\lib\gcc_dll  -o test.exe main.o app.o    -lwxmsw28d_core -lwxbase28d -lwxmsw28d_adv

--- End code ---
But there are none, and the resulting executable works without problems. So also does the more complex project I alluded to earlier, which has many more files' worth of code. You might notice that MinGW's "-mwindows" option is unnecessary to successfully build and run it.


--- Quote from: biplab on December 26, 2006, 04:49:03 am ---Try equivalent linker option of /NODEFAULTLIB (exists in MSVC and I don't know whether there are any equivalent option in GCC) in gcc and see which libraries it asks.

--- End quote ---
The option, in case you're curious, is "-nodefaultlibs". It brings in a host of missing references to some objects in the CRT, C++ operators new and delete, and various objects relating to structured exceptions. None are present in your extraneous Win32 libraries.


--- Quote from: biplab on December 26, 2006, 04:49:03 am ---I mentioned it to inform you that you may not see the couple of libraries that are added to your wxWidgets project even with the old wizard. These libraries are - comctl32, gdi32, ole32, oleaut32, uuid but you will not see them until you open the Code::Blocks Project file with Notepad.

--- End quote ---
The Build options visible in C::B for each of my wxWidgets projects mirror the options in the .cbp file when viewed in Notepad. The wxWidgets libraries appear in the Debug or Release build options, and the Win32 libraries in the overarching project build options. Modifying the libraries in either place and saving the project results in the expected changes to both the project file and the resulting command lines during the build process.

Some further explanation:
If you think about it, that's the way the wxWidgets DLLs should work. wxWidgets presents an entirely new interface to its users that completely hides Win32, such that no Win32 function calls exist in the wxWidgets headers. If your app's code contains no Win32 function calls, it has no dependencies on the Win32 libraries; every Win32 function call happens within the code in the wxWidgets DLL, and the resulting dependencies are resolved when the DLL is linked rather than when your app is.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version