Link shared library in Kdevelop
Dear friends,
I am now using Kdevelop to build a project on video processing. I use the libavcodec library to decode video file. But I have problems in linking the shared library of libavcodec to my project.
I follow many instructions on web and do like this:
- Select Project--> Project options --> configures options, I enter the path of the lib in the Linker flags(LDFLAGS) textbox like this: -L/usr/local/lib
- In the Automake manager I select Subproject --> right click on the Program in Bin
--> Options --> Libraries and I add the two library: -lavcodec -lavformat in the box "Library outside project (LDADD)".
But thing doesn't work out. I call the function av_register_all() and get the error:
undefined reference to `av_register_all()'
Then I try like this:
select Subproject --> right click on the Program in Bin
--> Options --> Flags, the I append -lavcodec -lavformat after $(KDE_RPATH) $(all_libraries) in the box Others but error still occurs.
I also add the line LDFLAGS = -L/usr/local/lib -lavcodec -lavformat in the makefile (/debug/makefile), but nothing changes
Could you please give me some instruction ?
I use Kdevelop 3.3.6 and KDE 3.5.6
Thank you very much
Last edited by neikinfology; 07-12-2007 at 03:36 AM.
|