tanghong123 / googletest

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

Compilation failed on mingw/cygwin #127

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. cd <gtest-1.2-svn>
2. mkdir _build
3. cd _build
4. ../configure CC="/cygdrive/c/MinGW/bin/gcc.exe" 
CXX="/cygdrive/c/MinGW/bin/gcc.exe"  --
prefix="$HOME/install/gtest-1.2-svn"
5. make

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

make failed with this error:
../src/gtest-filepath.cc:277: error: at this point in file

I would expect make to succeed.

What version of the product are you using? On what operating system?

URL: http://googletest.googlecode.com/svn/branches/release-1.2
Revision: 198

On WinXP SP2 under cygwin using mingw

Please provide any additional information below.

$ /cygdrive/c/MinGW/bin/gcc.exe --version
gcc.exe (GCC) 3.4.5 (mingw special)
Copyright (C) 2004 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.

$ /cygdrive/c/MinGW/bin/g++.exe --version
g++.exe (GCC) 3.4.5 (mingw special)
Copyright (C) 2004 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.

I attach a patch solving this issue

Original issue reported on code.google.com by nicolas....@gmail.com on 6 Mar 2009 at 6:37

Attachments:

GoogleCodeExporter commented 9 years ago
This patch works on the trunk.

It fixes the use of mkdir(2) and provide a replacement for mkstemp(3).

Original comment by nicolas....@gmail.com on 6 Mar 2009 at 9:53

Attachments:

GoogleCodeExporter commented 9 years ago
Nicolas, I am not that familiar with MinGW but I understand that it provides 
header
files for accessing the Windows API. Can you try to define GTEST_OS_WINDOWS on 
the
MinGW platform and see if it compiles using Windows API? This may require less
modifications to the source and enable more features that would not be 
available on
MinGW otherwise.

Original comment by vladlosev on 7 Mar 2009 at 8:00

GoogleCodeExporter commented 9 years ago
[deleted comment]