A c++ puzzle for you gurus

Peter Avalos pavalos at theshell.com
Wed Dec 13 16:22:38 PST 2006


On Wed, Dec 13, 2006 at 07:48:38AM -0800, walt wrote:
> In response to a post by Petr, I decided to take a stab at fixing
> pkgsrc/wip/powerdns-recursor.
> 
> I was able to fix a few obvious #ifdefs, but I'm still getting this
> c++ error (which doesn't happen in NetBSD):
> 
> c++ -O2 -I/usr/pkg/include -I/usr/include -Wall -O3  -I/usr/pkg/include
> -I/usr/include  -c -o syncres.o syncres.cc
> In file included from mtasker.hh:107,
>                  from syncres.hh:20,
>                  from syncres.cc:20:
> mtasker.cc: In member function `void MTasker<EventKey, EventVal>::yield()':
> mtasker.cc:196: error: there are no arguments to `swapcontext' that depend
> on a template parameter, so a declaration of `swapcontext' must be available
> 
> My bonehead compiler question is:  how did we get from 'from syncres.cc' to
> 'mtasker.cc' with no intermediate steps?
> 

The error message spells it out for you...syncres.cc includes syncres.hh
which includes mtasker.hh which includes mtasker.cc.  It even gives you line
numbers!

--Peter
Attachment:
pgp00009.pgp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00009.pgp
Type: application/octet-stream
Size: 189 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20061213/fb58fa9d/attachment-0021.obj>


More information about the Users mailing list