Visual C++ 6.0 as a Winelib IDE?

Boaz Harrosh boaz at hishome.net
Wed Mar 2 10:25:47 CST 2005


Ira Krakow wrote:

>I have Visual C++ 6.0 running under Crossover Office
>4.1, which of course means it's running under Wine. 
>  
>
1.5 years ago I had 3 problems with this.
1. It did not install. But that was not so bad because also on windows, 
VC6, if you copy an Installed directory and run it. Will work with some 
minor functionality missing. So it did load on wine.
2. When compiling, the std output was not redirected back to the IDE.
3. When debugging, it would Just do a Baaa and quit.

Has any of these problems changed? Can you set a break point and run 
under the debugger?

>For one of the examples in the Wine/Winelib book, I
>decided to take the code produced by the VC++ Win32
>"Hello World" wizard and see how to port it to Wine.
>
>Turns out, it's almost trivial.  Create an empty
>directory, copy the *.c, *.rc, *.h, and *.ico files to
>it.  VC++ produces tons of other files, but they're
>either used to maintain the Visual Studio environment,
>or are intermediate compilation files that aren't
>needed.  Then run:
>
>$ winemaker .
>
>The Makefile that Winemaker generates _almost_ works. 
>You need to delete the references to the mfc library
>and mfc.dll.  After doing that, running make generates
>the .so file.  Wine runs it flawlessly.
>
>  
>
There are 2 easier ways that I know of to do this.
1. Use dev-c++ from www.bloodshed.net/devcpp.html. It will Just open 
your DSP file and make a very good, very simple MinGW makefile for you. 
It will add all your -D and -I and all this nightmare in big projects. 
Both the result makefile and dev-c++ itself can be used with wine. It 
has a native Linux port has well.
One thing to try is debugging. It uses gdb for windows. Does gdb for 
windows runs under wine??

2. Grab the DSW2MAKE util from MinGW. Written in Perl. The output 
makefile is very good for Winelib. Also keeps your -D(s), -I(s), and 
-l(s) and tries to convert other switchs as well. Better for very big 
projects.

>I got to thinking - can I convert the code from the
>MFC application as easily?  Seems like it's doable,
>because the generated code runs in VC++/Crossover
>Office 4.1.  I tried the same steps as before, with
>Winemaker, but I couldn't figure out what Makefile
>modifications were needed.
>
>  
>
MFC/ATL itself is not so simple...

>All of this got me to thinking - could Wine running
>Visual C++ be a viable IDE for porting?  Maybe just
>linking VC++ with the Winelib libraries would do it. 
>Maybe after tweaking Winemaker and publishing a HOWTO
>we could show that this is a viable path?  It's
>certainly easier than for Visual Studio developers and
>could help attract them to Wine.
>  
>
If and when the VC++ Debugger can run under wine. (Even remotely) that 
will be the turning point for all the windows developers out there.

>Another benefit - we could use the Visual C++ sample
>programs as tests for Wine.  The programs might
>exercise areas that haven't been tested thoroughly.
>
>  
>
Go grab CodeGuru.com & CodeProjet.com . There is your exercise of Win32API.
But from what I talked to Jeremy once, he said that from their 
experience, having the PE source code doesn't really change anything in 
the way you debug the app. All you need is the relay-trace anyway. So 
why not Just grab a real live App and have that run.

>What do you think?
>
>Ira
>
>
>  
>
Free Life
Boaz




More information about the wine-devel mailing list