Thread: Undefined Reference Errors Related to the Library libdc1394-devel

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    33

    Undefined Reference Errors Related to the Library libdc1394-devel

    I have managed to eliminate all basic errors from my code and get the first stage of compiling working, but when make reaches the next step I get the following errors:

    setup1394.c.text+0x3c): undefined reference to `dc1394_find_cameras'
    setup1394.c.text+0xe9): undefined reference to `dc1394_free_camera'
    setup1394.c.text+0x130): undefined reference to `dc1394_capture_setup'
    setup1394.c.text+0x185): undefined reference to `dc1394_feature_set_mode'
    setup1394.c.text+0x1ce): undefined reference to `dc1394_feature_set_value'
    setup1394.c.text+0x264): undefined reference to `dc1394_video_set_transmission'
    setup1394.c.text+0x2d8): undefined reference to `dc1394_video_get_transmission

    Now every one of the functions listed here has a prototype defined in dc1394_control.h, which is part of the libdc1394-devel libraries I downloaded through YaST. Why is it that a bunch of functions defined in libraries that I have installed are not defined in the compiler?

    Thanks for the help.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Are you actually linking against that library, e.g "gcc ... -ldc1394 "

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Registered User
    Join Date
    Oct 2007
    Posts
    33
    I am linking against -ldc1394_control

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    and if you do "nm /usr/lib/libdc1394_control.a" it shows those names?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    Registered User
    Join Date
    Oct 2007
    Posts
    33
    Looks like it does not. Those names are listed in /usr/include/libdc1394/dc1394_control.h, but do not show up under /usr/lib/libdc1394_control.a

  6. #6
    Registered User
    Join Date
    Oct 2007
    Posts
    33
    I looked up the file list for libdc1394-devel package under YaST. Under file list it shows that this package installed both /usr/lib/libdc1394_control.a, that does not list the functions I posted above, and it also installed /usr/include/dc1394/dc1394_control.h, which does list all of the functions I posted above.

    Ok, I think I managed to find the functions. They are listed in a file called /usr/lib/libdc1394.a, which was also installed by the libdc1394-devel package. I just hope I can figure out to get it to link in the make file.

    Thanks for the help.
    Last edited by Phanixis; 10-09-2007 at 01:25 PM.

  7. #7
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I believe that you should be able to link it just like I described in my first post (or something similar to it).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  8. #8
    Registered User
    Join Date
    Oct 2007
    Posts
    33
    Yes, I was able to link it as you described in the first post. The only thing not linking now is a function that is part of the code.

    Thanks again.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 2
    Last Post: 12-12-2007, 06:45 AM
  2. Gnarly Linking Error HELP!!!!
    By brooksbp in forum C++ Programming
    Replies: 8
    Last Post: 05-04-2007, 01:00 AM
  3. Question about OpenGL/Linux
    By Ideswa in forum Linux Programming
    Replies: 12
    Last Post: 09-10-2006, 05:56 AM
  4. Size of text
    By DarkDarkDark in forum C++ Programming
    Replies: 28
    Last Post: 08-02-2006, 04:46 PM
  5. qt help
    By Unregistered in forum Linux Programming
    Replies: 1
    Last Post: 04-20-2002, 09:51 AM