• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: C++ templates: no support for 'export' ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C++ templates: no support for 'export' ?


  • Subject: Re: C++ templates: no support for 'export' ?
  • From: Dan Caugherty <email@hidden>
  • Date: Sun, 30 Mar 2008 21:24:46 -0400

Yeah, I had a sneaking suspicion this was the case.

The extra header approach is at best a "better than nothing" compromise,
not a real solution.  But thinking about what the "other ways" to tackle
this problem might be only makes my head hurt more.

Oh well.  Thanks anyway, at least I know I didn't miss anything obvious.

Rgds,
-- Dan



On Mar 30, 2008, at 6:26 PM, Chris Jefferson wrote:

On 30/03/2008, Dan Caugherty <email@hidden> wrote:
Hi all --

I was really hoping not to include a large template method in a *.h
file,
but alas, it looks like I can't get around this warning:

  warning: keyword 'export' not implemented, and will be ignored

This looks like a GCC 4.0 warning that has nothing to do with Xcode 3.0,
unless I've missed something.


What other source code organization strategies can I try, other than
(gag)
sticking all of my class methods in the header?

There are very few compilers which implement export, and gcc have said that they never will implement it.

The traditional way of dealing with this, and the one used by gcc
itself, is to do put what you would like to export into a file called
either "header.hpp" or "header_implementation.h", and #include it at
the end of the "header.h" it defines the methods of.

Unfortunately, it's unavoidable you have to put those methods into a
header. It doesn't slow down compiling as much as you might expect,
particularly if you use pre-compiled headers.

There are other ways of avoiding compiling many times, but I have
found in the past they are more trouble than they are worth...

Chris

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: C++ templates: no support for 'export' ?
      • From: Thomas Engelmeier <email@hidden>
References: 
 >C++ templates: no support for 'export' ? (From: Dan Caugherty <email@hidden>)
 >Re: C++ templates: no support for 'export' ? (From: "Chris Jefferson" <email@hidden>)

  • Prev by Date: Re: C++ templates: no support for 'export' ?
  • Next by Date: Re: Wrong Frameworks Build Configuration Copied to App Pkg
  • Previous by thread: Re: C++ templates: no support for 'export' ?
  • Next by thread: Re: C++ templates: no support for 'export' ?
  • Index(es):
    • Date
    • Thread