Problem with gtk-doc tool



Hi!

I'm writing library based on GObject and I have problem with generating API
reference for it. Here piece if header file, which occur problems :

/***************************************************************************
*            goofy-socket.h
*
*  ...about GPL license...
***************************************************************************/

G_BEGIN_DECLS

#define GOOFY_SOCKET_ERROR_QUARK g_quark_from_static_string
("goofy-socket-error-quark")
#define GOOFY_SOCKET_INTERNAL_ERROR_QUARK g_quark_from_static_string
("goofy-socket-internal-error-quark")

typedef enum {
   GOOFY_SOCKET_ERROR_DESTROYED
}  GoofySocketError;

typedef enum   {
   GOOFY_SOCKET_ERROR_INTERNAL_UNKNOWN = 1, /* defined for error's codes
unknown on given platform */
#ifdef G_OS_WIN32
   GOOFY_SOCKET_ERROR_INTERNAL_EINTR = WSAEINTR,
   GOOFY_SOCKET_ERROR_INTERNAL_EACCES = WSAEACCES,
  /* ...other errors... */
   GOOFY_SOCKET_ERROR_INTERNAL_SYSCALLFAILURE = WSASYSCALLFAILURE,
#else
   GOOFY_SOCKET_ERROR_INTERNAL_EINTR = EINTR,
   GOOFY_SOCKET_ERROR_INTERNAL_EACCES = EACCES,
   /* ...other errors... */
   GOOFY_SOCKET_ERROR_INTERNAL_SYSCALLFAILURE =
GOOFY_SOCKET_ERROR_INTERNAL_UNKNOWN,
#endif /* G_OS_WIN32 */
}  GoofySocketInternalError;

#define GOOFY_TYPE_SOCKET            (goofy_socket_get_type ())
#define GOOFY_SOCKET(obj)            (G_TYPE_CHECK_INSTANCE_CAST((obj),
GOOFY_TYPE_SOCKET, GoofySocket))
#define GOOFY_SOCKET_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),
GOOFY_TYPE_SOCKET, GoofySocketClass))
#define GOOFY_IS_SOCKET(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GOOFY_TYPE_SOCKET))
#define GOOFY_IS_SOCKET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GOOFY_TYPE_SOCKET))
#define GOOFY_GET_SOCKET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),
GOOFY_TYPE_SOCKET, GoofySocketClass))

typedef struct _GoofySocket GoofySocket;
typedef struct _GoofySocketClass GoofySocketClass;

struct _GoofySocket {
   GObject               parent;

   /* Variables */
};

struct _GoofySocketClass {
   GObjectClass        parent_class;
};

/* Some function prototypes */

G_END_DECLS

And this is 'make' output:

Cannot parse enumeration member "#ifdef G_OS_WIN32
   GOOFY_SOCKET_ERROR_INTERNAL_EINTR = WSAEINTR" at
/usr/share/gtk-doc/data/gtkdoc-common.pl line 287, <INPUT> line 120.
Cannot parse enumeration member "#else
   GOOFY_SOCKET_ERROR_INTERNAL_EINTR = EINTR" at
/usr/share/gtk-doc/data/gtkdoc-common.pl line 287, <INPUT> line 120.
Cannot parse enumeration member "#endif
" at /usr/share/gtk-doc/data/gtkdoc-common.pl line 287, <INPUT> line 120.
=============================================================================
WARNING: 6 unused declarations.
 These can be found in libgoofy-unused.txt.
 They should be added to libgoofy-sections.txt in the appropriate place.
=============================================================================
touch tmpl-build.stamp
make[2]: *** Brak reguÅ do zrobienia obiektu `tmpl/*.sgml', wymaganego przez
`sgml-build.stamp'. Stop.
make[2]: Opuszczenie katalogu `/home/tomek/Desktop/libgoofy/reference'
make[1]: *** [all-recursive] BÅÄd 1
make[1]: Opuszczenie katalogu `/home/tomek/Desktop/libgoofy'
make: *** [all] BÅÄd 2

Like I can see gtk-doc doesn't recognize C preprocessor directives :(

Can someone help me solving this problem? This library is (I mean it will
be) available on Linux and win32, so it's very important for me to have my
own, platform independent errors declarations.

--
Cya!
Tom


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]