<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[wolfSSL - Embedded SSL Library — Using wolfSSL library in C]]></title>
		<link>https://www.wolfssl.com/forums/topic2553-using-wolfssl-library-in-c.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic2553.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Using wolfSSL library in C.]]></description>
		<lastBuildDate>Tue, 14 Jul 2026 00:55:01 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Using wolfSSL library in C]]></title>
			<link>https://www.wolfssl.com/forums/post8873.html#p8873</link>
			<description><![CDATA[<p>Thanks a lot for the reply, Eric.</p><p>Even as I was posting this question, I knew it was more of a linux question than a wolfssl question. I think I figured out the reason for this discrepancy,</p><p>On the debian machine there is a file /etc/ld.so.conf.d/libc.conf:<br /></p><div class="codebox"><pre><code># libc default configuration
/usr/local/lib</code></pre></div><p>So ld.so looks for the libraries in that directory during the runtime, whereas the arch machine has no such configuration. I had to run sudo ldconfig /usr/local/lib, which adds the directory to /etc/ld.so.cache. I no longer need the symbolic links or to change the prefix while configure-ing.</p><p>I am just learning wolfssl for now to understand TLS.</p>]]></description>
			<author><![CDATA[null@example.com (feynhat)]]></author>
			<pubDate>Tue, 14 Jul 2026 00:55:01 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8873.html#p8873</guid>
		</item>
		<item>
			<title><![CDATA[Re: Using wolfSSL library in C]]></title>
			<link>https://www.wolfssl.com/forums/post8872.html#p8872</link>
			<description><![CDATA[<p>Hi feynhat,</p><p>Welcome to the wolfSSL forums. My first instinct would be to run ldconfig, but you mentioned you did that already.</p><p>Did you get the code from the website download section? Or from github? If from github, try running `./autogen.sh` first, then configure/make/make install.</p><p>Let me know if that helps.</p><p>Could you tell us a bit about your project using wolfSSL?</p><p>Kind regards,<br />Eric - wolfSSL Support</p>]]></description>
			<author><![CDATA[null@example.com (embhorn)]]></author>
			<pubDate>Mon, 13 Jul 2026 19:52:00 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8872.html#p8872</guid>
		</item>
		<item>
			<title><![CDATA[Using wolfSSL library in C]]></title>
			<link>https://www.wolfssl.com/forums/post8871.html#p8871</link>
			<description><![CDATA[<p>Hello. I am new to wolfssl.</p><p>I compiled the latest versions of wolfssl and wolfCLU, on two systems - my laptop running archlinux and a raspberry pi running raspbian (a debian-based distro), and ran ldconfig on both of them.</p><p>On my pi the wolfssl library runs as expected. I run the example server code given here <a href="https://www.wolfssl.com/docs/quickstart/">https://www.wolfssl.com/docs/quickstart/</a> and compile it using </p><div class="codebox"><pre><code>gcc server.c -lwolfssl -o server</code></pre></div><p> and run server. It gives me </p><div class="codebox"><pre><code> listening on port 11111</code></pre></div><p> as expected.</p><p>But if I run it on my archlinux laptop, I get, </p><div class="codebox"><pre><code>./server: error while loading shared libraries: libwolfssl.so.45: cannot open shared object file: No such file or directory</code></pre></div><p>I guess this is happening because the compiled program looks for libraries in /usr/lib but libwolfssl.so.45 gets installed in /usr/local/lib. So one easy fix is to create a symbolic link in /usr/lib that points to /usr/local/lib/libwolfssl.so.45. Another fix would be to provide the correct install prefix /usr/lib while building wolfssl (I haven&#039;t tried this though).</p><p>My question is not about how to fix this or how to get `server` to run, but rather <em>why</em> is this happening. I am trying to understand the compilation process for programs that use wolfssl. What is different on my laptop from my pi that is making this happen? The libwolfssl.so.45 is in /usr/local/lib in both cases.</p><p>Here is the output of gcc -v on both my machines, if that helps:</p><p>On laptop:</p><div class="codebox"><pre><code>Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/16/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,m2,objc,obj-c++,rust,cobol --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://gitlab.archlinux.org/archlinux/packaging/packages/gcc/-/issues --with-build-config=bootstrap-lto --with-gcc-major-version-only --with-linker-hash-style=gnu --with-system-zlib --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-fixincludes --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 16.1.1 20260625 (GCC) </code></pre></div><p>and on pi:</p><div class="codebox"><pre><code>Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/12/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion=&#039;Debian 12.2.0-14+deb12u1&#039; --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=aarch64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --disable-libquadmath-support --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 12.2.0 (Debian 12.2.0-14+deb12u1)</code></pre></div><p>The environment variable $LD_LIBRARY_PATH is not set in both cases.</p>]]></description>
			<author><![CDATA[null@example.com (feynhat)]]></author>
			<pubDate>Mon, 13 Jul 2026 18:06:42 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post8871.html#p8871</guid>
		</item>
	</channel>
</rss>
