Skip to main content
gamedev.net
🔒 Locked

Making .lib files?

Started by RandomAxess 4 replies 500+ views
Original Post
RandomAxess
RandomAxess
Hey all, I'm interested in making basically a custom set of "mesh" classes, including overloadable render functions and stuff. I would like to make it a .lib file just for convinience--i'll be using it in every one of my graphical projects. How do I do this? Is there a good tutorial on making library files? I couldn't find anything good on the web. Thanks!
Stephen R
Stephen R
If you are talking about using a statically linked library, one that doesn't use a dll then the process is very simple.

In whatever IDE you are using select a static library project. Insert your code into the project and compile. You will be left with .lib that you can link directly into you apps. To get at the structures and functions contained in the lib in the new apps, just include the header files you used to build the library into the new apps.
RandomAxess
RandomAxess
I'm using VS.NET 2k3 and i can't find anything that allows the creation of a "static library project."

Is there a selection I should pick instead that i'm just not aware is the same thing?
Polymorphic OOP
Polymorphic OOP
Quote:
Original post by RandomAxess
I'm using VS.NET 2k3 and i can't find anything that allows the creation of a "static library project."

Is there a selection I should pick instead that i'm just not aware is the same thing?


If your project is already created, right click on your project in the solution, then go to properties, click the Configuration Properties -> General submenu on the left, set the Configuration drop-down menu on the topleft to All Configurations, then, in the main part of the window, click where it says "Configuration Type Application (.exe)" and choose "Static Library" from that menu.

If you project isn't created yet, do File -> New -> Project, select "Win32 Project" when you create your Project, click "Application Settings" on the left in the window that pops up, then click the "Static Library" radio button.
Stephen R
Stephen R
Select Win32 application, give it a name and create it. Then when the next dialog opens, select the application settings tab. On that you should see the static library option.
RandomAxess
RandomAxess
excellent, thanks for the quick replies

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.