LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   help for kudzu/kudzu.h (https://www.linuxquestions.org/questions/programming-9/help-for-kudzu-kudzu-h-269537/)

alrawab 12-23-2004 08:47 AM

help for kudzu/kudzu.h
 
hi
im traying to use libkudzu by use c++ (qt).....
i gote alote of error even with adding
LIBS += -lpci -lkudzu -lkudzu_loader
so can any one help me to complete compiling my programe
or help to find another lib insted of kudzu to detect hardware
thnx

bm17 12-23-2004 10:33 AM

Are you getting unresolved symbol references? That might be because c++ is mangling the function names. It need to do this to avoid confusing "foo(char *)" with "foo(int)" since C++ allows name overloading. Perhaps you need something like this:

extern "C" {
#include <kudzu/kudzu.h>
}

This will cause the variable declarations in kudzu.h to be treated as C code instead of C++ code.

alrawab 12-23-2004 01:08 PM

hay
thanx for replay
i got the same problem even with using the extern statement
so what is wrong
alrawab

bm17 12-23-2004 01:22 PM

You need to tell us what the problem is. What error messages are you getting?

alrawab 12-24-2004 12:23 PM

hi
im writing hardware detecting class in c++ by using libkudzu
importing kudzu by using python script working very will
but i need to use it in my c++ project by including <kudzu/kudzu.h>
so if just including <kudzu/kudzu.h> cause a bug


#include <kudzu/kudzu.h>

main ()
{



}



gcc foo.c -lkudzu -lpci -kudzu_loader


you will got alot of error even with the preproceesor extern
so what is wrong

alrawab 12-24-2004 12:31 PM

hi
im writing hardware detecting class in c++ by using libkudzu
importing kudzu by using python script working very will
but i need to use it in my c++ project by including <kudzu/kudzu.h>
so if just including <kudzu/kudzu.h> cause a bug


#include <kudzu/kudzu.h>

main ()
{



}



gcc foo.c -lkudzu -lpci -kudzu_loader


you will got alot of error even with the preproceesor extern
so what is wrong


All times are GMT -5. The time now is 01:40 PM.