By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,513 Members | 1,604 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,513 IT Pros & Developers. It's quick & easy.

Need help in an undefined reference linker error

P: n/a
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 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a

<He************@gmail.comwrote 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
May 24 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.