Jump to content
  • Advertisement
Sign in to follow this  
Nacho

No match for functions calls with default arguments

This topic is 3407 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I've just got a mac book yesterday and I'm trying to port a PocketPC game I made to the iPhone. The game uses the EDGELIB library, which provides a common interface for PocketPC, iPhone and a whole bunch of other devices so all I need to do to build the iPhone version is compile the game's source code. So far I've used an existing XCode project and added my source files, but I'm getting a weird error that, after googling for a while, haven't been able to solve. The problem is that I'm getting error messages from gcc in those places where there are function calls to class methods that have default arguments. For example: "error: no matching function for call to 'CSpriteManager::Render(E2DSurfaceRGBA *, RectangleT)' and then it lists all the possible candidates. Indeed, one of the candidates (the one that should be called) is int CSpriteManager::Render(E2DSurfaceRGBA *, RectangleT &, float, int, long unsigned int). As I've said earlier, I've been googling around for a while but I haven't been able to find a solution. Any tip of how can I solve this? Thanks in advance for your help! --Nacho

Share this post


Link to post
Share on other sites
Advertisement
Nevermind, after some more googling I've found out that gcc is much more restrictive than Visual Studio when it comes to function parameters which are references, so I've solved it by adding the const keyword when appropriate.

--Nacho

Share this post


Link to post
Share on other sites
Binding an rvalue to a non-const reference is a MSVC non standard extension. You can enable or disable this behavior with the /Za command line switch.

Share this post


Link to post
Share on other sites
Quote:
Original post by SiCrane
Binding an rvalue to a non-const reference is a MSVC non standard extension. You can enable or disable this behavior with the /Za command line switch.

Good luck getting anything which includes the microsoft sdk when using this compiler option. There should be an option to only enable it in user code such as gcc has by using __extension__ in system headers.

Maybe their is a way yet I do not personally know, which is why I find /Za pretty useless.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!