Need help in an undefined reference linker error

H

Herman.Schultz

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.
 
B

BobR

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'.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top