<?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[Building a 32bit application on a 64bit machine.]]></title><description><![CDATA[<p dir="auto">I'm getting close.</p>
<p dir="auto">I'm using mkspec linux-g++-32, and the CFLAGS, CXXFLAGS and LFLAGS all have -m32 in them and all of the object files are compiled into 32 bit.</p>
<p dir="auto">But the linker is still using -L/usr/lib/x86_64-linux-gnu and not -L/usr/lib/i386-linux-gnu and I can not seem to find out how to fix it.  Here is a copy of the linker line:</p>
<p dir="auto">*g++ -m32 -o Test2 main.o    -L/usr/lib/x86_64-linux-gnu -L/usr/share/jps-audioproc-third-party/boost/lib -lboost_program_options -lboost_system -lboost_thread -L/usr/lib/i386-linux-gnu -lQtCore -lpthread *</p>
<p dir="auto">I have tried to remove the x86_64 directory by:   <em>LIBS -= -L/usr/lib/x86_64-linux-gnu</em> but that did not work.</p>
<p dir="auto">I tried changing the Projects-&gt;Build Settings-&gt;Build Environment-&gt;LD_LIBRARY_PATH to /usr/lib/i386-linux-gnu.  But that did not help.</p>
<p dir="auto">The error I get is a sequence of errors in the link process like this one:</p>
<p dir="auto"><em>/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libpthread.so when searching for -lpthread</em></p>
<p dir="auto">and here is a copy of my .pro file.</p>
<p dir="auto">*#-------------------------------------------------</p>
<h1></h1>
<h1>Project created by QtCreator 2014-10-14T11:06:28</h1>
<h1></h1>
<p dir="auto">#-------------------------------------------------</p>
<p dir="auto">QT       += core</p>
<p dir="auto">QT       -= gui</p>
<p dir="auto">QMAKESPEC=linux-g++-32</p>
<p dir="auto">QMAKE_CXXFLAGS += -std=c++0x<br />
QMAKE_CXXFLAGS += -O0</p>
<p dir="auto">INCLUDEPATH += /usr/share/jps-audioproc-third-party/boost/include<br />
LIBS += -L/usr/share/jps-audioproc-third-party/boost/lib -lboost_program_options -lboost_system -lboost_thread<br />
LIBS += -L/usr/lib/i386-linux-gnu -lpthread<br />
LIBS -= -L/usr/lib/x86_64-linux-gnu</p>
<p dir="auto">TARGET = Test2<br />
CONFIG   += console<br />
CONFIG   -= app_bundle</p>
<p dir="auto">TEMPLATE = app</p>
<p dir="auto">SOURCES += main.cpp*</p>
]]></description><link>https://forum.qt.io/topic/47070/building-a-32bit-application-on-a-64bit-machine</link><generator>RSS for Node</generator><lastBuildDate>Mon, 04 May 2026 16:58:46 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/47070.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Oct 2014 14:00:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Building a 32bit application on a 64bit machine. on Fri, 17 Oct 2014 12:26:19 GMT]]></title><description><![CDATA[<p dir="auto">I installed the 32 bit libraries in Ubuntu by running this:<br />
@sudo apt-get install ia32-libs@</p>
<p dir="auto">And yes I changed the makespec to 32 bit by putting this line in the *.pro file:<br />
@QMAKESPEC=linux-g++-32@</p>
<p dir="auto">But I also changed Projects-&gt;Build Settings-&gt;Build Steps-&gt;qmake-&gt;Additional arguments to:<br />
@ -spec linux-g++-32@</p>
]]></description><link>https://forum.qt.io/post/247976</link><guid isPermaLink="true">https://forum.qt.io/post/247976</guid><dc:creator><![CDATA[weaver4]]></dc:creator><pubDate>Fri, 17 Oct 2014 12:26:19 GMT</pubDate></item><item><title><![CDATA[Reply to Building a 32bit application on a 64bit machine. on Wed, 15 Oct 2014 20:17:57 GMT]]></title><description><![CDATA[<p dir="auto">May I ask how you got 32bit Qt libraries on your 64bit machine. And have you checke the makespec system?</p>
]]></description><link>https://forum.qt.io/post/247691</link><guid isPermaLink="true">https://forum.qt.io/post/247691</guid><dc:creator><![CDATA[t3685]]></dc:creator><pubDate>Wed, 15 Oct 2014 20:17:57 GMT</pubDate></item><item><title><![CDATA[Reply to Building a 32bit application on a 64bit machine. on Wed, 15 Oct 2014 16:33:44 GMT]]></title><description><![CDATA[<p dir="auto">This can't be the right way to fix this, but....<br />
In Projects-&gt;Build Settings-&gt;Build Steps between the qmake and make steps I added a new step that does this:</p>
<p dir="auto">sed -i 's|-L/usr/lib/x86_64-linux-gnu|-L/usr/lib/i386-linux-gnu|' Makefile</p>
<p dir="auto">to change the location of the libraries.  And it works now.</p>
<p dir="auto">come-on-people...there must be a correct way.</p>
]]></description><link>https://forum.qt.io/post/247668</link><guid isPermaLink="true">https://forum.qt.io/post/247668</guid><dc:creator><![CDATA[weaver4]]></dc:creator><pubDate>Wed, 15 Oct 2014 16:33:44 GMT</pubDate></item><item><title><![CDATA[Reply to Building a 32bit application on a 64bit machine. on Wed, 15 Oct 2014 15:18:21 GMT]]></title><description><![CDATA[<p dir="auto">If I go into the make file and change:<br />
-L/usr/lib/x86_64-linux-gnu<br />
to<br />
-L/usr/lib/i386-linux-gnu<br />
in the LIBS line it all works!!</p>
<p dir="auto">Of course next time qmake runs it is reverted.</p>
<p dir="auto">But, I can't find out where qmake gets that variable.</p>
]]></description><link>https://forum.qt.io/post/247656</link><guid isPermaLink="true">https://forum.qt.io/post/247656</guid><dc:creator><![CDATA[weaver4]]></dc:creator><pubDate>Wed, 15 Oct 2014 15:18:21 GMT</pubDate></item><item><title><![CDATA[Reply to Building a 32bit application on a 64bit machine. on Wed, 15 Oct 2014 14:35:18 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I got around the problem by installing a 32-bit virtual machine on my 64-bit machine. If you find a better way, I'm very interested :).</p>
]]></description><link>https://forum.qt.io/post/247650</link><guid isPermaLink="true">https://forum.qt.io/post/247650</guid><dc:creator><![CDATA[t3685]]></dc:creator><pubDate>Wed, 15 Oct 2014 14:35:18 GMT</pubDate></item></channel></rss>