Find the answer to your Linux question:
Page 2 of 2 FirstFirst 1 2
Results 11 to 12 of 12
Originally Posted by Rubberman If you are running a 64bit system, you can be running either 32bit or 64bit executables. For 32bit ones, the default library path is /usr/lib and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #11
    Just Joined!
    Join Date
    Oct 2009
    Posts
    13

    Thx


    Quote Originally Posted by Rubberman View Post
    If you are running a 64bit system, you can be running either 32bit or 64bit executables. For 32bit ones, the default library path is /usr/lib and for 64bit ones the default is /usr/lib64. So, it is possible that you are not linking with the library you think you are.

    That said, in the file sniffer3.c it is using the symbols pcap_fopen_offline and pcap_dispatch that haven't been implemented (functions) or declared (variables) in any of the linked components. Assuming that you had no linkage errors when you built the executable, it most likely means that you aren't loading the library at run time that was found at link time. If that version is somewhere other than in the default library path, then you can prefix the actual directory the correct version is in to the LD_LIBRARY_PATH environment variable. When your executable runs, it will use that to find shared libraries to use when resolving dynamically linked symbols before it goes to the default library directories.
    Thank you for you reply. I was able to work with this.
    But it wasn't the problem. I got this error while compiling not while running (i have to be more precise).
    But compiling works with gcc mycode.c -lpcap

    P.S. I didn't use a 64bit os

  2. #12
    Just Joined!
    Join Date
    Oct 2009
    Posts
    13
    Quote Originally Posted by MonsterreactioN View Post
    Thank you for you reply. I was able to work with this.
    But it wasn't the problem. I got this error while compiling not while running (i have to be more precise).
    But compiling works with gcc mycode.c -lpcap

    P.S. I didn't use a 64bit os
    Have some guy an Idea how i can do the -lpcap thing with Qt(C++)??

Page 2 of 2 FirstFirst 1 2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •