mingw console

This commit is contained in:
WuHuan 2014-01-09 17:48:37 +08:00
parent 1cd68accc1
commit 4dbb0ee1e8
2 changed files with 12 additions and 4 deletions

View File

@ -102,9 +102,7 @@ static const char* inet_ntop(int af, const void* src, char* dst, int cnt)
srcaddr.sin_family = af;
if (WSAAddressToString((struct sockaddr*) &srcaddr, sizeof(struct sockaddr_in), 0, dst, (LPDWORD) &cnt) != 0)
{
DWORD rv = WSAGetLastError();
printf("WSAAddressToString() : %d\n",rv);
return NULL;
return nullptr;
}
return dst;
}

View File

@ -1,5 +1,15 @@
set(APP_NAME testcpp)
if(WIN32)
set(PLATFORM_SRC
proj.win32/main.cpp
)
else()
set(PLATFORM_SRC
proj.linux/main.cpp
)
endif()
set(SAMPLE_SRC
Classes/AccelerometerTest/AccelerometerTest.cpp
Classes/ActionManagerTest/ActionManagerTest.cpp
@ -136,7 +146,7 @@ set(SAMPLE_SRC
Classes/AppDelegate.cpp
Classes/BaseTest.cpp
Classes/VisibleRect.cpp
proj.linux/main.cpp
${PLATFORM_SRC}
)
include_directories(