[haiku-3rdparty-dev] Order of includes important?

  • From: "Humdinger" <humdingerb@xxxxxxxxxxxxxx>
  • To: "3rd Party Dev List" <haiku-3rdparty-dev@xxxxxxxxxxxxx>
  • Date: Tue, 26 Jan 2010 18:39:57 +0100

Hi guys,

I apologize if this kind of newbie question is off-topic for this list.
I'm dabbling with c++ and my first small app. In fact, it's already 
finished (at least I'm quite satisfied with it's current state). 
Unfortunately, while trying to clean up the source a bit, I moved a few 
#includes from a .cpp file to its .h and sorted them alphabetically. 
Since then it doesn't compile anymore... :(

I get this error (using Paladin; DarkWyrm already investigated and it's 
not Paladin's fault):

In file included from /boot/develop/headers/posix/pthread.h:9,
                 from /boot/develop/headers/os/kernel/OS.h:10,
                 from /boot/develop/headers/os/kernel/image.h:9,
                 from /boot/develop/headers/os/support/Archivable.h:9,
                 from /boot/develop/headers/os/interface/MenuItem.h:9,
                 from /HiQ-Data/projects/QuickLaunch/QLListItem.h:12,
                 from /HiQ-Data/projects/QuickLaunch/QLListItem.cpp:9:
/boot/develop/headers/posix/sched.h:10: error: expected constructor, 
destructor, or type conversion before 'extern'

The line 10 in sched.h is quite inconspicuous: extern "C" {

Does anyone have any idea what could be wrong here? (This is a gcc4 
hybrid build, BTW.)
Thanks!

Regards,
Humdinger

-- 
--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-=--=-
Deutsche Haiku News @ http://www.haiku-gazette.de


Other related posts: