Request help converting Visual C++ 6.0 projects to wx-devcpp Topic is solved

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Tony0945
Earned some good credits
Earned some good credits
Posts: 105
Joined: Wed Oct 21, 2009 4:02 pm

Request help converting Visual C++ 6.0 projects to wx-devcpp

Post by Tony0945 »

When I try to import, I get an error that that version of VC++ is not supported. I then downloaded Visual Studio 2005 Express and converted the projects to VS2005 projects (which BTW won't build in VS2005). Even after conversion, I get the error message regarding VC++ version not supported.

I suppose I have to hand convert. Does anyone have a link to a guide or willing to offer tips? I'm used wx-devcpp 6.10.2 because the interface is a lot more intuitive (i.e. like VC++) than 7.2.0.2
NinjaNL
Moderator
Moderator
Posts: 899
Joined: Sun Oct 03, 2004 10:33 am
Location: Oosterwolde, Netherlands

Post by NinjaNL »

Probably the simplest way would be to open a new Empty wxWidgets project, add all the files to it and see if it builds.
Follow the development of my screenplay authoring program at http://wxscreenplaywriter.blogspot.com/
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post by tbreina »

I updated the import code from 6.10.2 (which was mostly out of date) for version 7. I'd highly recommend using 7.2.0.2 instead of 6.10.2. However, if you need to use 6.10.2, try looking at the source code (http://wxdsgn.svn.sourceforge.net/viewv ... iew=markup) to help you with the manual import. The code should show you how most of the MSVC compiler options are handled by wxDev-C++.

Note that if you are using the MSVC compiler with wxDev-C++, you could just include the compiler options in the "additional parameters" section of the Project Settings. So instead of finding the switch that corresponds to "/O1", you could just include "/O1" in the additional parameters section.

-Tony
Everybody's got something to hide except for me and my monkey.
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post by tbreina »

p.s. Also note that the import code only handles the old .dsp format. I think the newer format (.vcproj?) is an XML, which should be more human-readable.

-Tony
Everybody's got something to hide except for me and my monkey.
Tony0945
Earned some good credits
Earned some good credits
Posts: 105
Joined: Wed Oct 21, 2009 4:02 pm

Post by Tony0945 »

Adding the files to an empty project did not help.

I upgraded to 7.2.0.2 and was able to import, but am getting errors like:

14 C:\BuyLowSellHigh\stdafx.h afxwin.h: No such file or directory.

and

23 C:\BuyLowSellHigh.h expected class-name before '{' token
in reference to this code snippet:

class CBuyLowSellHighApp : public CWinApp
{

So, I think I should do the following:

1. Replace the library header references to the references from the original wxWidgets project that I'm already working on separately. i.e.

#ifndef WX_PRECOMP
#include <wx/wx.h>
#else
#include <wx/wxprec.h>
#endif

2. Search the code replacing MFC base classes with wxWidget base classes.

3. Compile and alter code as required.

Does this seem the best way to go? If possible, I would ultimately compile this program to run under Linux.

I have some comments/questions on 7.2.0.2 vs 6.10, but will start a separate thread with those.
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post by tbreina »

Tony0945 wrote: 14 C:\BuyLowSellHigh\stdafx.h afxwin.h: No such file or directory.
So it is not finding the file(s). Is there a c:\BuyLowSellHigh\stdafx.h file? Where is afxwin.h? You might just need to confirm these files exist and add them to your C++ includes directory (Project->Project Options).
Tony0945 wrote: 2. Search the code replacing MFC base classes with wxWidget base classes.

3. Compile and alter code as required.

Does this seem the best way to go? If possible, I would ultimately compile this program to run under Linux.

I have some comments/questions on 7.2.0.2 vs 6.10, but will start a separate thread with those.
I think you'll need to convert the MFC classes unless you plan to run this under Wine/Linux. If you can get the thing to compile with MingW gcc, then you shouldn't have any problem compiling it with gcc on Linux. You'll just need to copy the project files over and modify the Makefile.win slightly to refer to the correct libraries and includes.

-Tony
Everybody's got something to hide except for me and my monkey.
Tony0945
Earned some good credits
Earned some good credits
Posts: 105
Joined: Wed Oct 21, 2009 4:02 pm

Post by Tony0945 »

Switched compiler to VS 2005. Added include directory for afxwin.h etc. BTW, I had to use Wordpad to enter the directory in the dev file the first time. When there was no include directory at all, the controls in Project Optins Include were all grayed out. After direct editing, I could add or replace.

"Afxwin.h" still not found, even though I copied the diectory name into a DOS box "dir <pasted name>" and it was there.

Getting lots of frustration over precompiled headers not existing. I shut them all off in Project Options for every file, but "Rebuild all" still expects them as does "compile" and "compile and Run". This sort of thing plus not finding the form builder caused me to downgrade to 6.10 in the first place. I greatly appreciate the effort that's gone into this project and the help you've given me, but the frustration level is getting pretty high.
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post by tbreina »

Tony0945 wrote:This sort of thing plus not finding the form builder caused me to downgrade to 6.10 in the first place. I greatly appreciate the effort that's gone into this project and the help you've given me, but the frustration level is getting pretty high.
What do you mean by "not finding the form builder"? When you open the .wxform file in the IDE, do you see it as a GUI with the component window active?

As far as the directories being grayed out. That would indicate that they don't exist on your system. You say that you are using VC2005. Did you install the VC2005 compiler toolkit? Note that there is also a VC2008 toolkit out there now (which is a little better).

-Tony
Everybody's got something to hide except for me and my monkey.
Minexew
Earned a small fee
Earned a small fee
Posts: 23
Joined: Tue Aug 11, 2009 10:26 am
Location: Prague, Czech Rep.

Post by Minexew »

Tony0945 wrote:When there was no include directory at all, the controls in Project Optins Include were all grayed out.
This isn't any surprise. As soon as you select some directory either by writing its path in the editbox or using the button on the right, the [Add] button should become active, but as long as the field is empty this button is grayed because adding nothing makes no sense at all :P
Tony0945
Earned some good credits
Earned some good credits
Posts: 105
Joined: Wed Oct 21, 2009 4:02 pm

Post by Tony0945 »

When I opened the wxform, the GUI was open, but the component box was not visible. I finally found how to get it in the menus, but it is not always there like in 6.10.2. I also do not like all the floating windows many of which seem to have the property "always on top". It's a pain to keep moving them out of the way. I really preferred the version 6 interface which is more like old VC++. The new interface reminds me of Visual Basic which I never liked. This is a matter of taste, but to me the new interface seems cluttered with windows that are irrelevant to the task on hand. I suppose I will get used to it. One thought: I use 1024 x 768 resolution because my eyesight is not very good. At a higher resolution, it may seem less cluttered. For what it's worth, I hate the Visual Studio 2005 interface also.

Regarding the controls being grayed out in the include tab, this included the editbox. There seems to be a bug here in that the editbox works when there is at least one include file, but I couldn't type in the box when there were none.

I believe Visual Studio 2008 requires XP or higher. I only have a license for Windows 2000 (and NT 4.0 and 3.11) and have no desire to pay another Microsoft tax, especially when XP support is slated to end next year. My computer doesn't meet Vista upgrade requirements, but runs great with Gentoo Linux. I'm hoping to have all my apps either Linux Open Source or WINE compatible and leave Redmond behind. So far, I have only one critical app (VideoRedo) that requires Windows and maybe wx-devcpp. I haven't tried wx-devcpp under WINE, but I suspect it works. If not, there is that future project of yours.

Next step is to try the conversion to wxWidgets as the precompiled header problem is driving me nuts.
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post by tbreina »

Tony0945 wrote:When I opened the wxform, the GUI was open, but the component box was not visible. I finally found how to get it in the menus, but it is not always there like in 6.10.2. I also do not like all the floating windows many of which seem to have the property "always on top". It's a pain to keep moving them out of the way. I really preferred the version 6 interface which is more like old VC++. The new interface reminds me of Visual Basic which I never liked. This is a matter of taste, but to me the new interface seems cluttered with windows that are irrelevant to the task on hand. I suppose I will get used to it. One thought: I use 1024 x 768 resolution because my eyesight is not very good. At a higher resolution, it may seem less cluttered. For what it's worth, I hate the Visual Studio 2005 interface also.
Not sure if you realize this, but the floating windows are dockable in the main interface. If you drag a window to one of the sides of the main window, it should turn blue. Let go of the mouse button and the window will be docked. You should also be able to pin some windows so that they only reveal themselves when they have new info.

Perhaps you could provide a screenshot of what you mean by "cluttered".
Regarding the controls being grayed out in the include tab, this included the editbox. There seems to be a bug here in that the editbox works when there is at least one include file, but I couldn't type in the box when there were none.
I don't see this on my machine (Windows Vista). Perhaps it is something specific to 2000. Can you at least click on the folder icon button to the left of the greyed-out edit box?
I believe Visual Studio 2008 requires XP or higher. I only have a license for Windows 2000 (and NT 4.0 and 3.11) and have no desire to pay another Microsoft tax, especially when XP support is slated to end next year. My computer doesn't meet Vista upgrade requirements, but runs great with Gentoo Linux. I'm hoping to have all my apps either Linux Open Source or WINE compatible and leave Redmond behind. So far, I have only one critical app (VideoRedo) that requires Windows and maybe wx-devcpp. I haven't tried wx-devcpp under WINE, but I suspect it works. If not, there is that future project of yours.

Next step is to try the conversion to wxWidgets as the precompiled header problem is driving me nuts.
Nuklear and I have tested it under Wine. The only thing I couldn't get to work was the actual build from the IDE. So I was able to do all of my coding and RAD stuff, but I needed to type 'make -f Makefile.win' from the commandline to actually build the project. However, Luigi Verona claims that he has is completely working on the latest version of Wine.

-Tony
Everybody's got something to hide except for me and my monkey.
Tony0945
Earned some good credits
Earned some good credits
Posts: 105
Joined: Wed Oct 21, 2009 4:02 pm

Post by Tony0945 »

Installed wx-devcpp under Wine using the web installer. Program runs under Wine and actually builds and executes the target program from F9. I didn't have to change a thing. The interface seemed much nicer and well-behaved under Gnome than under Windows 2000. Only two problems noted. No desktop icon created and Search under Help displays a message box "Not implemented yet", while Search works under Windows. I can probably use a Gnome Launcher in place of the usual desktop icon. I did get another exception caught clicking in the wrong place in the Help configuration dialog, so that one seems a real bug having occurred both under Win2k and WinXP emulation.

Wine 1.1.32
Gnome 2.26.3
Gentoo Linux kernel 2.6.30-gentoo-r5
Amd64 running 64 bit Linux (32bit Wine)

I can't believe the difference. Night and Day. Please, Please make a native Linux wxWidgets version.
Tony0945
Earned some good credits
Earned some good credits
Posts: 105
Joined: Wed Oct 21, 2009 4:02 pm

Post by Tony0945 »

Tbreina, I posted a long reply to your reply, but somehow it got lost. The most important things were: How do I submit bug reports when wxdevcpp detects an exception? And thanking both of you for all the help and support. Maybe the software got confused with three Tonys posting on the same thread. :-)
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post by tbreina »

Tony0945 wrote:Installed wx-devcpp under Wine using the web installer. Program runs under Wine and actually builds and executes the target program from F9. I didn't have to change a thing. The interface seemed much nicer and well-behaved under Gnome than under Windows 2000. Only two problems noted. No desktop icon created and Search under Help displays a message box "Not implemented yet", while Search works under Windows. I can probably use a Gnome Launcher in place of the usual desktop icon. I did get another exception caught clicking in the wrong place in the Help configuration dialog, so that one seems a real bug having occurred both under Win2k and WinXP emulation.

Wine 1.1.32
Gnome 2.26.3
Gentoo Linux kernel 2.6.30-gentoo-r5
Amd64 running 64 bit Linux (32bit Wine)

I can't believe the difference. Night and Day. Please, Please make a native Linux wxWidgets version.
On Ubuntu there was a shortcut in the Wine menu. Of course, you should be able to manually create a shortcut on your desktop if you desire.

Are you using the Linux version of the wxWidgets libraries? Or, are you using the Windows binaries that came with wxDev-C++? Can you run your project executable straight from the Linux shell? Or, do you have to run it through Wine?

-Tony
Everybody's got something to hide except for me and my monkey.
tbreina
Moderator
Moderator
Posts: 1289
Joined: Thu Nov 25, 2004 7:38 pm
Location: Coronado, CA

Post by tbreina »

Tony0945 wrote:Tbreina, I posted a long reply to your reply, but somehow it got lost. The most important things were: How do I submit bug reports when wxdevcpp detects an exception? And thanking both of you for all the help and support. Maybe the software got confused with three Tonys posting on the same thread. :-)
On Sourceforge, there is a bug tracker to submit problems: http://sourceforge.net/tracker/?group_i ... tid=611982

Please include a description of the steps that you used to cause the bug report. It is much easier for me to diagnose a bug if I can repeat the steps and generate the bug on my end.

-Tony
Everybody's got something to hide except for me and my monkey.
Post Reply