[geeks] makefile -> VC++ project

Joshua D Boyd jdboyd at cs.millersville.edu
Wed Nov 6 19:10:19 CST 2002


On Wed, Nov 06, 2002 at 05:46:03PM -0600, Jonathan C. Patschke wrote:

> > 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 chucked .tiff support altogether, leaving only .jpg support from the
image formats requiring .lib files.  The TIFFS were left over from the
fact that I reused old code of mine.

I've build a Visual C++ project to build libjpeg.lib.  Visual C++ did
not infact import the NMAKE file claiming that something else made the
file so it was invalid.  Still, I was able to use it to sort things out
by hand.  I just had to copy the old msdos config file and tweek the bit
about far pointers to make it compile.  Also, my image library that
depends on libjpeg.lib now builds with my libjpeg.lib.  Now to test if
my test application will still work.

To acheive the 1 .lib goal (I now have it down to 6, but 3 will go away
as I get the projects debugged enough to be comfterable putting them in
the main one), I'm now closer.  I just have to do the same for audiere
that I just did for libjpeg, and also do the same for lib3ds.  Blech.

> 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.

I haven't seen a way.  I think I'm going to have to combine everything
into one project.  Double Blech.
 
> 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.

I'm not shipping an application.  I'm just "shipping" a toolkit, and
said professor feels that having more .libs will just confuse the
computer science juniors and seniors in the class.
 
> 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.

Well, that was my take.

-- 
Joshua D. Boyd



More information about the geeks mailing list