richardvida / googlemock

Automatically exported from code.google.com/p/googlemock
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

ICC class template "testing::internal::MockSpec" may not be redeclared in the current scope #147

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
IMPORTANT NOTE: PLEASE send issues and requests to
http://groups.google.com/group/googlemock *instead of here*.
This issue tracker is NOT regularly monitored.

If you really need to create a new issue, please provide the information
asked for below.

What steps will reproduce the problem?
1. Compile attached code with gcc -- no problems.
2. Compile attached code with icc -- problems.
3.

What is the expected output? What do you see instead?

G++ compile line:
$ gcc -lstdc++ -pthread -lgtest -lgmock gmock.cc
$ echo $?
0

ICC errors are:
$ icc  -DGTEST_USE_OWN_TR1_TUPLE=1 -lstdc++ -pthread -lgtest -lgmock -std=c++0x 
gmock.cc
/usr/include/gmock/gmock-generated-function-mockers.h(47): error: class 
template "testing::internal::MockSpec" may not be redeclared in the current 
scope
  class MockSpec;
        ^

compilation aborted for gmock.cc (code 2)
$ echo $?
2

Which version of Google Mock are you using? On what operating system?

Ubuntu natty default version 1.4.0-3.

$ uname -a
Linux nightwatch 2.6.38-11-generic #50-Ubuntu SMP Mon Sep 12 21:17:25 UTC 2011 
x86_64 x86_64 x86_64 GNU/Linux

$ g++ --version
g++ (Ubuntu/Linaro 4.5.2-8ubuntu4) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ icc --version
icc (ICC) 12.0.3 20110309
Copyright (C) 1985-2011 Intel Corporation.  All rights reserved.

Please provide any additional information below.

Original issue reported on code.google.com by Sardathr...@gmail.com on 30 Sep 2011 at 8:27

Attachments:

GoogleCodeExporter commented 9 years ago
Unfortunately, we don't have access to ICC on Ubuntu and cannot verify fixes. 
If you can send a patch with a fix, please do - we will accept it gladly. See 
http://code.google.com/p/googlemock/wiki/DevGuide#Contributing_Code for details.

P.S. You should also try building a modern version of the library. 1.4 is not 
really supported anymore.

Original comment by vladlosev on 2 Oct 2011 at 3:04