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 6602017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:49:37+00:00 2026-05-25T18:49:37+00:00

i have a c-file containing some dbus stuff and implementing the dbus.h. this is

  • 0

i have a c-file containing some dbus stuff and implementing the dbus.h. this is working fine so far. now i intent to split my c-file in a c-file and a header-file. but now – the compile process failes with:

gcc -o dbus `pkg-config --cflags --libs dbus-1` dbus.c
In file included from dbus.c:1:0:
dbus.h:12:27: error: unknown type name ‘DBusMessage’
dbus.h:12:45: error: unknown type name ‘DBusConnection’
dbus.c: In function ‘dbus_send_signal’:
dbus.c:8:4: error: unknown type name ‘DBusMessage’
dbus.c:9:4: error: unknown type name ‘DBusMessageIter’
...

i just split the former c-file like this:

#include "dbus.h" // include local dbus.h

/**
 * Connect to the DBUS bus and send a broadcast signal
 */
void dbus_send_signal(char* sigvalue)
{
   DBusMessage* msg;
   DBusMessageIter args;
   DBusConnection* conn;
   ...

and the local-header dbus.h file:

#ifndef DBUS_H
#define DBUS_H

#include <dbus/dbus.h> // include the global dbus.h
#include <stdbool.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>

void dbus_listen();
void dbus_send_signal(char *sigvalue);
...

i didn’t change the code itself so i am a little bit confused. just splitting the content in a c- and h-file.
have u an idea? are the gcc parameters wrong?

  • 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-25T18:49:38+00:00Added an answer on May 25, 2026 at 6:49 pm

    It’s just a guess, but perhaps <dbus/dbus.h> also contains

    #ifndef DBUS_H
    #define DBUS_H
    

    You need to make them not the same, e.g. change your local one to

    #ifndef LOCAL_DBUS_H
    #define LOCAL_DBUS_H
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a plain text file looking like this: some text containing line breaks
I have a CSV file containing some user data it looks like this: 10333,,an.10,Kenyata,,Aaron,,,,,,,,,,
I have a c++ header file containing a class. I want to use this
I have C header file containing the following type definition: // example.h typedef struct
Imagine I have an input file,an output file and a file containing some elisp
I'm messing around in Ruby some more. I have a file containing a class
I have a text file containing data like this: This is just text -------------------------------
Lets say I have some random .cs file containing a class with some properties
If I have a file containing some escaped parens, how can I replace all
I have a simple text file containing some CSV with the following structure: @Parent1_Field1,

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.