LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   How can I use gcc to build a static library? (https://www.linuxquestions.org/questions/red-hat-31/how-can-i-use-gcc-to-build-a-static-library-169071/)

vtluu 04-12-2004 05:41 AM

How can I use gcc to build a static library?
 
How can I use gcc to build a static library (.a)? What is the difference between gcc and g++ (as C++ compilers)?

Many thanks for your help.

Luu Vo.

jailbait 04-12-2004 10:45 AM

"How can I use gcc to build a static library (.a)?"

Pass gcc the -static option. See:
man gcc

" What is the difference between gcc and g++ (as C++ compilers)?"

Use gcc to compile programswritten in C. Use g++ to compile programs written in C++. I think that recently GNU dropped the distinction and both compilers will compile either C or C++ but I am not sure of that.

___________________________________
Be prepared. Create a LifeBoat CD.
http://users.rcn.com/srstites/LifeBo...home.page.html

Steve Stites


All times are GMT -5. The time now is 11:29 AM.