Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 24th, 2006, 06:55 PM
bluekite2000@gmail.com
Guest
 
Posts: n/a
Default inclusion compilation model question

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!

  #2  
Old January 24th, 2006, 07:15 PM
Stephan Brönnimann
Guest
 
Posts: n/a
Default Re: inclusion compilation model question

bluekite2000@gmail.com wrote:[color=blue]
> 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![/color]

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

  #3  
Old January 24th, 2006, 07:25 PM
Victor Bazarov
Guest
 
Posts: n/a
Default Re: inclusion compilation model question

bluekite2000@gmail.com wrote:[color=blue]
> I have a bunch of template functions in foo.h and foo.cc using the
> inclusion compilation model.[/color]

What's that?
[color=blue]
> 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![/color]

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
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles