creating and using .lib files

S

slashman

Hi,
I wud like to know how to create and use .lib files from a few c++
classes i have created that are common to a lot of my projects. My
guess is .lib files can b used in windows and linux (please correct me
if i'm worng). And if u guys cud also let me know where i cud find out
such information in the future (books or websites) it would b
x-tremely helpful
thanks in advance
vivek
 
K

Karthik Kumar

slashman said:
Hi,
I wud like to know how to create and use .lib files from a few c++
classes i have created that are common to a lot of my projects.

.lib is a file extension used by MS VC++ implementation for library
archives. The C++ standard does not specify the extension / format
of the archive. So if you want to create an archive for your
classes, you have to check out the implementation details.

<OT>
Say, on GCC environment - you would use the gcc -c option to
get the .o files. and then 'ar' command to archive.
This could be different on your implementation.
My
guess is .lib files can b used in windows and linux (please correct me
if i'm worng).


You cannot play around with the same .lib file across
different software platforms. You have to compile them
specifically with the relevant build system for the
target platform.

And if u guys cud also let me know where i cud find out
such information in the future (books or websites) it would b
x-tremely helpful

google.com for your favourite implementation
(MS VC++, GNU C++ whatever).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top