[Linker error] main.o:main.cpp:(.text+0x2f2): undefined reference to `_imp__rotozoomSurface'

Started by
4 comments, last by BeerNutts 10 years, 8 months ago

When i try to compile my code in Dev C++ it gives me this error:

[Linker error] main.o:main.cpp:(.text+0x2f2): undefined reference to `_imp__rotozoomSurface'

i am very new to sdl. I am trying to develop a game.

Iwant to rotate a image with the rotozoomSurface function but it gives me the error.

playerrot=rotozoomSurface(player,angle,1.0,0.0);

player - is the image i want to rotate.

angle is the angle

playerrot is the rotated image

Please help!

Advertisement

Seriously..

No one can reply?

Undefined reference means that the symbol name (although mangled slightly in the output), cannot be found. The linker cannot find the definition of the function rotozoomSurface in this case. Probably because you haven't linked its source or library file.

i have installed the SDL_gfx library

and put it in the linker -ISDL_gfx

Brother Bob is correct.

Also, if you want help, here's some tips:

  • Use correct grammar. Lots of us won't even respond when you don't capitalize words, use punctuation, and the like.
  • Give us some information. It's hard to decipher an error when we can't see the code causing it.

With that said, it looks like a problem with you linking the SFML libraries. Try this out.

I'm a game programmer and computer science ninja !

Here's my 2D RPG-Ish Platformer Programmed in Python + Pygame, with a Custom Level Editor and Rendering System!

Here's my Custom IDE / Debugger Programmed in Pure Python and Designed from the Ground Up for Programming Education!

Want to ask about Python, Flask, wxPython, Pygame, C++, HTML5, CSS3, Javascript, jQuery, C++, Vimscript, SFML 1.6 / 2.0, or anything else? Recruiting for a game development team and need a passionate programmer? Just want to talk about programming? Email me here:

hobohm.business@gmail.com

or Personal-Message me on here !

dwarf, some advise; if you are using SDL and using the sdl gfs library, then you are performing those rotaions in software, and your game will be slow.

Please take a look at SFML. It will make it better in the long run.

Does dev-c++ know where to find the sdl gfx library? Just adding -lSDL_gfx won't help if the compiler can't find the library.

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

This topic is closed to new replies.

Advertisement