Jump to content
  • Advertisement
Sign in to follow this  
gfxnomad

C++ two-stage name lookup problem

This topic is 3433 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

Hello, I've been writing some code and have run into the following compilation error: error: there are no arguments to ‘SVDGetSingluarTriplet’ that depend on a template parameter, so a declaration of ‘SVDGetSingluarTriplet’ must be available I'm attempting to call SVDGetSingularTriplet (an externed C function) from within a function template. This makes g++ sad. I've tried to find the proper way to fix this issue. Most solution involve the explicit resolution of the function name (i.e. this->f(), class::f()). However, in my case, I cannot resolve the function name any further. It does not belong to my class or another class or namespace -- it's just an externed C function. Any help you could give me here would be incredibly useful. --Rob

Share this post


Link to post
Share on other sites
Advertisement
It sounds like your compiler just doesn't see a declaration for your function. Are you sure that it's available?

Share this post


Link to post
Share on other sites
I'm certain it's available; I'm including the header that contains it (slepcsvd.h), and I've checked several times. G++ tells me that my code will compile with -fpermissive; but I'd *really* like to avoid that if at all possible. Essentially, I understand SVDGetSingularTriplet() isn't dependent on template parameter of the function from which it's called, but it should be fully resolved . . . I think.

Share this post


Link to post
Share on other sites
SVDGetSingluarTriplet <-- from the error message
SVDGetSingularTriplet <-- what you say the C function is

Presumibly -fpermissive enables the old C-ism that "If the function wasn't declared earlier, we assume it returns an int and takes a variable number of arguments" which was abolished in C++. Given that it'd prevent you from catching the typo until link time, it's probably good it's rejecting your code :P

EDIT: Beaten to the punch. No worries, it happens to us all. Second set of eyes never hurts ;)

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!