Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

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

  • 02-11-2001 12:36PM
    #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