LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 12-23-2004, 08:47 AM   #1
alrawab
Member
 
Registered: Dec 2002
Location: Libya
Distribution: RHLE 5 + slackware 12
Posts: 60

Rep: Reputation: 15
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
 
Old 12-23-2004, 10:33 AM   #2
bm17
Member
 
Registered: Sep 2004
Location: Santa Cruz, CA, USA
Distribution: Redhat 9.0
Posts: 104

Rep: Reputation: 15
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.
 
Old 12-23-2004, 01:08 PM   #3
alrawab
Member
 
Registered: Dec 2002
Location: Libya
Distribution: RHLE 5 + slackware 12
Posts: 60

Original Poster
Rep: Reputation: 15
hay
thanx for replay
i got the same problem even with using the extern statement
so what is wrong
alrawab
 
Old 12-23-2004, 01:22 PM   #4
bm17
Member
 
Registered: Sep 2004
Location: Santa Cruz, CA, USA
Distribution: Redhat 9.0
Posts: 104

Rep: Reputation: 15
You need to tell us what the problem is. What error messages are you getting?
 
Old 12-24-2004, 12:23 PM   #5
alrawab
Member
 
Registered: Dec 2002
Location: Libya
Distribution: RHLE 5 + slackware 12
Posts: 60

Original Poster
Rep: Reputation: 15
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
 
Old 12-24-2004, 12:31 PM   #6
alrawab
Member
 
Registered: Dec 2002
Location: Libya
Distribution: RHLE 5 + slackware 12
Posts: 60

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
kudzu allelopath Linux - General 1 06-09-2003 12:53 PM
Kudzu j0rg3 Linux - Newbie 1 04-20-2003 04:01 PM
Help with kudzu! fl0ppy Linux - Software 1 11-12-2002 11:06 AM
Kudzu LinuxQuest01 Linux - Software 2 07-23-2002 11:13 AM
Kudzu BaRRaCuda Linux - Newbie 5 05-13-2002 03:46 PM


All times are GMT -5. The time now is 02:25 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration