A c++ puzzle for you gurus

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Wed Dec 13 16:38:12 PST 2006


walt wrote:
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?
you have to read it as a sentence :)  file* included from mtasker.hh, line 107, which was included from syncres.hh, line 20, which was included from syncres.cc, line 20.  file* is: mtasker:cc.  confuses me also all the time.

I'm really more interested in how a c++ expert would approach this bug
rather than just being given the fix.
the problem here basically is an incomprehensible error message which translates to:

"no declaration for swapcontext()!!1"

from ucontext(3):

BUGS
    The getcontext(), setcontext(), makecontext(), and swapcontext() func-
    tions are not yet implemented in this version of DragonFly.
there we go :)  maybe somebody wants to import this functionality from freebsd?

cheers
 simon
--
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
Attachment:
signature.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00010.pgp
Type: application/octet-stream
Size: 252 bytes
Desc: "Description: OpenPGP digital signature"
URL: <http://lists.dragonflybsd.org/pipermail/users/attachments/20061213/aa3e1329/attachment-0019.obj>


More information about the Users mailing list