Linux C++ (undefined reference to `CPhidgetRFID_create')

C, C++, and Visual C++
kalbob
Fresh meat
Posts: 4
Joined: Wed Oct 28, 2009 1:58 pm
Location: Ontario Canada
Contact:

Linux C++ (undefined reference to `CPhidgetRFID_create')

Postby kalbob » Thu Oct 29, 2009 2:28 pm

Hello everyone. lol I am feeling quite dumb at this point as i am guessing this is an incredibly easy to fix problem, but I can't see it.

I striped it down to the most basic code and I get the following error. I am at a loss as to what I am doing wrong.

Thanks in advance for the help.

Code: Select all

#include <stdio.h>
#include <stdlib.h>
#include "phidget21.h"


int main() {


   int result;
   const char *err;

   //Declare an RFID handle
   CPhidgetRFIDHandle rfid = 0;

   //create the RFID object
   CPhidgetRFID_create(&rfid);

    return (EXIT_SUCCESS);

}


gcc Main.c
/tmp/ccmaBc4h.o: In function `main':
Main.c:(.text+0x1f): undefined reference to `CPhidgetRFID_create'
collect2: ld returned 1 exit status

User avatar
Patrick
Lead Developer
Posts: 3105
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Linux C++ (undefined reference to `CPhidgetRFID_create')

Postby Patrick » Thu Oct 29, 2009 2:45 pm

gcc -lphidget21 Main.c

-Patrick

kalbob
Fresh meat
Posts: 4
Joined: Wed Oct 28, 2009 1:58 pm
Location: Ontario Canada
Contact:

Re: Linux C++ (undefined reference to `CPhidgetRFID_create')

Postby kalbob » Fri Oct 30, 2009 9:25 am

Worked beautifully, thank you very much.


Return to “C/C++”

Who is online

Users browsing this forum: No registered users and 1 guest