Re: [Hampshire] Building 32-bit apps on 64-bit host

Top Page

Reply to this message
Author: Jonathan Hudson
Date:  
To: hampshire
Subject: Re: [Hampshire] Building 32-bit apps on 64-bit host
On Mon, 5 Jan 2009 12:23:04 +0000
"Richard Danter" <radanter@???> wrote:

> Hi all,
>
> I have been developing a couple of little apps to make my life easier
> at work. All has been going well until my host was upgraded to 64-bit.
> One of the libs I have to use is available only as 32-bit. The apps
> themselves are using Qt and of course they are 64-bit.
>
> Anyone know the correct way to build a 32-bit Qt app on a 64-bit host?
> I am using qmake so I hope that makes it easier!
>
> The host is Ubuntu 8.04 so ideally I would like to do this the Ubuntu
> way, if there is such a thing.
>
> Thanks
> Rich
>


Rich,

Doesn't really answer the question ...

The hard bit is making sure you have all the development libraries
in /usr/lib32. I've built a number of console and gtk apps on x86_64
for an ia32 target with 'CC=gcc -m32', but it may be more complex for
qt.

For gtk (and hence C, not C++),

$ CC='gcc -m32' ./configure && make

Then track down the missing 32 libraries. If you copy them off a 32bit
box, you may need to hack the path in the respective .la files
to /usr/lib32.

-jh