<div dir="ltr">Thanks. I actually figured it out. <div><br></div><div>cmplr = meson.get_compiler('c')<br></div><div>then use x = cmplr.find_library( 'xyz', dirs: 'pathtofile')</div><div>library('plugin name',<br></div><div>dependencies: [x]<br></div><div>....)</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 23, 2020 at 5:56 PM Nicolas Dufresne <<a href="mailto:nicolas@ndufresne.ca">nicolas@ndufresne.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Le jeudi 23 janvier 2020 à 16:07 -0800, Frederic Turmel a écrit :<br>
> Hi, i'm trying to use external static library to my plugin using<br>
> meson. I know this is not directly a gstreamer question but perhaps<br>
> there is a simple answer<br>
> <br>
> The external lib is in C  and configinc has all the lib path<br>
> using include_directories function.<br>
> <br>
> I tried the following command but the linker still complain. <br>
> my_lib = static_library('XXXXX_capture')<br>
> <br>
> my_dep = declare_dependency(link_with : my_lib, include_directories :<br>
> configinc)<br>
> <br>
> Is there an example in the repo? I search but all I could find in<br>
> external dependency that gets build as subproject.<br>
<br>
Prior to meson, we'd use autotools which would use libtools for static<br>
linking. For each .a there would be .la file that describe the link<br>
dependencies. With meson, libtool is no longer used, you need a<br>
<mylib>.pc file (pkg-config) with a Libs.private section.<br>
<br>
You can of course pass all the deps manually, but if you are looking<br>
for examples of what parameter being pass, you'll have to look inside<br>
these .pc files. Note that not all projects have Libs.private or a<br>
proper implementation of it yet. <br>
<br>
> <br>
> Thanks<br>
> FredT<br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div>