×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Problems with libdc1394

Problems with libdc1394

Problems with libdc1394

(OP)
thread205-1639461: function declaration of undefined type

Hi!

My name is Tery and I am a new user of that library, I need to control the camera AVT Manta G-504B and I had installes all the programs, packets and libraries. So, I would like to know haw to solve the problem related with the libraries, because, I am trying to compile the file "helloworld.c" with NETBEANS and/or ECLIPSE but there are some problems with the library:

undefined reference to 'dc1394_new'


I don't know how to solve it and I am a little bit desesperate! xD

The program is:

#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
#include <dc1394/dc1394.h>

/*
*
*/
int main(int argc, char *argv[])
{
dc1394camera_t * camera;
dc1394error_t err;
dc1394video_frame_t * frame;
dc1394_t * d;
dc1394camera_list_t * list;

d = dc1394_new (); /* Initialize libdc1394 */
if (!d)
return 1;

err=dc1394_camera_enumerate (d, &list); /* Find cameras */
DC1394_ERR_RTN(err,"Failed to enumerate cameras");

if (list->num == 0) { /* Verify that we have at least one camera */
dc1394_log_error("No cameras found");
return 1;
}

camera = dc1394_camera_new (d, list->ids[0].guid); /* Work with first camera */
if (!camera) {
dc1394_log_error("Failed to initialize camera with guid %llx", list->ids[0].guid);
return 1;
}
dc1394_camera_free_list (list);

err=dc1394_capture_setup(camera, 4, DC1394_CAPTURE_FLAGS_DEFAULT); /* Setup capture */

err=dc1394_video_set_transmission(camera, DC1394_ON); /* Start transmission */

err=dc1394_capture_dequeue(camera, DC1394_CAPTURE_POLICY_WAIT, &frame);/* Capture */
DC1394_ERR_RTN(err,"Problem getting an image");

err=dc1394_capture_enqueue(camera, frame); /* Release the buffer */

err=dc1394_video_set_transmission(camera, DC1394_OFF); /* Stop transmission */

err=dc1394_capture_stop(camera); /* Stop capture */

printf("Hello World\n"); /* Hey, this is a HELLO WORLD program!! */

dc1394_camera_free (camera); /* cleanup and exit */
dc1394_free (d);
return 0;
}

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close