Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Need help in an undefined reference linker error

Reply
Thread Tools

Need help in an undefined reference linker error

 
 
Herman.Schultz@gmail.com
Guest
Posts: n/a
 
      05-24-2007
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.

 
Reply With Quote
 
 
 
 
BobR
Guest
Posts: n/a
 
      05-24-2007

<(E-Mail Removed)> 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linker error: undefined reference prakash.mirji@gmail.com C++ 3 05-10-2007 02:55 AM
[Linker error] undefined reference to `CGI::query' Oliver Bleckmann C++ 1 11-30-2006 08:26 AM
[Linker error] undefined reference to vtable Mark C++ 4 03-13-2006 02:53 AM
[Linker error] undefined reference... pliki .h... dev-c++ s_4@wp.pl C++ 4 12-16-2005 07:15 PM
Compiler/Linker Error undefined reference to 'std::ios_base::Init::Init[in-charge]() clusardi2k@aol.com C++ 1 08-18-2005 07:11 PM



Advertisments