lqez / npk

neat package system written in C
MIT License
125 stars 33 forks source link

Failed to build under cygwin #1

Closed lqez closed 11 years ago

lqez commented 11 years ago

What steps will reproduce the problem?

  1. Try to build npk under cygwin defining WIN32
  2. See build/cygwin/release/3rdparty/npk/libnpk_dev.a(npk_dev.o):npk_dev.c:(.text+0x141): undefined reference to `__commit'
  3. Go to npk_dev.c and check these lines (in this case, cygwin is identified as NPK_PLATFORM_WINDOWS even if it could be identified as posix) : NPK_RESULT npk_flush( NPK_HANDLE handle ) { if( handle != 0 ) {

    ifdef NPK_PLATFORM_WINDOWS

_commit( handle );

else

fsync( handle );

endif

}
return NPK_SUCCESS;

}

What is the expected output? Compil success What do you see instead? link error

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

3 skaiware

I thought it has been fixed by adding crtdll library : libcrtdll.a in /usr/lib But exec crash at the very begining if this lib is added.

Is the commit() mandatory ?


This issue was moved from google code.

lqez commented 11 years ago

From CMake 2.8.4, CMake does not assume cygwin as windows platform. ( See https://github.com/LuaDist/Repository/issues/46 )

Fixed in 8924a7da2c39ff7df6720c6244ce639bf76c61e7