Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

Not sure if I need this here or in Programming but...

  • 02-11-2001 11:36AM
    #1
    Registered Users, Registered Users 2 Posts: 2,660 ✭✭✭


    I am using solaris unix and I dont know which version, but what I want to know is how do I compile a c++ class header file and a .cc file.

    What I have to do is using the header and the .cc file create an output file, for example I have a file IntStack.h, and IntStack.cc and I need to compile them and be given IntStack.o as output.

    I have tried:
    g++ -c IntStack.cc IntStack.h
    
    and it keeps telling me that compilation of the header file is required, and I then run out of options, all help gracefully received.


Comments

  • Registered Users, Registered Users 2 Posts: 1,176 ✭✭✭podgeen


    #include IntStack.h in your .cc file

    then try

    g++ -c IntStack.cc

    That should work.


Advertisement