I'm not sure where this post belongs, but this seems like the right place.
background:
I'm an experienced programmer but new to code::blocks
Problem:
GoogleTest ( gtest-1.3.0.zip ) does not compile under code blocks but does under msvc.
I imported the project from the provided msvc sln file.
It did not correctly import the include directories for the project(s).
I set them manually.
When I try to compile I get:
-------------- Build: Debug Win32 in gtest_unittest ---------------
cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release
cl : Command line warning D9002 : ignoring unknown option '/MLd'
gtest_unittest.cc
c:\program files\microsoft visual studio 9.0\vc\include\xlocale(342) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
c:\temp\gtest-1.3.0\test\gtest_unittest.cc(913) : error C2065: '__LINE__Var' : undeclared identifier
c:\temp\gtest-1.3.0\test\gtest_unittest.cc(925) : error C2065: '__LINE__Var' : undeclared identifier
Searching for '__LINE__Var' yields no matches.
This is the first failure line:
EXPECT_FATAL_FAILURE(ASSERT_TRUE(false), "");
If you find the definition of EXPECT_FATAL_FAILURE and substitute in the parameters it compiles fine:
do {
class GTestExpectFatalFailureHelper {
public:
static void Execute() { ASSERT_TRUE(false); }
};
::testing::TestPartResultArray gtest_failures;
::testing::internal::SingleFailureChecker gtest_checker(
>est_failures, ::testing::TPRT_FATAL_FAILURE, (""));
{
::testing::ScopedFakeTestPartResultReporter gtest_reporter(
::testing::ScopedFakeTestPartResultReporter::
INTERCEPT_ONLY_CURRENT_THREAD, >est_failures);
GTestExpectFatalFailureHelper::Execute();
}
} while (false);
Any suggestions?