[geeks] makefile -> VC++ project
Jonathan C. Patschke
jp at celestrion.net
Wed Nov 6 17:46:03 CST 2002
On Wed, 6 Nov 2002, Joshua D Boyd wrote:
> Does anyone know of a tool to make this translation easy?
Several of them. I recommend a crowbar, followed by a claw-hammer.
> My professor wants libjpeg, libtiff, lib3ds, pthreads, and audiere all
> to be included in the sourcetree for the toolkit I'm working on in VC++
If he wants to build them from within the IDE, be prepared to reverse-
engineer the configure scripts and Makefiles into the little widgets in
the IDE so that the project file knows how to build these things
properly. What he's asking -isn't- minor. VC++ can't even import
creative NMAKE scripts; it chokes if you try to do anything unusual.
> I've tried convincing him it isn't needed, but not getting anywhere.
Include a pre-build step in your primary target that calls a batch file
that runs gmake. :)
> It doesn't help that currently I can't figure out if it is possible
> or not to get vc++ to take several .lib files and combine them into
> one large .lib.
No, it's not possible. At least, not in any sane way. VC++ static
.lib files aren't static archives like Unix .a files. They're
conceptually the same, but the linker is the only documented tool
that can grok them. If you want to kill a couple of weeks reading
the file specifications so that you can unroll them and relink the
exports, it'd probably be doable, but it'd be painful, I'm sure.
If they're import libraries, it's absolutely impossible, since there are
several exported symbols that are common to -every- DLL, so your
libraries would be stomping all ove reach other.
> At the moment there are something like 10+ .lib files produced by
> compiling the toolkit that have to be included in any projects that
> use the toolkit, and he insists it should only be one.
I don't normally say this about people I don't know, but from what
you've been telling us over the last few weeks, he sounds like a
Grade-A clueless fucktard of a tenured suit that wouldn't know a
compiler from a linker if they both ganged up on him and raped him with
the cluebat. I suppose his \winnt\system32 directory only has one DLL
file called "WindowsNT.dll" and every program on his system consists of
"application.exe"? His entire thesis directory consists of
"MyTheses.doc"? Or hell, I bet his "My Documents" folder is just a
Microsoft Binder file containing OLE objects. Sheesh.
If he only wants one file, you're going to need to do static linking as
an intermediate step, but I don't know if you can convince Microsoft's
linker to combine libraries to generate an library (as opposed to an
executable) as a target.
Also, remind him that .lib files are intermediate files that don't
need to be shipped with the application (or even the source, if he gets
his way and has you roll all the projects into one), and that if he
wants -only- one, you're going to need to spend a phenomenal amount of
time making all your dependencies link into one big library.
Oh, also point out that the net result of this is saving 9 entries in
the directory tree and maybe 32k in partially-allocated filesystem
clusters. This isn't 1970; 32k of magnetic storage on a desktop
computer isn't worth 4 weeks of labor.
--
Jonathan Patschke
"Albert Einstein nailed space-time, but the wild thing had him stumped.
Al, baby, two and two make five-and-a-quarter; that's why people fall
in love." -- Thomas Dolby, "That's Why People Fall in Love"
More information about the geeks
mailing list