473,320 Members | 1,951 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Need help in an undefined reference linker error

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
1 1948

<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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Christian Christmann | last post by:
Hi, I've created a file htable.cpp which I compiled to htable.o and than added with "ar" to a library libbasics.a in the directory lib/Linux/. Now I want to compile another file ir3tst.cpp which...
11
by: Micha | last post by:
Hello there, I think I've run into some classic c++ pitfall and maybe some of you guys can help me out. For my project I will need to use matrices and vectors and so I decided to implement them...
10
by: siroregano | last post by:
Hello- I've got a nice C program written that uses libsndfile (#include <sndfile.h>) to convert my raw data into a properly-formatted wav file. The program is composed of a single .c file that...
4
by: Mark | last post by:
Hi, I'm trying to write some classes that kind of manage themselves. A linked list, that links different types of objects. Here's the code... object.h: --- class Object { int alt;
8
by: vfunc | last post by:
I get compile error: undefined reference to snd_pcm_format_width. I included the library directory with -I flag on gcc. #include <stdio.h> #include <stdlib.h> #include <string.h> #include...
8
by: pavan734 | last post by:
Hello, Please excuse me as Iam not posting this to correct group. I have a parser code obtained from flex command. I have many other files. When I compile them Iam getting a message like:...
2
by: Manuel T | last post by:
Hello everybody, I'm trying to port a project from Windows+Cygwin to Linux(i'm working on a Debian-like: Kubuntu), but I'm facing a lot of linking problems. This project needs libraries xerces...
8
by: wdh3rd | last post by:
I'm still new at C and can't solve this problem. I've looked through the FAQ and on the Web, but am not having luck. I'm getting an "undefined reference" error as well as a "Id returned 1 exit...
3
by: prakash.mirji | last post by:
Hello, I am getting below mention linker error when I tried to link my class test.C I use below command to compile test.C /usr/bin/g++ -g -fpic -fvisibility=default -D_POSIX_SOURCE...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.