Jump to content

  • Log In with Google      Sign In   
  • Create Account

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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 dwarf99   Members   -  Reputation: 98

Like
0Likes
Like

Posted 04 August 2013 - 06:39 AM

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!



Sponsor:

#2 dwarf99   Members   -  Reputation: 98

Like
-1Likes
Like

Posted 04 August 2013 - 12:01 PM

Seriously..

No one can reply?



#3 Brother Bob   Moderators   -  Reputation: 8576

Like
0Likes
Like

Posted 04 August 2013 - 12:07 PM

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.



#4 dwarf99   Members   -  Reputation: 98

Like
0Likes
Like

Posted 04 August 2013 - 12:36 PM

i have installed the SDL_gfx library

and put it in the linker -ISDL_gfx



#5 superman3275   Crossbones+   -  Reputation: 2061

Like
0Likes
Like

Posted 06 August 2013 - 11:21 AM

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 ph34r.png!

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 smile.png!


#6 BeerNutts   Crossbones+   -  Reputation: 2999

Like
0Likes
Like

Posted 06 August 2013 - 03:10 PM

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)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS