inclusion compilation model question

Discussion in 'C++' started by bluekite2000@gmail.com, Jan 24, 2006.

  1. Guest

    I have a bunch of template functions in foo.h and foo.cc using the
    inclusion compilation model. Now when I write the make file must I
    write it so that foo.h and foo.cc are both installed in the INCLUDE
    directory. Can I have foo.cc compile into foo.so or something and
    intall it in LIB directory instead??? It seems weird to have .cc files
    in a header directory!
     
    , Jan 24, 2006
    #1
    1. Advertising

  2. wrote:
    > I have a bunch of template functions in foo.h and foo.cc using the
    > inclusion compilation model.


    What's that?

    > Now when I write the make file must I
    > write it so that foo.h and foo.cc are both installed in the INCLUDE
    > directory. Can I have foo.cc compile into foo.so or something and
    > intall it in LIB directory instead??? It seems weird to have .cc files
    > in a header directory!


    What's 'foo.so'? What's LIB directory? If it seems weird to have .cc
    files in a header directory, rename them to .h.

    V
     
    Victor Bazarov, Jan 24, 2006
    #2
    1. Advertising

  3. wrote:
    > I have a bunch of template functions in foo.h and foo.cc using the
    > inclusion compilation model. Now when I write the make file must I
    > write it so that foo.h and foo.cc are both installed in the INCLUDE
    > directory. Can I have foo.cc compile into foo.so or something and
    > intall it in LIB directory instead??? It seems weird to have .cc files
    > in a header directory!


    foo.cc contains the definition of the template functions, so usually it
    must be available together with foo.h and you can't create a shared
    library (unless you instantiate the template functions for all
    possible/supported types).
    If you don't like the .cc suffix, just rename the files to .icc (inline
    c++ code)
    or whatever seems suitable to you.

    Regards, Stephan
     
    =?iso-8859-1?q?Stephan_Br=F6nnimann?=, Jan 24, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michael

    ASP.NET 2.0 compilation model

    Michael, Nov 8, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    1,315
    Michael
    Nov 9, 2005
  2. Anders Borum
    Replies:
    1
    Views:
    433
    Bruce Barker
    Nov 28, 2005
  3. Replies:
    1
    Views:
    489
    Andreas Wollschlaeger
    Oct 6, 2006
  4. Spam Catcher
    Replies:
    8
    Views:
    552
    Spam Catcher
    Apr 24, 2007
  5. Alex Vinokur
    Replies:
    1
    Views:
    332
    Fokko Beekhof
    Sep 17, 2008
Loading...

Share This Page