Jump to content
  • Advertisement
Sign in to follow this  
helpmenow

trying to build a 32bit binary on my 64bit system but it wont compile for me

This topic is 2869 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im trying to build a 32bit binary on my 64bit system but it wont compile for me.

my comps specs.
OS: ubuntu linux 64bit
Processor: AMD Dual Core x64

Library Dependencies
OpenGL
SDL

i did sudo apt-get install ia32-libs through terminal. so im thinking the libraries are here.

im using code::blocks i created a new build and called it "Release32". added -m32 and `sdl-config --cflags` to project->build_options->compiler_settings->other_options. added `sdl-config --libs` to project->build_options->linker_settings->other_linker_options.everything seems to compile fine. but then it gives me this error

ld cannot find -lSDL

any ways im trying to do this because i want to run this app on a 32bit computer with ubuntu on it.

by the way both of my other builds "debug" and "release" compile and run fine.

Share this post


Link to post
Share on other sites
Advertisement
EDIT: Are you sure sdl-config is giving you the location of the 32-bit libs? I don't see why it would.

Share this post


Link to post
Share on other sites
it seems to work fine on my 64bit builds. so would you know how/where i could tell code::blocks the location of the libraries? i mean what is that error trying to say that it cant find the 32bit version of the libraries?

also im not telling code:blocks where the location of the libraries is. but that doesn't seem to effect my 64bit builds.

Share this post


Link to post
Share on other sites
Quote:
Original post by helpmenow
also im not telling code:blocks where the location of the libraries is.

Of course you are. You may not be aware of it, though. Do you know what the significance of backquotes is in UNIX shell scripting? Do you know what sdl-config does?

Share this post


Link to post
Share on other sites
sorry i haven't been back in a while. anyways Sneftel i don't know the significance of backquotes in linux. i don't mean to sound sarcastic but what is the significance to backquotes. i figured sdl-config just configured the compiler for me. obviously it does something. i just don't know exactly what its doing.

Share this post


Link to post
Share on other sites
does anybody have an idea on how to build a 32 bit binary on a 64 bit system.

COMPILER ERROR:

ld cannot find -lSDL

what do i need to change to fix this error?

Share this post


Link to post
Share on other sites
Sorry, this totally flew under my radar. Hope you're still reading. The significance of backquotes is explained here. Try running that command yourself (sdl-config --libs) and see what it outputs. Remember, sdl-config is either going to report the 32-bit configuration, or the 64-bit configuration; it can't do 'whichever one's the right one'. The --exec-prefix option for sdl-config may help, but you may want to just hardcode in the paths rather than using sdl-config at all.

Share this post


Link to post
Share on other sites
thanks for the reply. as far as the backquotes i read up on that that after you said i should. and for the sdlconfig personally i would rather hardcode the paths its just that on Linux with code blocks ive never had to do it before im only use to msvc++. i know Linux stores libraries under lib32 and lib64. but in MSVC++ all i had to do was put the directory in and the compiler found the library for me. theres like four different ".so" files with sdl in the lib32 folder. anyways thanks for the response.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!