[Digikam-devel] dcraw_parse.cpp suggested change

Will Stokes wstokes at gmail.com
Wed Mar 1 23:18:14 GMT 2006


I'm using a modified version of dcraw_parse.cpp in my program and just
spent a few minutes getting it compiled under Windows (my app is
entire qt based). I had to make the following chnages and though the
Digikam team might want to encorporate theminto their own tree so
Digikam code can be slightly more portable...

#include <iostream>
+#include <QtGlobal>

extern "C"
{
#include <ctype.h>

+#ifndef Q_OS_WIN
#include <netinet/in.h>
+#endif
}

+#ifdef Q_OS_WIN
+#include <Winsock2.h>
+#endif

Various functions used in this file are provided by netinet/in.h on
linux/osx, but not on Windows. There you need Winsock2.h. It is
necessary to include QtGlobal up top in order to get Q_OS_WIN to be
defined when compiling on Windows. That said, the QtGlobal include
line is using the new Qt4 syntax. I suppose that would be

#include <qglobal.h>

under Qt3? Not sure, I've kicked the qt3 monkey off my back. :-)

-Will
--------------------------------------------------------
Will Stokes         wstokes (at) gmail.com
Album Shaper   http://albumshaper.sf.net
--------------------------------------------------------



More information about the Digikam-devel mailing list