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

Compilation errors on MinGW #484

Open
GoogleCodeExporter opened this issue Jun 20, 2015 · 0 comments
Open

Compilation errors on MinGW #484

GoogleCodeExporter opened this issue Jun 20, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

Google Test fails to compile on the default installation of MinGW 
(http://www.mingw.org/):

> cmake -G "MinGW Makefiles"
> mingw32-make
...

C:/googletest/src/gtest-port.cc:202:45: error: cannot convert 
'CRITICAL_SECTION* {aka _CRITICAL_SECTION*}' to '_RTL_CRITICAL_SECTION*' in 
initialization
       critical_section_(new CRITICAL_SECTION) {
                                             ^
C:/googletest/src/gtest-port.cc:203:48: error: cannot convert 
'_RTL_CRITICAL_SECTION*' to 'LPCRITICAL_SECTION {aka _CRITICAL_SECTION*}' for 
argument '1' to 'void InitializeCriticalSection(LPCRITICAL_SECTION)'
   ::InitializeCriticalSection(critical_section_);
                                                ^
C:/googletest/src/gtest-port.cc: In destructor 
'testing::internal::Mutex::~Mutex()':
C:/googletest/src/gtest-port.cc:213:46: error: cannot convert 
'_RTL_CRITICAL_SECTION*' to 'PCRITICAL_SECTION {aka _CRITICAL_SECTION*}' for 
argument '1' to 'void DeleteCriticalSection(PCRITICAL_SECTION)'
     ::DeleteCriticalSection(critical_section_);
                                              ^
C:/googletest/src/gtest-port.cc: In member function 'void 
testing::internal::Mutex::Lock()':
C:/googletest/src/gtest-port.cc:221:43: error: cannot convert 
'_RTL_CRITICAL_SECTION*' to 'LPCRITICAL_SECTION {aka _CRITICAL_SECTION*}' for 
argument '1' to 'void EnterCriticalSection(LPCRITICAL_SECTION)'
   ::EnterCriticalSection(critical_section_);
                                           ^
C:/googletest/src/gtest-port.cc: In member function 'void 
testing::internal::Mutex::Unlock()':
C:/googletest/src/gtest-port.cc:231:43: error: cannot convert 
'_RTL_CRITICAL_SECTION*' to 'LPCRITICAL_SECTION {aka _CRITICAL_SECTION*}' for 
argument '1' to 'void LeaveCriticalSection(LPCRITICAL_SECTION)'
   ::LeaveCriticalSection(critical_section_);
                                           ^
C:/googletest/src/gtest-port.cc: In member function 'void 
testing::internal::Mutex::ThreadSafeLazyInit()':
C:/googletest/src/gtest-port.cc:252:27: error: cannot convert 
'CRITICAL_SECTION* {aka _CRITICAL_SECTION*}' to '_RTL_CRITICAL_SECTION*' in 
assignment
         critical_section_ = new CRITICAL_SECTION;
                           ^
C:/googletest/src/gtest-port.cc:253:54: error: cannot convert 
'_RTL_CRITICAL_SECTION*' to 'LPCRITICAL_SECTION {aka _CRITICAL_SECTION*}' for 
argument '1' to 'void InitializeCriticalSection(LPCRITICAL_SECTION)'
         ::InitializeCriticalSection(critical_section_);
                                                      ^
C:/googletest/src/gtest-port.cc: In static member function 'static void 
testing::internal::ThreadLocalRegistryImpl::StartWatcherThreadFor(DWORD)':
C:/googletest/src/gtest-port.cc:455:21: error: '::OpenThread' has not been 
declared
     HANDLE thread = ::OpenThread(SYNCHRONIZE | THREAD_QUERY_INFORMATION,
                     ^

Original issue reported on code.google.com by [email protected] on 19 Mar 2015 at 1:52

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

No branches or pull requests

1 participant