c language

Brian K. White brian at aljex.com
Tue Jan 19 11:06:12 PST 2010


Fairlight wrote:
> You'll never BELIEVE what Kenneth Brody said here...:
>> Well, you can always use the command-line interface rather than the IDE. 
>> However, Microsoft's makefiles work a little differently tha *nix makefiles.
> 
> Ya think?  :)
> 
> I tried that as well.  It's amazing, but the Express version won't compile
> PuTTY, nor would it compilke yTin, nor would it compile something else.
> All of which had the files to build with VC++.
> 
> The only thing I ever actually got Express to compile was "hello world".
> 
> mark->

I routinely compile putty with msvc++express.

I don't use the command line directly nor do I use the included visual 
studio ide. I use Code::Blocks for editing and building.

You DO need to install the platform SDK as well as msvc++express itself. 
It's equally free, just for some reason it's a separate download. 
Msvc++express by itself is not good for very much that I can see. If you 
use the default settings in the included ide, you wind up with binaries 
that aren't very portable. I don't know exactly what settings make the 
difference, but when I build with code::blocks, I get a binary that 
works on anyones pc. (I verify this with the dependancy-walker util, not 
just by hearsay.)

Before settling on my current system, for a while I was maintaining 
visual studio and codeblocks project files, and cygwin and mingw 
makefiles, and in the case of codeblocks I was also maintaining 
different codeblocks configs, one that uses msvc++express build 
environment, and one that used cygwin, and was doing side by side 
comparisons.

Since cygwin no longer has -mno-cygwin I use mingw/msys and makefiles 
for most other things I build on windows if they aren't gui apps and/or 
I don't care about nicities like adding resources to the executable 
(icons, version/author/copyright strings that appear in explorer etc)

And of course, nsis for the installer. It was a slight learning curve 
getting the first viable nsis script, but it's such a pleasure now. I've 
already replicated my whole build-and-package environment on several new 
machines so not only is the stuff useable, it's all nice and portable by 
just copying the source and following a little recipe/checklist of 
things to install on a new machine. All free stuff, all downloadable 
on-demand. It even kept working as both my build machines and my users 
desktops transitioned from xp to vista to 7, and as msvc++express 
transitioned from something to 2008 to 2010beta.

cygwin broke on my by dropping -mno-cygwin, and mingw broke on my by I 
don't know how, but when I build putty in the current mingw, with a 
simplified makefile that worked fine before on the same exact code, it 
builds without error, but the binary just crashes immediately when you 
try to run it.

-- 
bkw


More information about the Filepro-list mailing list