I have just the thing. I wrote a batch file called gw2.cmd which is a compiler wrapper.  makes 64 and 32-bit programs in one fell swoop.  you have to edit the batch file to select a compiler build date and compiler type if you are using mingw-w64 (mandatory).

I have been updating it quite often.
http://JesusnJim.com/code/compilers/mingw.html

the page needs updating a little in some areas regarding #ifdefs since I just found out some new stuff for cross-platform compiling.
still don't know anything about compiling for linux/bsd and its #ifdefs.

the web page talks about resources which tell you how to make the manifest XML file.  and in my batch file, I write 2 types of manifest XML files: one for 9x+ and one for vista+
you need to have a cmd shell with a large buffer though, it's got a hefty help.
it can generate DLL's I think.  but it's not something I have tested recently.  I have no clue how to make an OCX - it's been 20 years since I have made one.  nobody seems to have documented since I last looked how to set up the resource file stuff for an OCX, and that's *key*, because it's different for DLL vs. EXE so I figure OCX is also different from that.




From: Gisle Vanem <gvanem@broadpark.no>
To: MinGW Users List <mingw-users@lists.sourceforge.net>
Sent: Friday, January 27, 2012 6:12 AM
Subject: Re: [Mingw-users] problem in winbase.h?

"Earnie Boyd" <earnie@users.sourceforge.net> wrote:

> That isn't really true.  You can add -lmsvcr[VERSION] to your link step.
> ls /mingw/lib/*msvc*

But then you need a pesky manifest file. Right? Either on the side
or put in as a resource. I just tried your tip and got the dreaded
"R6034 run-time error".

I've tried before with no luck to enter (or use) a manifest with a
MingW/gcc built exe. Please tell me if/how it's possible.

--gv

------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
MinGW-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:mingw-users-request@lists.sourceforge.net?subject=unsubscribe