Log in

View Full Version : Build error under VS2015 but not under VS2010


jpsdr
10th August 2017, 14:30
I've updated the SDK files to the last version, using the SDK v1.2 and the source code of the last VDub version i have : the 1.10.5-test6.

With other code, the following is added :

vdplugin.h

typedef bool (VDXAPIENTRY *VDXShowStaticAboutProc)(VDXHWND parent);
typedef bool (VDXAPIENTRY *VDXShowStaticConfigureProc)(VDXHWND parent);
...
struct VDXPluginInfo {
...
VDXShowStaticAboutProc mpStaticAboutProc;
VDXShowStaticConfigureProc mpStaticConfigureProc;
}


videofilter.h

template<class T>
class VDXVideoFilterDefinition : public VDXFilterDefinition {
public:
VDXVideoFilterDefinition(const char *pszAuthor, const char *pszName, const char *pszDescription) {
...
mpStaticAboutProc = T::StaticAbout == VDXVideoFilter::StaticAbout ? NULL : VDXStaticAboutConfigureAdapter<T::StaticAbout>;
mpStaticConfigureProc = T::StaticConfigure == VDXVideoFilter::StaticConfigure ? NULL :VDXStaticAboutConfigureAdapter<T::StaticConfigure>; }


This build under VS2010, but not with VS2015, it's saying it can't resolve the overload function. Well, this is part is too much ++ for me, i don't understand.

If i comment doing the following :

vdplugin.h

struct VDXPluginInfo {
...
/*
VDXShowStaticAboutProc mpStaticAboutProc;
VDXShowStaticConfigureProc mpStaticConfigureProc;
*/
}


videofilter.h

template<class T>
class VDXVideoFilterDefinition : public VDXFilterDefinition {
public:
VDXVideoFilterDefinition(const char *pszAuthor, const char *pszName, const char *pszDescription) {
...
/*
mpStaticAboutProc = T::StaticAbout == VDXVideoFilter::StaticAbout ? NULL : VDXStaticAboutConfigureAdapter<T::StaticAbout>;
mpStaticConfigureProc = T::StaticConfigure == VDXVideoFilter::StaticConfigure ? NULL :VDXStaticAboutConfigureAdapter<T::StaticConfigure>;
*/
}

it builds under VS2015.

If by any chance anyone has any idea...:confused:

shekh
10th August 2017, 23:07
Working code:


template<bool (*T_Routine)(VDXHWND)>
static bool VDXAPIENTRY VDXStaticAboutConfigureAdapter(VDXHWND parent) {
return T_Routine(parent);
}


Notice asterisk instead of ampersand (I cannot explain it)

jpsdr
11th August 2017, 08:21
wonderfull ! Thanks.