Hi,
I’m trying to get nvcc working together with googletest (GitHub - google/googletest: GoogleTest - Google Testing and Mocking Framework).
My simple test that does not compile looks like this:
#define GTEST_HAS_TR1_TUPLE 0
#include <gtest/gtest.h>
int main(void) {
}
$ nvcc -I<path/to/gtest>/include test.cu
gives me some warnings and two errors I don’t know how to fix.
Specifically:
<path/to/gtest>/include/gtest/gtest.h(515): warning: attribute “warn_unused_result” ignored
<path/to/gtest>/include/gtest/gtest.h(1098): warning: support for trigraphs is disabled
<path/to/gtest>/include/gtest/gtest.h(515): warning: attribute “warn_unused_result” ignored
<path/to/gtest>/include/gtest/gtest.h(1098): warning: support for trigraphs is disabled
[b]<path/to/gtest>/include/gtest/internal/gtest-internal.h:364: error: `&’ cannot appear in a constant-expression
<path/to/gtest>/include/gtest/internal/gtest-internal.h:364: error: `&’ cannot appear in a constant-expression[/b]
I’m using:
$ nvcc --version
nvcc: NVIDIA ® Cuda compiler driver
Copyright © 2005-2009 NVIDIA Corporation
Built on Thu_Jul_30_09:24:36_PDT_2009
Cuda compilation tools, release 2.3, V0.2.1221
$ g++ --version
g++ (Debian 4.3.2-1.1) 4.3.2
Copyright © 2008 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.
Any ideas?
Regards