img-timeline.h:
G_BEGIN_DECLS
struct _ImgTimeline
{
/*< private >*/
GtkLayout da;
};
// some other stuff
#define IMG_TIMELINE_TYPE img_timeline_get_type()
G_DECLARE_FINAL_TYPE(ImgTimeline, img_timeline, IMG, TIMELINE, GtkLayout)
G_END_DECLS
img-timeline.c:
#include "img_timeline.h"
G_DEFINE_TYPE_WITH_PRIVATE(ImgTimeline, img_timeline, GTK_TYPE_LAYOUT)
//A lot of other stuff
main-window.c:1326 where I get the linking error:
ImgTimelinePrivate *priv = img_timeline_get_instance_private(widget);
/usr/bin/ld: imagination-main-window.o: in function img_media_model_remove_media': /home/gt/projects/imagination/src/main-window.c:1326: undefined reference to
img_timeline_get_instance_private’
If I move the G_DEFINE_TYPE macro inside the img-timeline.h I get loads of compiler errors.
Does someone have a clue please?