Need help in an undefined reference linker error

Discussion in 'C++' started by Herman.Schultz@gmail.com, May 24, 2007.

  1. Guest

    I am getting the following undefined reference linker error when I
    compile my program:

    FileModule.o: In function `DoFile':
    /home/herman/src/FileModule.cpp:665: undefined reference to `VLC_Init'
    collect2: ld returned 1 exit status

    I have added libvlc.so file to my 'LIBFILES in my Makefile:
    LIBFILES = QTFileLib/libQTFileLib.a \
    /home/herman/bin/lib/libvlc.so

    And I have added '-Llibvlc' to the LINKOPTS:
    LINKOPTS += -Llibvlc

    and my program compiles like this:

    MyServer: $(CFILES:.c=.o) $(CPPFILES:.cpp=.o) $(LIBFILES)
    $(LINK) -o $@ $(CFILES:.c=.o) $(CPPFILES:.cpp=.o) $(COMPILER_FLAGS) $
    (LINKOPTS) $(LIBS)


    Can you please tell me what am I missing?

    Thank you.
     
    , May 24, 2007
    #1
    1. Advertising

  2. BobR Guest

    Re: Need help in an undefined reference linker error [OT]

    <> wrote in message ...
    > I am getting the following undefined reference linker error when I
    > compile my program:
    >
    > FileModule.o: In function `DoFile':
    > /home/herman/src/FileModule.cpp:665: undefined reference to `VLC_Init'
    > collect2: ld returned 1 exit status
    >
    > I have added libvlc.so file to my 'LIBFILES in my Makefile:
    > LIBFILES = QTFileLib/libQTFileLib.a \
    > /home/herman/bin/lib/libvlc.so
    >
    > And I have added '-Llibvlc' to the LINKOPTS:
    > LINKOPTS += -Llibvlc



    <OT>
    You are using an uppercase 'L' where a lowercase should be.
    '-L' is for the search paths.
    I think you want something like '-lvlc'.

    --
    Bob R
    POVrookie
     
    BobR, May 24, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    664
    Jules
    Aug 18, 2005
  2. Replies:
    4
    Views:
    1,645
    Peter Jansson
    Dec 16, 2005
  3. Mark
    Replies:
    4
    Views:
    6,152
    Githlar
    Mar 13, 2006
  4. Oliver Bleckmann
    Replies:
    1
    Views:
    519
    Rud1ger Sch1erz
    Nov 30, 2006
  5. Replies:
    3
    Views:
    596
Loading...

Share This Page