thread205-1639461
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:
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;
}
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;
}