Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   C++ (http://www.programmingforums.org/forum15.html)
-   -   Creating a Precompiled Source File (http://www.programmingforums.org/showthread.php?t=14616)

ShawnStovall Nov 27th, 2007 9:09 PM

Creating a Precompiled Source File
 
Hey, does anyone know how to create and use precompiled C++ source code in Microsoft Visual Studio 2005? I have a class that I like and would like to not have to hunt it down and bring the source with my every time I want to use it. From my understanding this is the same technique most compiler manufactures use to hide/make more efficient the code to things such as the istream and ostream classes and things of the sort. What I mean is all I would have to do is include the header file for the class, like the iostream header file, and I wouldn't have to mess the source code every time I use the class.

Thanks

Ancient Dragon Nov 27th, 2007 9:25 PM

Re: Creating a Precompiled Source File
 
>>Hey, does anyone know how to create and use precompiled C++ source code in Microsoft Visual Studio 2005?
Yes, use them all the time. They are the default.

But they don't do what you are asking. What you want to do is to create either a DLL or a static library. Then in the header file you create for it you can use a paragma to force inclusion of the *.lib file.

ShawnStovall Nov 27th, 2007 9:33 PM

Re: Creating a Precompiled Source File
 
Maybe I should start a new thread...

Thanks BTW!

WaltP Nov 28th, 2007 10:36 PM

Re: Creating a Precompiled Source File
 
Quote:

Originally Posted by ShawnStovall (Post 137697)
Maybe I should start a new thread...

Thanks BTW!

Why? What's wrong with this one?

ShawnStovall Nov 29th, 2007 6:44 PM

Re: Creating a Precompiled Source File
 
Different topic, a new thread might attract people who know a lot about creating libraries but not precompiled code.:)

Ancient Dragon Nov 30th, 2007 12:19 AM

Re: Creating a Precompiled Source File
 
Quote:

Originally Posted by ShawnStovall (Post 137816)
Different topic, a new thread might attract people who know a lot about creating libraries but not precompiled code.:)

Good idea :) but why have we not seen your new thread yet -- I'm sitting here holding my breath until you do. :mrgreen:

WaltP Nov 30th, 2007 9:45 AM

Re: Creating a Precompiled Source File
 
Quote:

Originally Posted by Ancient Dragon (Post 137844)
Good idea :) but why have we not seen your new thread yet -- I'm sitting here holding my breath until you do. :mrgreen:

Maybe we need a MrBlue!

ShawnStovall Nov 30th, 2007 6:18 PM

Re: Creating a Precompiled Source File
 
Quote:

Originally Posted by Ancient Dragon (Post 137844)
Good idea :) but why have we not seen your new thread yet -- I'm sitting here holding my breath until you do. :mrgreen:

Haven't got around to it yet.:)


All times are GMT -5. The time now is 3:18 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC