Build Error : see reference to function template instantiation 'To testing::internal::down_cast<testing::internal::FunctionMocker<Function>*,testing::internal::FunctionMockerBase<F>>(From *)' being compiled

603 views
Skip to first unread message

sarbojit

unread,
Aug 22, 2011, 7:48:43 AM8/22/11
to Google C++ Mocking Framework
Hi,
I am getting following build error
[see reference to function template instantiation 'To
testing::internal::down_cast<testing::internal::FunctionMocker<Function>*,testing::internal::FunctionMockerBase<F>>(From
*)' being compiled 2>with]
with this error log I could not be able to identify the fault so
seeking for help. I have confirmed that my code change is causing
problem.

Note: I have built Gmock library(.lib) and integrated in my project
successfully. Error is coming in my project.

Any input will be highly appreciable .

sarbojit

unread,
Aug 23, 2011, 2:01:16 AM8/23/11
to Google C++ Mocking Framework
Adding more error logs.

[

error C2220: warning treated as error - no 'object' file generated
2> C:\gmock-1.5.0\include\gmock/gmock-spec-builders.h(1391) :
see reference to function template instantiation 'To
testing::internal::down_cast<testing::internal::FunctionMocker<Function>*,testing::internal::FunctionMockerBase<F>>(From
*)' being compiled
2> with
2> [
2> To=testing::internal::FunctionMocker<int (void)> *,
2> Function=int (void),
2> F=int (void),
2> From=testing::internal::FunctionMockerBase<int (void)>
2> ]
2> C:\gmock-1.5.0\include\gmock/gmock-spec-builders.h(1385) :
while compiling class template member function
'testing::internal::FunctionMocker<Function>
&testing::internal::FunctionMockerBase<F>::RegisterOwner(const void
*)'
2> with
2> [
2> Function=int (void),
2> F=int (void)
2> ]
2> C:\gmock-1.5.0\include\gmock/gmock-generated-function-
mockers.h(60) : see reference to class template instantiation
'testing::internal::FunctionMockerBase<F>' being compiled
2> with
2> [
2> F=int (void)
2> ]
2> c:\Tests\Mocks\CLAPITrace_Mock.h(37) : see reference to
class template instantiation
'testing::internal::FunctionMocker<Function>' being compiled
2> with
2> [
2> Function=int (void)
2> ]

]

If anyone has any idea please let me know. I am still trying to
findout the error.

On Aug 22, 4:48 pm, sarbojit <sarkar.i...@gmail.com> wrote:
> Hi,
>   I am getting following build error
> [see reference to function template instantiation 'To
> testing::internal::down_cast<testing::internal::FunctionMocker<Function>*,t­esting::internal::FunctionMockerBase<F>>(From

Vlad Losev

unread,
Aug 25, 2011, 5:40:40 PM8/25/11
to Google C++ Mocking Framework
It's impossible to say what's wrong here without weeing the source code of your test.
Reply all
Reply to author
Forward
0 new messages