Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

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