Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: expected constructor, destructor, or type conversion before ‘(’ token #16

Open
Adharshcs opened this issue Jun 21, 2023 · 6 comments

Comments

@Adharshcs
Copy link

/home/rootuser/msgpack11/test/basic.cpp:154:19: error: expected constructor, destructor, or type conversion before ‘(’ token
TYPED_TEST_SUITE_P(IntegerToFloatingPointTest);
^
In file included from /usr/include/gtest/gtest.h:66:0,
from /home/rootuser/msgpack11/test/basic.cpp:15:
/home/rootuser/msgpack11/test/basic.cpp:156:1: error: ‘gtest_typed_test_case_p_state_IntegerToFloatingPointTest_’ was not declared in this scope
TYPED_TEST_P(IntegerToFloatingPointTest, simple_buffer)
^
/home/rootuser/msgpack11/test/basic.cpp:178:28: error: expected constructor, destructor, or type conversion before ‘(’ token
REGISTER_TYPED_TEST_SUITE_P(IntegerToFloatingPointTest,
^
/home/rootuser/msgpack11/test/basic.cpp:185:31: error: expected constructor, destructor, or type conversion before ‘(’ token
INSTANTIATE_TYPED_TEST_SUITE_P(IntegerToFloatingPointTestInstance,
^
test/CMakeFiles/basic.dir/build.make:62: recipe for target 'test/CMakeFiles/basic.dir/basic.cpp.o' failed
make[2]: *** [test/CMakeFiles/basic.dir/basic.cpp.o] Error 1
CMakeFiles/Makefile2:169: recipe for target 'test/CMakeFiles/basic.dir/all' failed
make[1]: *** [test/CMakeFiles/basic.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

I am getting this error when am doing make install. can you help me out

@ar90n
Copy link
Owner

ar90n commented Jun 21, 2023

@Adharshcs
Please try the following instructions.

  $ git clone [email protected]:ar90n/msgpack11.git
  $ mkdir build
  $ cd build
  $ cmake ../msgpack11
  $ make && make install

@Adharshcs
Copy link
Author

It said you don't hav authorisation to do git clone

@Adharshcs
Copy link
Author

So i cloned using the URL link and did all the following steps and when i did make && make install...it was giving the previous error

@ar90n
Copy link
Owner

ar90n commented Jun 21, 2023

Please check your environment, such as compiler, google test, etc.

@Adharshcs
Copy link
Author

rootuser@rootuser-Standard-PC-Q35-ICH9-2009:~$ git clone [email protected]:ar90n/msgpack11.git
Cloning into 'msgpack11'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

@Adharshcs
Copy link
Author

i tried doing the steps but it results in the same error

Scanning dependencies of target msgpack11
[ 7%] Building CXX object CMakeFiles/msgpack11.dir/msgpack11.cpp.o
[ 14%] Linking CXX static library libmsgpack11.a
[ 14%] Built target msgpack11
Scanning dependencies of target array
[ 21%] Building CXX object test/CMakeFiles/array.dir/array.cpp.o
[ 28%] Linking CXX executable array
[ 28%] Built target array
Scanning dependencies of target basic
[ 35%] Building CXX object test/CMakeFiles/basic.dir/basic.cpp.o
/home/rootuser/msgpack11/test/basic.cpp:154:19: error: expected constructor, destructor, or type conversion before ‘(’ token
TYPED_TEST_SUITE_P(IntegerToFloatingPointTest);
^
In file included from /usr/include/gtest/gtest.h:66:0,
from /home/rootuser/msgpack11/test/basic.cpp:15:
/home/rootuser/msgpack11/test/basic.cpp:156:1: error: ‘gtest_typed_test_case_p_state_IntegerToFloatingPointTest_’ was not declared in this scope
TYPED_TEST_P(IntegerToFloatingPointTest, simple_buffer)
^
/home/rootuser/msgpack11/test/basic.cpp:178:28: error: expected constructor, destructor, or type conversion before ‘(’ token
REGISTER_TYPED_TEST_SUITE_P(IntegerToFloatingPointTest,
^
/home/rootuser/msgpack11/test/basic.cpp:185:31: error: expected constructor, destructor, or type conversion before ‘(’ token
INSTANTIATE_TYPED_TEST_SUITE_P(IntegerToFloatingPointTestInstance,
^
test/CMakeFiles/basic.dir/build.make:62: recipe for target 'test/CMakeFiles/basic.dir/basic.cpp.o' failed
make[2]: *** [test/CMakeFiles/basic.dir/basic.cpp.o] Error 1
CMakeFiles/Makefile2:169: recipe for target 'test/CMakeFiles/basic.dir/all' failed
make[1]: *** [test/CMakeFiles/basic.dir/all] Error 2
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants