How to compile making use of VC++ 6.0: the real story... Topic is solved

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
GeertVc
Super wx Problem Solver
Super wx Problem Solver
Posts: 273
Joined: Fri Sep 09, 2005 4:42 pm
Location: Belgium

How to compile making use of VC++ 6.0: the real story...

Post by GeertVc » Wed Sep 28, 2005 7:08 pm

Hi all,

Thanks to the very generous help Guru Kathiresan offered me yesterday, I can finally use VC++ 6.0 for my wxWidgets development (will still use wxDevCpp as my form editor, hopefully wxDevCpp can one day be connected to the DevStudio compiler and debugger environment, that would be the ideal marriage...).

He gave me also the permission to make the steps public. It's a real honor for me to do this.

Here we go...
  1. Unzip wxWidgets 2.6.2 files to a directory (uncompress the files for instance to C:\Personal\projects\components\Vc6\src\wx262 - so, try to generalise the dir name)
  2. Open C:\Personal\projects\components\Vc6\src\wx262\build\msw\wx.dsw
  3. Then select 'Projects | Settings...' .
  4. In the settings window, select the first project (adv) and then click the C++ tab.
  5. Then Select "Code Generation" in the the "Category" Combobox.
    Make sure "Settings For" Combo is selected as "Win32 Debug".
  6. In the "Use Runtime Library" combobox, select "Debug Multithreaded" (and ***not*** "Debug Multithreaded DLL", which is selected as default)
  7. Continue doing that for all the other projects.
  8. Click Ok to save the settings: don't forget this action!
  9. Then follow step 3 and this time you should select "Win32 Release" and select "Multithreaded" for the Runtime settings.
  10. Then do a batch build of all projects in the workspace.
    This is a lengthy process and you will have some projects that will fail. This is because some libs needed by those projects are not compiled yet (dependency issue).
    However, running a second time the batch build (no rebuild all, just build!!!) should result in no errors anymore (the previously failed projects will now nicely link and generate their lib(s)).
  11. Once all builds are done and error free, open the options Window (Tools->Options) and select the "Directories" tab.
  12. Add the wx include path (C:\Personal\projects\components\Vc6\src\wx262\include\) and Lib directory (C:\Personal\projects\components\Vc6\src\wx262\lib\vc_lib) in the corresponding window and save the options.
  13. Then go to C:\Personal\projects\components\Vc6\src\wx262\lib\vc_lib\mswd\wx and copy the setup.h file to
    C:\Personal\projects\components\Vc6\src\wx262\include\wx.
  14. Create a new empty win32 project and then open the settings ('Project | Settings...') and change the runtime settings to Multithreaded.
  15. Add the following lib file names to the "Libary Modules" Editbox in the "Link" tab (and "General Category"):

    Code: Select all

    wxmsw26d_core.lib wxbase26d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib 
    oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib oleacc.lib odbc32.lib
  16. Then Select the "Input item from the category (in the same "Link Tab").
    Add LIBCMT.lib to the "Ignore libraries:" section (this is to make sure the default Non Debuggable C Runtime library is ignored).
  17. Then compile and link your project, this should make your program run under the Vc++ debugger (of course, if you copy the .manifest file in the corresonding exe folder, you can get your XP theme effect back)
All flowers/credits should go to Guru, none to me. I'm very thankful for the amount of effort he spent to find out for me what had to be done.

Without his help, this would never have been possible.

Deepest respect for that guy!

Best rgds,

--Geert
Last edited by GeertVc on Wed Sep 28, 2005 7:38 pm, edited 2 times in total.
In commemoration of my beloved Mother...

Tyler
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 246
Joined: Fri Sep 03, 2004 12:37 am
Contact:

Post by Tyler » Wed Sep 28, 2005 7:12 pm

Congratulations. I'm glad you got it working. Keep in mind though that between wx upgrades your project settings will change so you should always go back and copy one of the samples between upgrades (usually major).

daddydave
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 214
Joined: Wed Jun 15, 2005 3:31 am
Location: United States
Contact:

Post by daddydave » Wed Sep 28, 2005 8:20 pm

Thanks for putting together this Howto, GeertVc, I'll try it sometime myself!
and thanks, Guru ji, we kiss your feet (or have I been watching too many Indian movies?)

Should this be moved to the wx-Devcpp forum?

GeertVc
Super wx Problem Solver
Super wx Problem Solver
Posts: 273
Joined: Fri Sep 09, 2005 4:42 pm
Location: Belgium

Post by GeertVc » Thu Sep 29, 2005 4:50 am

daddydave wrote:Thanks for putting together this Howto, GeertVc, I'll try it sometime myself!
and thanks, Guru ji, we kiss your feet (or have I been watching too many Indian movies?)

Should this be moved to the wx-Devcpp forum?
Well, in fact it's not wxDevCpp related anymore. You're using another IDE to do the stuff. That's why I put it here.

The only reference to wxDevCpp I still have, is the form editor.

I hope some day wxDevCpp will be able to hook whatever compiler and debugger environment to it, iso. only the MINGW compiler environment.
Then it might be again more related to wxDevCpp.

Anyway, if more best placed persons than me are convinced the current place is not the most correct one, pls. don't hesitate to move it.

BTW: I've also put the story on wxWiki, as Guru asked me to do this too. You can find it here.

Best rgds,

--Geert
In commemoration of my beloved Mother...

Post Reply