Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 535587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:43:56+00:00 2026-05-13T09:43:56+00:00

I’m writing this awesome application, at least I think it awesome, in C with

  • 0

I’m writing this awesome application, at least I think it awesome, in C with the magnificent blend of GObject and after a while I start getting this very, extremely strange error. I also believe to have noticed it not appearing always. However this might just be the IDE’s fault. Anyhow…

GCC, apparently, complains: expected ‘)’ before ‘*’ token; this happens in a header file.

This is that very same header file.

#pragma once
#include "global.h"

#include "CharcoalApp.h"

GtkListStore *WebsitesListStore;

// that error is reported for this line
void charcoal_websites_list_initialize(CharcoalApp *app); 

As far as I can see, this comes from the CharcoalApp *app parameter for that function.

Because I cannot really understand why this error is happening, I’ll include the CharcoalApp.h file. global.h is a very simple header file that carries the main dependencies, mainly GLib, GObject, GThread, GTK+, WebKit and other.

CharcoalApp.h


#ifndef __CHARCOAL_APP_H__
#define __CHARCOAL_APP_H__

#include "global.h"
#include "CharcoalDB.h"

#include "CharcoalWindow.h"
#include "CharcoalWebsitesList.h"

G_BEGIN_DECLS

#define CHARCOAL_TYPE_APP             (charcoal_app_get_type())
#define CHARCOAL_APP(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), CHARCOAL_TYPE_APP, CharcoalApp))
#define CHARCOAL_APP_CONST(obj)       (G_TYPE_CHECK_INSTANCE_CAST((obj), CHARCOAL_TYPE_APP, CharcoalApp const))
#define CHARCOAL_APP_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), CHARCOAL_TYPE_APP, CharcoalAppClass))
#define CHARCOAL_IS_APP(obj)         (G_TYPE_CHECK_INSTANCE_TYPE((obj), CHARCOAL_TYPE_APP))
#define CHARCOAL_IS_APP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CHARCOAL_TYPE_APP))
#define CHARCOAL_APP_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), CHARCOAL_TYPE_APP, CharcoalAppClass))

typedef struct _CharcoalApp         CharcoalApp;
typedef struct _CharcoalAppClass    CharcoalAppClass;
typedef struct _CharcoalAppPrivate  CharcoalAppPrivate;

struct _CharcoalApp {
  GObject parent;

  CharcoalAppPrivate *priv;

  GtkBuilder *ui;
  CharcoalDB *db;

  // toplevels
  GtkWidget *CharcoalWindow;
};

struct _CharcoalAppClass {
  GObjectClass parent_class;
};

GType charcoal_app_get_type(void) G_GNUC_CONST;
CharcoalApp *charcoal_app_new(void);
void charcoal_app_quit(CharcoalApp *app);

G_END_DECLS

#endif /* __CHARCOAL_APP_H__ */

Thank you for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T09:43:57+00:00Added an answer on May 13, 2026 at 9:43 am

    CharcoalApp is not declared in global.h. Suppose you are including CharcoalApp.h in your C file:

    1. CharcoalApp.h is read up to #include “global.h”
    2. global.h is included
    3. Error: expected ‘)’ before ‘*’ token

    You should rearrange your header files properly or use a forward declaration (although I don’t think is needed in this case).


    There are many solutions:

    1. the proper way: include CharcoalApp.h from global.h, not the reverse;
    2. move typedef struct _CharcoalApp CharcoalApp; before `#include “global.h” in CharcoalApp.h;
    3. remove #include "global.h" from CharcoalApp.h and include them in the proper order (global.h last).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
Specifically, suppose I start with the string string =hello \'i am \' me And
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
This could be a duplicate question, but I have no idea what search terms
I know there's a lot of other questions out there that deal with this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.