compile problem using SDL library
Aurelien Marchand <[email protected]> Thu, 11 Jul 2002 16:39:57 -0400
| Newsgroups | gmane.comp.handhelds.zaurus.devel |
|---|---|
| Message-ID | <C080BD3E63CFD211BF4E0008C7F40F3009642E25@tor-exch-001.researchcapital.com> |
Hi all, I am trying to compile a program using the SDL library. I am currently cross-compiling from Linux to the Zaurus (arm platform). The SDL I am using is the CVS version (1.2.5), it also includes SDL_mixer and both are compiled for use with the Zaurus (according to the README.Qtopia coming from the SDL CVS). I notice that the sdl-config generated also includes -Dmain=SDL_main when you run sdl-config --libs, contrary to the x86 version but anyways, when the .cc is compiled into an object, it is done using the -Dmain=SDL_main macro. Running "nm -s program.o" shows that SDL_main is defined in it. But whenever I want to create the binary, using all the other .o (also compiled with -Dmain=SDL_main but it should be a problem), plus all the library required, plus `sdl-config --libs`, I receive an error message stating: /opt/Qtopia/sharp/lib/libSDLmain.a(SDL_Qtopia_main.o): In function `main': /home/zaurus/sources/SDL12/src/main/SDL_Qtopia_main.cc:27: undefined reference to `SDL_main' collect2: ld returned 1 exit status Could someone provide some information as to how to resolve the problem and why is it happening? Indeed, running "nm -s libSDLmain.a" shows that is defines the main function but asked for SDL_main. Since program.o contains it, I don't understand why runing: "g++ program.o (...) -lSDLmain" refuses to work. Thanks again Aurelien This email and any files transmitted with it are privileged, confidential, subject to copyright and intended solely for the use of the individual or entity to whom they are addressed. Views expressed are those of the user and not necessarily those of Research Capital Corporation or its subsidiaries. Any unauthorized use, copying, review or disclosure is prohibited. Please notify the sender immediately if you have received this communication in error. Thank you for your assistance and co-operation. Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements à caractère privé ou confidentiel. Les opinions exprimées sont celles de l'utilisateur et non pas nécessairement celles de Research Capital Corporation ou de ses filiales. Si vous n'êtes pas le destinataire légitime de ce document, veuillez noter qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. Si ce message vous a été transmis par erreur, veuillez en informer l'expéditeur et le supprimer immédiatement. Merci de votre aide et de votre coopération.