FAQ & Tips and Tricks

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

FAQ & Tips and Tricks

Postby tbreina » Sat Jan 07, 2006 12:58 pm

Note:

The Official wxDev-C++ FAQ is at:


http://wxdsgn.sourceforge.net/?q=node/2

Please try there first for the common questions like:
1. Why are the binaries so large?
2. Why is the compiler so slow?

Also, please click on the "Search" link above before posting your question. Chances are it has already been asked and answered.

Finally, Bugs can be posted to our BugTracker at:
http://sourceforge.net/tracker/?group_id=95606&atid=611982




Tip #1: Updating your existing projects to a new wxWidgets devpak


A. How are our wxWidgets devpaks different?

The wxWidgets devpak used by wx-devcpp is a monolithic build, which among other things means that the dependent libraries like tiff, jpeg, png, zlib are included. The lib gets appended to every executable you build which is why the binaries are large even for simple programs. We could create a DLL to reduce executable size, but then you'd have to ship the DLL with all of your projects anyway-- so it ends up being a wash unless you are shipping many projects that use the same DLL. Bottom line, when in doubt grab one of our devpaks off the mirrors listed in my signature.

Mal produces these devpaks whenever a new wxWidgets update comes out. However, you can create your own tailored devpaks by following Mal's instructions (http://forums.wxwidgets.org/viewtopic.php?t=1764). We've also developed a batch file system to do this semi-automatically. The code is in the wxDev-C++ SVN.

B. Determine if you have a previous wxWidget devpak installed (which you probably do), uninstall it, and install the updated devpak.

Of course, if you are installing the complete wx-devcpp setup package, then you can skip this step.

In wx-devcpp go to Tools in the main menu. Click on "Package Manager" and the "Package Manager" window opens up. Select the package icons that start with "wxWidgets". In the "Package Details" column to the left, you should see the wxWidgets version that this package contains (e.g. 2.6.2). To uninstall the package, click the trashcan icon that says "Remove". To install the updated package, click the disk icon that says "Install" and select the correct devpak.

C. Change the template file to use the new wx library.

NOTE: Again, if you are installing a completely new wx-devcpp installer package, then this step isn't needed.

There are 2 major template files that we use. Templates are simply prototypes for a wxWidgets project. All templates are stored in the C:\Dev-Cpp\Templates directory (note: replace C:\Dev-Cpp with wherever you installed wxdevcpp). The wxFrame template is called 00-wxWidgets.template. The wxDialog template is called 0-wxWidgets.template.

Open these template files into a text editor like Notepad. Find the line that starts "Linker=". You'll find something on that line that says something like "-lwxmsw26_@@_-lwxmsw26_gl_@@_". These are the wxWidgets libraries. The msw indicates that they're built for MS Windows and the 26 indicates that they are version 2.6 (which includes 2.6.1, 2.6.2, and all other 2.6.x). (The "_@@_" is just a carriage return that should be kept between library names.) Change the "26" to whatever new wxWidgets version you are updating to. For example, if you are upgrading from wxWidgets 2.5.4 to wxWidgets 2.6.2, then change the line from "-lwxmsw25_@@_-lwxmsw25_gl_@@_" to "-lwxmsw26_@@_-lwxmsw26_gl_@@_". Of course, keep the rest of the line just as it is.

D. Update your existing projects to use the new wx library.

Load your existing project into wx-devcpp. In the main menu click on Project->Project Options. A window called "Project Options" will appear. Click on the "Parameters" tab. In the Parameters window, there should be several libraries listed under the column called "Linker". In most cases, libraries with names like "-lwxmsw26" and "-lwxmsw26_gl" should be at the top of this list.

If you are upgrading from wxWidgets 2.5.x to 2.6.x, then you want to change these library names from "-lwxmsw25" to "-lwxmsw26" and from "-lwxmsw25_gl" to "-lwxmsw26_gl". Click "Ok" and then save your project. You should now be able to compile. If you're still getting the compile time error like "Linker: cannot find -lwxmsw25" then you did still have a -lwxmsw25 flag floating around somewhere. A second way to check is to open up your .dev file for the project (e.g. Project1.dev if your project is named Project1) and do a search for that string. NOTE: Changing the dev file is another way to change the library names.

Hope that helps.
-Tony
Everybody's got something to hide except for me and my monkey.

noorad
In need of some credit
In need of some credit
Posts: 2
Joined: Sat Feb 14, 2009 8:02 pm

Postby noorad » Sun Feb 15, 2009 2:54 pm

link "official" NO GOOD.

NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Postby NinjaNL » Sun Feb 15, 2009 3:12 pm

Corrected. Thanks.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/


Return to “wxDev-C++”

Who is online

Users browsing this forum: No registered users and 4 guests