how to solve linker error for gmock 1.6.0 in Cygwin/Win7

163 views
Skip to first unread message

Craft

unread,
Dec 31, 2011, 4:26:19 AM12/31/11
to Google C++ Mocking Framework
Hi,

i install cygwin 1.7.9-1 under win7, and i build a project to use
google mock framework, but there are linker error as following:

make[1]: Leaving directory `/cygdrive/d/SVN/Faraday_UT_trunk/
UT4HstupCygWin/out'
LD hstup.exe
D:/SVN/Faraday_UT_trunk/UT4HstupCygWin/3rdParty/Google-1.6.0/lib/
Release/libgmock.a(gtest-all.o):gtest-all.cc:(.text+0x36c7): undefined
reference to `__wcsicmp'
D:/SVN/Faraday_UT_trunk/UT4HstupCygWin/3rdParty/Google-1.6.0/lib/
Release/libgmock.a(gtest-all.o):gtest-all.cc:(.text+0x4d94): undefined
reference to `__imp___iob'
D:/SVN/Faraday_UT_trunk/UT4HstupCygWin/3rdParty/Google-1.6.0/lib/
Release/libgmock.a(gtest-all.o):gtest-all.cc:(.text+0x5750): undefined
reference to `__imp___iob'
D:/SVN/Faraday_UT_trunk/UT4HstupCygWin/3rdParty/Google-1.6.0/lib/
Release/libgmock.a(gtest-all.o):gtest-all.cc:(.text+0x58a4): undefined
reference to `__imp___iob'
D:/SVN/Faraday_UT_trunk/UT4HstupCygWin/3rdParty/Google-1.6.0/lib/
Release/libgmock.a(gtest-all.o):gtest-all.cc:(.text+0x5945): undefined
reference to `__imp___iob'
D:/SVN/Faraday_UT_trunk/UT4HstupCygWin/3rdParty/Google-1.6.0/lib/
Release/libgmock.a(gtest-all.o):gtest-all.cc:(.text+0x598a): undefined
reference to `__imp___iob'
D:/SVN/Faraday_UT_trunk/UT4HstupCygWin/3rdParty/Google-1.6.0/lib/
Release/libgmock.a(gtest-all.o):gtest-all.cc:(.text+0x5bc7): more
undefined references to `__imp___iob' follow
D:/SVN/Faraday_UT_trunk/UT4HstupCygWin/3rdParty/Google-1.6.0/lib/
Release/libgmock.a(gtest-all.o):gtest-all.cc:(.text+0xa399): undefined
reference to `__errno'
D:/SVN/Faraday_UT_trunk/UT4HstupCygWin/3rdParty/Google-1.6.0/lib/
Release/libgmock.a(gtest-all.o):gtest-all.cc:(.text+0xa3a4): undefined
reference to `__errno'

i guess it must be related with googlemock lib, but i just use ./
configure and make to build libgmock.a, and don't know how to
configure it( i use make of Cygwin),
could some one help me on how to configure and build gmock in cygwin/
win7 environment?

thanks!

Br,
Craft.

Craft

unread,
Jan 2, 2012, 8:48:10 AM1/2/12
to Google C++ Mocking Framework
Hi,

any update?

can some one help give comments?

thanks!

Br,
Craft.

Igor Peshansky

unread,
Feb 1, 2012, 10:23:33 PM2/1/12
to gMock-users, Craft, Google C++ Mocking Framework
This is usually a symptom of mixing Cygwin C++ libraries with non-
Cygwin (MinGW or MSVCRT) C++ libraries.

Hope this helps,
        Igor

Reply all
Reply to author
Forward
0 new messages