LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-05-2002, 02:45 PM   #1
ChimpFace9000
Member
 
Registered: Jul 2001
Location: So. Cal.
Distribution: Slackware 8.1
Posts: 55

Rep: Reputation: 15
Post putting c++ classes in a lib


How do i put c++ classes into a lib in linux? Is there a tutorial? Or does anyone know of a place i should search? I tried google and a few other search engines but found nothing.
 
Old 11-05-2002, 04:16 PM   #2
vmole
LQ Newbie
 
Registered: Nov 2002
Posts: 1

Rep: Reputation: 0
just like any other library

Create the library file: ar c libmyclass.a
Add object files to library: ar r libmyclass.a myclass.o

When you build the program, reference the library:

g++ myprog.c -lmyclass

For more info, see http://www.tldp.org/HOWTO/Program-Li...WTO/index.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible uses for classes. RHLinuxGUY Programming 4 11-21-2005 10:10 PM
classes in C++ niteshadw Programming 2 07-05-2005 07:05 PM
OOP (PHP) classes and extended classes ldp Programming 3 03-05-2005 11:45 AM
Compromised? Files "/usr/lib.hwm", "/usr/lib.pwd", "/usr/lib.pwi" Klaus Pforte Linux - Security 4 09-28-2004 11:33 PM
iiimf-client-lib & iiimf-protocol-lib cooldownguy86 Linux - Software 1 06-29-2004 06:25 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration