Sign in to follow this  
gfxnomad

C++ two-stage name lookup problem

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this