VernJensen | 1 Dec 04:25 2010

Re: Getting Activate / Deactivate events in SDL 1.3?

Anyone??
_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Kenneth Bull | 1 Dec 06:11 2010
Picon

Re: Getting Activate / Deactivate events in SDL 1.3?

On 30 November 2010 22:25, VernJensen <vern <at> actionsoft.com> wrote:
> Anyone??

Try SDL_WindowEvent instead.
Alberto Luaces | 1 Dec 09:49 2010
Picon

Re: statically linking

azer tyuiop writes:

> But it do not want to compile anymore (unreferenced functions of SDL). 

Post the undefined references, please.

--

-- 
Alberto
azer tyuiop | 1 Dec 14:19 2010
Picon

Re : statically linking

I think it is to all calls of sdl functions. Here are all the errors I get at building, thx in advance :

/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:124: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:135: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `fastPixelRGBA(SDL_Surface*, short, short, unsigned char, unsigned char, unsigned char, unsigned char)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:150: undefined reference to `SDL_MapRGBA'
src/core/SDL_gfxPrimitives.o: In function `fastPixelRGBANolock(SDL_Surface*, short, short, unsigned char, unsigned char, unsigned char, unsigned char)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:168: undefined reference to `SDL_MapRGBA'
src/core/SDL_gfxPrimitives.o: In function `_putPixelAlpha(SDL_Surface*, short, short, unsigned int, unsigned char)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:207: undefined reference to `SDL_MapRGB'
src/core/SDL_gfxPrimitives.o: In function `pixelColor':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:353: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:364: undefined reference to `SDL_MapRGBA'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:375: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `pixelColorNolock(SDL_Surface*, short, short, unsigned int)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:393: undefined reference to `SDL_MapRGBA'
src/core/SDL_gfxPrimitives.o: In function `_filledRectAlpha(SDL_Surface*, short, short, short, short, unsigned int, unsigned char)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:435: undefined reference to `SDL_MapRGB'
src/core/SDL_gfxPrimitives.o: In function `filledRectAlpha(SDL_Surface*, short, short, short, short, unsigned int)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:586: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:597: undefined reference to `SDL_MapRGBA'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:608: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `pixelRGBA':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:682: undefined reference to `SDL_MapRGBA'
src/core/SDL_gfxPrimitives.o: In function `hlineColorStore(SDL_Surface*, short, short, short, unsigned int)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:764: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:813: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `hlineColor':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:907: undefined reference to `SDL_MapRGBA'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:913: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:962: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `vlineColor':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:1068: undefined reference to `SDL_MapRGBA'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:1074: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:1122: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `boxColor':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:1443: undefined reference to `SDL_MapRGBA'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:1449: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:1511: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `lineColor':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:1588: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:1609: undefined reference to `SDL_MapRGBA'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:1728: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `aalineColorInt(SDL_Surface*, short, short, short, short, unsigned int, int)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:1855: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:1958: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `circleColor':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:2050: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:2071: undefined reference to `SDL_MapRGBA'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:2123: undefined reference to `SDL_UnlockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:2181: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `arcColor':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:2278: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:2409: undefined reference to `SDL_MapRGBA'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:2478: undefined reference to `SDL_UnlockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:2552: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `ellipseColor':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:2796: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:2817: undefined reference to `SDL_MapRGBA'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:3011: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `aaellipseColor':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:3138: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:3267: undefined reference to `SDL_UnlockSurface'
src/core/SDL_gfxPrimitives.o: In function `_texturedHLine(SDL_Surface*, short, short, short, SDL_Surface*, int, int)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:4076: undefined reference to `SDL_UpperBlit'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:4083: undefined reference to `SDL_UpperBlit'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:4095: undefined reference to `SDL_UpperBlit'
src/core/SDL_gfxPrimitives.o: In function `characterColor':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:4400: undefined reference to `SDL_CreateRGBSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:4422: undefined reference to `SDL_SetAlpha'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:4426: undefined reference to `SDL_LockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:4459: undefined reference to `SDL_UnlockSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitives.c:4465: undefined reference to `SDL_UpperBlit'
src/core/Agent.o: In function `Agent::show()':
/users/tao/aze/phd/Curiosity_Local/src/core/Agent.cpp:78: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/Agent.cpp:82: undefined reference to `SDL_GetRGB'
src/core/Agent.o: In function `Agent::move()':
/users/tao/aze/phd/Curiosity_Local/src/core/Agent.cpp:183: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/Agent.cpp:186: undefined reference to `SDL_MapRGB'
src/core/BalleAgent.o: In function `BalleAgent':
/users/tao/aze/phd/Curiosity_Local/src/core/BalleAgent.cpp:33: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/BalleAgent.cpp:47: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/BalleAgent.cpp:52: undefined reference to `SDL_GetRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/BalleAgent.cpp:33: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/BalleAgent.cpp:47: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/BalleAgent.cpp:52: undefined reference to `SDL_GetRGB'
src/core/BalleAgent.o: In function `BalleAgent::isCollision()':
/users/tao/aze/phd/Curiosity_Local/src/core/BalleAgent.cpp:295: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/BalleAgent.cpp:307: undefined reference to `SDL_MapRGB'
src/core/BalleAgent.o: In function `BalleAgent::maj_vision()':
/users/tao/aze/phd/Curiosity_Local/src/core/BalleAgent.cpp:416: undefined reference to `SDL_GetRGB'
src/core/InspectorAgent.o: In function `InspectorAgent::show()':
/users/tao/aze/phd/Curiosity_Local/src/core/InspectorAgent.cpp:134: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/InspectorAgent.cpp:136: undefined reference to `SDL_MapRGB'
src/core/roborobo.o: In function `clean_up()':
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:254: undefined reference to `SDL_FreeSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:255: undefined reference to `SDL_FreeSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:256: undefined reference to `SDL_FreeSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:258: undefined reference to `SDL_FreeSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:259: undefined reference to `SDL_FreeSurface'
src/core/roborobo.o:/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:262: more undefined references to `SDL_FreeSurface' follow
src/core/roborobo.o: In function `checkQuitEvent()':
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:331: undefined reference to `SDL_PollEvent'
src/core/roborobo.o: In function `handleKeyEvent(unsigned char*)':
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:351: undefined reference to `SDL_Delay'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:366: undefined reference to `SDL_Delay'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:374: undefined reference to `SDL_Delay'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:379: undefined reference to `SDL_Delay'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:393: undefined reference to `SDL_Delay'
src/core/roborobo.o:/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:404: more undefined references to `SDL_Delay' follow
src/core/roborobo.o: In function `handleKeyEvent(unsigned char*)':
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:454: undefined reference to `SDL_GetRGB'
make[1]: quittant le répertoire « /users/tao/aze/phd/Curiosity_Local »
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:500: undefined reference to `SDL_GetRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:506: undefined reference to `SDL_Delay'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:530: undefined reference to `SDL_Delay'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:547: undefined reference to `SDL_Delay'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:563: undefined reference to `SDL_Delay'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:577: undefined reference to `SDL_Delay'
src/core/roborobo.o:/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:585: more undefined references to `SDL_Delay' follow
src/core/roborobo.o: In function `updateDisplay()':
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:640: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:640: undefined reference to `SDL_FillRect'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:677: undefined reference to `SDL_Flip'
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:685: undefined reference to `SDL_Delay'
src/core/roborobo.o: In function `runRoborobo(int)':
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:1416: undefined reference to `SDL_GetKeyState'
src/core/roborobo.o: In function `closeRoborobo()':
/users/tao/aze/phd/Curiosity_Local/src/core/roborobo.cpp:1445: undefined reference to `SDL_Quit'
src/core/RobotAgent.o: In function `RobotAgent':
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:36: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:49: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:54: undefined reference to `SDL_GetRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:36: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:49: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:54: undefined reference to `SDL_GetRGB'
src/core/RobotAgent.o: In function `RobotAgent::move(int)':
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:481: undefined reference to `SDL_GetRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:487: undefined reference to `SDL_GetRGB'
src/core/RobotAgent.o: In function `RobotAgent::isCollision()':
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:510: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:522: undefined reference to `SDL_MapRGB'
src/core/RobotAgent.o: In function `RobotAgent::show()':
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:591: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:597: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:624: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/RobotAgent.cpp:628: undefined reference to `SDL_GetRGB'
src/core/SDL_gfxPrimitivesExtra.o: In function `traceRayRGBA(SDL_Surface*, int, int, int, int, unsigned char, unsigned char, unsigned char, unsigned char)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitivesExtra.cpp:21: undefined reference to `SDL_MapRGB'
src/core/SDL_gfxPrimitivesExtra.o: In function `castSensorRay(SDL_Surface*, double, double, double*, double*, int)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitivesExtra.cpp:105: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxPrimitivesExtra.cpp:135: undefined reference to `SDL_MapRGB'
src/core/SDL_gfxRoborobo.o: In function `initSDL(unsigned int)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:24: undefined reference to `SDL_Init'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:30: undefined reference to `SDL_SetVideoMode'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:39: undefined reference to `SDL_WM_SetCaption'
src/core/SDL_gfxRoborobo.o: In function `putPixel32secure(SDL_Surface*, int, int, unsigned int)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:74: undefined reference to `SDL_CreateRGBSurface'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:78: undefined reference to `SDL_FreeSurface'
src/core/SDL_gfxRoborobo.o: In function `apply_surface(int, int, SDL_Surface*, SDL_Surface*, SDL_Rect*)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:92: undefined reference to `SDL_UpperBlit'
src/core/SDL_gfxRoborobo.o: In function `register_surface(int, int, SDL_Surface*, SDL_Surface*, int)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:101: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:103: undefined reference to `SDL_MapRGB'
src/core/SDL_gfxRoborobo.o: In function `clean_surface(int, int, SDL_Surface*, SDL_Surface*)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:114: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:115: undefined reference to `SDL_MapRGB'
src/core/SDL_gfxRoborobo.o: In function `load_image(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:163: undefined reference to `IMG_Load'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:169: undefined reference to `SDL_DisplayFormat'
/users/tao/aze/phd/Curiosity_Local/src/core/SDL_gfxRoborobo.cpp:172: undefined reference to `SDL_FreeSurface'
src/core/Timer.o: In function `Timer::start()':
/users/tao/aze/phd/Curiosity_Local/src/core/Timer.cpp:29: undefined reference to `SDL_GetTicks'
src/core/Timer.o: In function `Timer::pause()':
/users/tao/aze/phd/Curiosity_Local/src/core/Timer.cpp:50: undefined reference to `SDL_GetTicks'
src/core/Timer.o: In function `Timer::unpause()':
/users/tao/aze/phd/Curiosity_Local/src/core/Timer.cpp:63: undefined reference to `SDL_GetTicks'
src/core/Timer.o: In function `Timer::get_ticks()':
/users/tao/aze/phd/Curiosity_Local/src/core/Timer.cpp:84: undefined reference to `SDL_GetTicks'
src/core/World.o: In function `World::loadFiles()':
/users/tao/aze/phd/Curiosity_Local/src/core/World.cpp:404: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/World.cpp:404: undefined reference to `SDL_SetColorKey'
/users/tao/aze/phd/Curiosity_Local/src/core/World.cpp:406: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/World.cpp:406: undefined reference to `SDL_SetColorKey'
/users/tao/aze/phd/Curiosity_Local/src/core/World.cpp:407: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/World.cpp:407: undefined reference to `SDL_SetColorKey'
/users/tao/aze/phd/Curiosity_Local/src/core/World.cpp:414: undefined reference to `SDL_MapRGB'
/users/tao/aze/phd/Curiosity_Local/src/core/World.cpp:415: undefined reference to `SDL_MapRGB'
collect2: ld returned 1 exit status
make[1]: [roborobo] Erreur 1 (ignorée)


De : Alberto Luaces <aluaces <at> udc.es>
À : sdl <at> libsdl.org
Envoyé le : Mer 1 décembre 2010, 9h 49min 08s
Objet : Re: [SDL] statically linking

azer tyuiop writes:

> But it do not want to compile anymore (unreferenced functions of SDL).

Post the undefined references, please.

--
Alberto

_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Alberto Luaces | 1 Dec 16:20 2010
Picon

Re: Re : statically linking

azer tyuiop writes:

> I think it is to all calls of sdl functions. Here are all the errors I get at building, thx in advance :
>

[...]

> collect2: ld returned 1 exit status
> make[1]: [roborobo] Erreur 1 (ignorée)

Try to use again the "--cflags" option when calling sdl-config.

--

-- 
Alberto

_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
azer tyuiop | 1 Dec 16:53 2010
Picon

Re : Re : statically linking

I did, it change nothing. Maybe it can be helpful so here is my makefile. Note that by uncommenting/commenting the two successive lines LDFLAGS (to make the lin dynamic) it compile just fine.

Apart the static linking, Is there any other way to make my program run on a machine that don't have sdl?

thx

CC           = g++
CCFLAGS      = -Wall -g
#LDFLAGS      = `sdl-config --cfalgs --libs` -lSDL_image
LDFLAGS      = -Wl,-Bstatic -lSDL_image `sdl-config --cfalgs --static-libs` -Wl,-Bdynamic
RM           = rm -f
MAKE         = make
INCLUDE      = -Iinclude/ext -Iinclude/contrib -Iinclude/core -Iinclude/toolBox
#HEADERS         = $(wildcard include/ext/Observers/*.h)    
SRC_C         = $(wildcard src/core/*.c src/contrib/*.c src/ext/*.c)   
SRC_CC         = $(wildcard src/core/*.cpp src/contrib/*.cpp src/ext/*.cpp src/toolBox/*.cpp)   
OBJ          = $(SRC_C:.c=.o) $(SRC_CC:.cpp=.o)         
TARGET       = roborobo

.IGNORE:
#.SILENT:

all:
    clear
#    $(MAKE) distclean
    $(MAKE) $(TARGET)
#    $(MAKE) clean

$(TARGET): $(OBJ)
    $(CC) $(LDFLAGS) -o $ <at> $^

%.o: %.cpp
    $(CC) -o $ <at> -c $< $(CCFLAGS) $(INCLUDE)

%.o: %.c
    $(CC) -o $ <at> -c $< $(CCFLAGS) $(INCLUDE)

clean:
    $(RM) $(OBJ)

distclean:
    $(MAKE) clean
    $(RM) $(TARGET)

De : Alberto Luaces <aluaces <at> udc.es>
À : sdl <at> libsdl.org
Envoyé le : Mer 1 décembre 2010, 16h 20min 08s
Objet : Re: [SDL] Re : statically linking

azer tyuiop writes:

> I think it is to all calls of sdl functions. Here are all the errors I get at building, thx in advance :
>

[...]

> collect2: ld returned 1 exit status
> make[1]: [roborobo] Erreur 1 (ignorée)

Try to use again the "--cflags" option when calling sdl-config.

--
Alberto

_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Jeff Post | 1 Dec 17:02 2010
Picon

Re: Re : Re : statically linking

On Wednesday 01 December 2010 07:53, azer tyuiop wrote:

> LDFLAGS      = -Wl,-Bstatic -lSDL_image `sdl-config --cfalgs --static-libs`

cflags, not cfalgs.
azer tyuiop | 1 Dec 17:07 2010
Picon

Re : Re : Re : statically linking

:) Well was subtel, but a make clean; make still show the same errors...

De : Jeff Post <j_post <at> pacbell.net>
À : SDL Development List <sdl <at> lists.libsdl.org>
Envoyé le : Mer 1 décembre 2010, 17h 02min 03s
Objet : Re: [SDL] Re : Re : statically linking

On Wednesday 01 December 2010 07:53, azer tyuiop wrote:

> LDFLAGS      = -Wl,-Bstatic -lSDL_image `sdl-config --cfalgs --static-libs`


cflags, not cfalgs.

_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Alberto Luaces | 1 Dec 17:46 2010
Picon

Re: Re : Re : statically linking

azer tyuiop writes:

> I did, it change nothing. Maybe it can be helpful so here is my makefile. Note that by
uncommenting/commenting the two successive lines LDFLAGS (to make the lin dynamic) it compile just fine.
>
> Apart the static linking, Is there any other way to make my program run on a machine that don't have sdl?

If it is the same architecture, you could `ldd' your executable, copy
all dynamic libraries listed not expected to be in the other system and
pack them together. Maybe even better is to issue a `ldd' on the other
machine to know which ones are missing.

As for the linking problem, I'd try to see if I'm able to compile a
static SDL program without SDL Image first.

--

-- 
Alberto
azer tyuiop | 1 Dec 18:11 2010
Picon

Re : Re : Re : statically linking

Yes same architecture.

Ok, I did an ldd on the target machine, and I got a not found on the libSDL_image library (and only on this one, the others are ok). However, I already tried in the past to copy the libSDL_image in a personal folder, and exported a variable to tell the linker to search for the library in that rep. I didn't got the libSDL_image not found error, however I got an internal error from SDL, saying that it was not able to initiate the framebuffer /dev/fb0, or something like that. I am not sure, but I think it is a right issue, as if I remember well, Linux give the same rights as of the owner of the lib. And so, this solution cannot work, as the lib have to be in /usr/lib. I am not sure of what I am saying but that's how I interpreted the error.

So copying the .so seems not to be a solution.

However thank you so much for your help. It is the very welcome. I really can't figure how to solve this. 

De : Alberto Luaces <aluaces <at> udc.es>
À : sdl <at> libsdl.org
Envoyé le : Mer 1 décembre 2010, 17h 46min 48s
Objet : Re: [SDL] Re : Re : statically linking

azer tyuiop writes:

> I did, it change nothing. Maybe it can be helpful so here is my makefile. Note that by uncommenting/commenting the two successive lines LDFLAGS (to make the lin dynamic) it compile just fine.
>
> Apart the static linking, Is there any other way to make my program run on a machine that don't have sdl?

If it is the same architecture, you could `ldd' your executable, copy
all dynamic libraries listed not expected to be in the other system and
pack them together. Maybe even better is to issue a `ldd' on the other
machine to know which ones are missing.

As for the linking problem, I'd try to see if I'm able to compile a
static SDL program without SDL Image first.

--
Alberto

_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list
SDL <at> lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Gmane