<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[&quot;Undefined symbols&quot; linking to external library [Mac]]]></title><description><![CDATA[<p dir="auto">Hi all,<br />
I've added a library to my .pro</p>
<p dir="auto">@macx: LIBS += $$PWD/fbx/lib/libfbxsdk-2013.1-staticd.a@</p>
<p dir="auto">which is respected, as the log from the build shows:</p>
<p dir="auto">@14:56:41: Starting: "/usr/bin/make" -w<br />
make: Entering directory `/Users/mlaff/Projects/MicaC++-build-desktop-Desktop_Qt_4_8_0_for_GCC__Qt_SDK__Debug'<br />
g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o MicaC++.app/Contents/MacOS/MicaC++ MicaApp.o MainWidget.o FbxContext.o PreviewWidget.o PlayerControlWidget.o QtGlContext.o FbxSceneRenderer.o moc_MicaApp.o moc_MainWidget.o moc_PreviewWidget.o moc_PlayerControlWidget.o   -F/Users/mlaff/QtSDK/Desktop/Qt/4.8.0/gcc/lib -L/Users/mlaff/QtSDK/Desktop/Qt/4.8.0/gcc/lib /Users/mlaff/Projects/MicaQt/fbx/lib/libfbxsdk-2013.1-staticd.a -framework QtOpenGL -framework QtGui -framework QtCore -framework OpenGL -framework AGL @</p>
<p dir="auto">but I get "Undefined symbols:"</p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/undefined">@<bdi>Undefined</bdi></a> symbols:<br />
"fbxsdk_2012_2::KFbxIOSettings::Create(fbxsdk_2012_2::KFbxSdkManager*, char const*)", referenced from:<br />
InitializeSdkObjects(fbxsdk_2012_2::KFbxSdkManager*&amp;, fbxsdk_2012_2::KFbxScene*&amp;)in FbxContext.o<br />
"fbxsdk_2012_2::KFbxIOSettings::SetBoolProp(char const*, bool)", referenced from:<br />
LoadScene(fbxsdk_2012_2::KFbxSdkManager*, fbxsdk_2012_2::KFbxDocument*, char const*)in FbxContext.o...@</p>
<p dir="auto">If I look at the ".a" file for this library, I see what looks like the correct entry point defined:<br />
@{mlaff@YP-0013-mlaff:503} nm /Users/mlaff/Projects/MicaQt/fbx/lib/libfbxsdk-2013.1-staticd.a | grep SetBoolProp<br />
nm: no name list<br />
00000000000048b4 T __ZN13fbxsdk_2013_113FbxIOSettings11SetBoolPropEPKcb<br />
00000000000477f8 S __ZN13fbxsdk_2013_113FbxIOSettings11SetBoolPropEPKcb.eh<br />
00000000000456a7 s <strong>ZZN13fbxsdk_2013_113FbxIOSettings11SetBoolPropEPKcbE12__FUNCTION</strong><br />
U __ZN13fbxsdk_2013_113FbxIOSettings11SetBoolPropEPKcb<br />
U __ZN13fbxsdk_2013_113FbxIOSettings11SetBoolPropEPKcb<br />
U __ZN13fbxsdk_2013_113FbxIOSettings11SetBoolPropEPKcb<br />
U __ZN13fbxsdk_2013_113FbxIOSettings11SetBoolPropEPKcb<br />
U __ZN13fbxsdk_2013_113FbxIOSettings11SetBoolPropEPKcb<br />
U __ZN13fbxsdk_2013_113FbxIOSettings11SetBoolPropEPKcb<br />
@</p>
<p dir="auto">This is on Mac OS X with Qt Creator 2.4.1.</p>
<p dir="auto">I'm new to Qt, and I tried to search out prior answers to no avail, but apologies in advance if this is a common question.</p>
<p dir="auto">Thanks,</p>
<p dir="auto">Mark</p>
]]></description><link>https://forum.qt.io/topic/16401/undefined-symbols-linking-to-external-library-mac</link><generator>RSS for Node</generator><lastBuildDate>Wed, 23 Sep 2026 09:08:59 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/16401.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 02 May 2012 20:00:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to &quot;Undefined symbols&quot; linking to external library [Mac] on Thu, 03 May 2012 20:51:11 GMT]]></title><description><![CDATA[<p dir="auto">For checking the library try using otool (eg. otool -hv) and see if it reveals anything extra.</p>
]]></description><link>https://forum.qt.io/post/137996</link><guid isPermaLink="true">https://forum.qt.io/post/137996</guid><dc:creator><![CDATA[sptrakesh]]></dc:creator><pubDate>Thu, 03 May 2012 20:51:11 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Undefined symbols&quot; linking to external library [Mac] on Thu, 03 May 2012 07:03:39 GMT]]></title><description><![CDATA[<p dir="auto">Pardon me, I think what you done previously is correct, since this is a static library.<br />
@macx: LIBS += $$PWD/fbx/lib/libfbxsdk-2013.1-staticd.a@</p>
<p dir="auto">unfortunately I am not sure why this is giving un-resolved symbols, since you mentioned that this is having correct architecture as well.</p>
]]></description><link>https://forum.qt.io/post/137867</link><guid isPermaLink="true">https://forum.qt.io/post/137867</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Thu, 03 May 2012 07:03:39 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Undefined symbols&quot; linking to external library [Mac] on Thu, 03 May 2012 05:07:13 GMT]]></title><description><![CDATA[<p dir="auto">I think I've made the change you suggested, but now the compile can't find the library at all.</p>
<p dir="auto">Updated .pro:</p>
<p dir="auto">@macx: LIBS += -l$$PWD/fbx/lib/libfbxsdk-2013.1-staticd.a@</p>
<p dir="auto">but it looks like it is looking at a path with the "-l" at the head, not treating it as an option.</p>
<p dir="auto">@01:03:49: Running build steps for project MicaC++...<br />
01:03:49: Configuration unchanged, skipping qmake step.<br />
01:03:49: Starting: "/usr/bin/make" -w<br />
make: Entering directory <code>/Users/mlaff/Projects/MicaC++-build-desktop-Desktop_Qt_4_8_0_for_GCC__Qt_SDK__Debug' /Users/mlaff/QtSDK/Desktop/Qt/4.8.0/gcc/bin/qmake -spec ../../QtSDK/Desktop/Qt/4.8.0/gcc/mkspecs/macx-g++ CONFIG+=declarative_debug -o Makefile ../MicaQt/MicaC++.pro make: Leaving directory </code>/Users/mlaff/Projects/MicaC++-build-desktop-Desktop_Qt_4_8_0_for_GCC__Qt_SDK__Debug'<br />
make: Entering directory <code>/Users/mlaff/Projects/MicaC++-build-desktop-Desktop_Qt_4_8_0_for_GCC__Qt_SDK__Debug' g++ -headerpad_max_install_names -arch x86_64 -Xarch_x86_64 -mmacosx-version-min=10.5 -o MicaC++.app/Contents/MacOS/MicaC++ MicaApp.o MainWidget.o FbxContext.o PreviewWidget.o PlayerControlWidget.o QtGlContext.o FbxSceneRenderer.o moc_MicaApp.o moc_MainWidget.o moc_PreviewWidget.o moc_PlayerControlWidget.o   -F/Users/mlaff/QtSDK/Desktop/Qt/4.8.0/gcc/lib -L/Users/mlaff/QtSDK/Desktop/Qt/4.8.0/gcc/lib -l/Users/mlaff/Projects/MicaQt/fbx/lib/libfbxsdk-2013.1-staticd.a -framework QtOpenGL -framework QtGui -framework QtCore -framework OpenGL -framework AGL  ld: library not found for -l/Users/mlaff/Projects/MicaQt/fbx/lib/libfbxsdk-2013.1-staticd.a collect2: ld returned 1 exit status make: *** [MicaC++.app/Contents/MacOS/MicaC++] Error 1 make: Leaving directory </code>/Users/mlaff/Projects/MicaC++-build-desktop-Desktop_Qt_4_8_0_for_GCC__Qt_SDK__Debug'<br />
01:03:51: The process "/usr/bin/make" exited with code 2.<br />
Error while building project MicaC++ (target: Desktop)<br />
When executing build step 'Make'@</p>
]]></description><link>https://forum.qt.io/post/137853</link><guid isPermaLink="true">https://forum.qt.io/post/137853</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Thu, 03 May 2012 05:07:13 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Undefined symbols&quot; linking to external library [Mac] on Thu, 03 May 2012 02:37:51 GMT]]></title><description><![CDATA[<p dir="auto">Would you try prefixing -l to the LIBS variable like below?</p>
<p dir="auto">@<br />
macx: LIBS += -l$$PWD/fbx/lib/libfbxsdk-2013.1-staticd.a<br />
@</p>
]]></description><link>https://forum.qt.io/post/137844</link><guid isPermaLink="true">https://forum.qt.io/post/137844</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Thu, 03 May 2012 02:37:51 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Undefined symbols&quot; linking to external library [Mac] on Thu, 03 May 2012 00:34:31 GMT]]></title><description><![CDATA[<p dir="auto">Here is the description for the library I'm using (the Autodesk FBX SDK)</p>
<p dir="auto">bq. &lt;yourFBXSDKpath&gt;\lib\gcc4\ub\fbxsdk-2013-staticd.a gcc 4.0 compiler, static library, debug, Intel 32-bit (i386) and Intel 64-bit (x86_64)</p>
<p dir="auto">and I believe the following indicates that both architectures are included:</p>
<p dir="auto">bq. {mlaff@YP-0013-mlaff:508} file libfbxsdk-2013.1-staticd.a<br />
libfbxsdk-2013.1-staticd.a: Mach-O universal binary with 2 architectures<br />
libfbxsdk-2013.1-staticd.a (for architecture i386): current ar archive random library<br />
libfbxsdk-2013.1-staticd.a (for architecture x86_64): current ar archive random library</p>
]]></description><link>https://forum.qt.io/post/137835</link><guid isPermaLink="true">https://forum.qt.io/post/137835</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Thu, 03 May 2012 00:34:31 GMT</pubDate></item><item><title><![CDATA[Reply to &quot;Undefined symbols&quot; linking to external library [Mac] on Wed, 02 May 2012 21:27:32 GMT]]></title><description><![CDATA[<p dir="auto">Does the static lib contain the correct architecture? It must at least have all the version that your application is compiled against.</p>
]]></description><link>https://forum.qt.io/post/137817</link><guid isPermaLink="true">https://forum.qt.io/post/137817</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Wed, 02 May 2012 21:27:32 GMT</pubDate></item></channel></rss>