Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3982850
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:34:39+00:00 2026-05-20T05:34:39+00:00

I’m trying to crosscompile simple SDL application for ARM processor. I’m using Motorola A1200

  • 0

I’m trying to crosscompile simple SDL application for ARM processor.

I’m using
Motorola A1200 with Intel Xscale PX27x rev 7 (with iwmmxt extension) processor
And modified crosscompiling toolchain with for example, gcc:

arm-linux-gnu-g++ --version
arm-linux-gnu-g++ (GCC) 3.3.6
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ arm-linux-gnu-g++ -v
Reading specs from /opt/crosstool/bin/../lib/gcc-lib/arm-linux-gnu/3.3.6/specs
Configured with: /home/nuso2f/mkezx-0.9.20/build/host/crosstool-ezx/configure --host=i486-host_linux-gnu --target=arm-linux-gnu --prefix=/home/nuso2f/mkezx-0.9.20/build/host/crosstool-ezx.fake_root --with-cpu=iwmmxt --enable-cxx-flags=-mcpu=iwmmxt --with-float=soft --with-headers=/home/nuso2f/mkezx-0.9.20/build/host/crosstool-ezx.fake_root/arm-linux-gnu/include --with-local-prefix=/home/nuso2f/mkezx-0.9.20/build/host/crosstool-ezx.fake_root/arm-linux-gnu --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++,f77 --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.3.6

To be honest, this compiler was compiled not by me, so paths stated above are not valid.

And some directory with libraries like libSDL libSDL_mixer and so on
I’ve checked all this libraries if they are for ARM.

$ file *.so*
ELF 32-biarm-linux-gnu-g++ ttt.cpp -o ttt.arm -I/usr/include -L`pwd`

So they are.

Then I have copied libSDL-1.2.so to the project directory. Checked symbols from that library

readelf --syms libSDL-1.2.so

All fine.

And then tried to compile:
(Note that arm-linux-gnu-g++ ($CXX) and other corresponding environmental variables, such as $LD, $AR and other are set corresponding to crosscompile toolchain location)

$ arm-linux-gnu-g++ ttt.cpp -o ttt.arm -I/usr/include -L`pwd`
/tmp/ccXpDX0V.o(.text+0xb0): In function `main':
: undefined reference to `SDL_Init'
/tmp/ccXpDX0V.o(.text+0xd8): In function `main':
: undefined reference to `SDL_SetVideoMode'
/tmp/ccXpDX0V.o(.text+0x170): In function `main':
: undefined reference to `SDL_UpperBlit'
/tmp/ccXpDX0V.o(.text+0x17c): In function `main':
: undefined reference to `SDL_Flip'
/tmp/ccXpDX0V.o(.text+0x1c8): In function `main':
: undefined reference to `SDL_PollEvent'
/tmp/ccXpDX0V.o(.text+0x2d8): In function `$a':
: undefined reference to `SDL_FillRect'
/tmp/ccXpDX0V.o(.text+0x334): In function `myabort(char const*)':
: undefined reference to `SDL_GetError'
/tmp/ccXpDX0V.o(.text+0x380): In function `my_img_load(char*)':
: undefined reference to `SDL_RWFromFile'
/tmp/ccXpDX0V.o(.text+0x390): In function `my_img_load(char*)':
: undefined reference to `SDL_LoadBMP_RW'
/tmp/ccXpDX0V.o(.text+0x3b8): In function `my_img_load(char*)':
: undefined reference to `SDL_DisplayFormatAlpha'
/tmp/ccXpDX0V.o(.text+0x3c8): In function `my_img_load(char*)':
: undefined reference to `SDL_FreeSurface'
collect2: ld returned 1 exit statust LSB shared object, ARM, version 1, dynamically linked, stripped

Though when I’m trying to compile like this

arm-linux-gnu-g++ ttt.cpp -o ttt.arm -I/usr/include ./libSDL-1.2.so

It does compile and link (I hope) against SDL, but there are another link errors but with symbols from qt library (with which SDL is linked, I think), so it is NOT solution, because I don’t know to which libraries those symbols belong.

So the questions are:

Am I doing something fundamentally wrong with dynamic linking?

Why -L option doesn’t help gcc link with libraries in that dir?

Can I force compiling my program without this libraries at all (well, I need them to run program on device anyway) and load it at runtime?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T05:34:40+00:00Added an answer on May 20, 2026 at 5:34 am

    -L just adds a library search directory. Try also specifying -lSDL-1.2 or -lSDL to actually link against a library.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple page using Google Maps API 3. My first. One marker
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
Seemingly simple, but I cannot find anything relevant on the web. What is the
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I am trying to loop through a bunch of documents I have to put

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.