libgit2/libgit2 — Issue #560: The libgit2 function import export is incorrect on Windows. 
Author: dreamkxd
Created: 2012-02-15 14:14:38+00:00
State: open

Code in git2/common.h
/** Declare a public function exported for application use. */
#if __GNUC__ >= 4
# define GIT_EXTERN(type) extern \
__attribute__((visibility("default"))) \
type
#elif defined(_MSC_VER)
# define GIT_EXTERN(type) __declspec(dllexport) type
#else
# define GIT_EXTERN(type) extern type
#endif

When under external libraries, __declspec(dllexport) type turn out to be __declspec(dllimport) type

pygit2.c(1185) : warning C4244: 'function' : conversion from 'git_time_t' to 'long', possible loss of data
pygit2.c(2794) : warning C4244: 'function' : conversion from 'const git_time_t' to 'long', possible loss of data
c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:D:\CI\Tools\vcs\libgit2\
n32\libs /LIBPATH:C:\Python32\PCbuild git2.lib /EXPORT:PyInit_pygit2 build\temp.win32-3.2\Release\pygit2.obj /OUT:build\lib.win32
IB:build\temp.win32-3.2\Release\pygit2.lib /MANIFESTFILE:build\temp.win32-3.2\Release\pygit2.pyd.manifest
Creating library build\temp.win32-3.2\Release\pygit2.lib and object build\temp.win32-3.2\Release\pygit2.exp
pygit2.obj : error LNK2019: unresolved external symbol _git_object_lookup referenced in function _git_commit_lookup
pygit2.obj : error LNK2019: unresolved external symbol _git_object_lookup_prefix referenced in function _git_commit_lookup_prefix
pygit2.obj : error LNK2019: unresolved external symbol _git_object_free referenced in function _git_commit_free
pygit2.obj : error LNK2019: unresolved external symbol _git_lasterror referenced in function _git_last_error
pygit2.obj : error LNK2019: unresolved external symbol _git_oid_fmt referenced in function _Error_set_oid
pygit2.obj : error LNK2019: unresolved external symbol _git_object_type referenced in function _lookup_object_prefix
pygit2.obj : error LNK2019: unresolved external symbol _git_oid_fromstrn referenced in function _py_str_to_git_oid
pygit2.obj : error LNK2019: unresolved external symbol _git_oid_fromraw referenced in function _py_str_to_git_oid
pygit2.obj : error LNK2019: unresolved external symbol _git_repository_open referenced in function _Repository_init
pygit2.obj : error LNK2019: unresolved external symbol _git_repository_free referenced in function _Repository_dealloc
pygit2.obj : error LNK2019: unresolved external symbol _git_odb_free referenced in function _Repository_contains
pygit2.obj : error LNK2019: unresolved external symbol _git_odb_exists referenced in function _Repository_contains
pygit2.obj : error LNK2019: unresolved external symbol _git_repository_odb referenced in function _Repository_contains
pygit2.obj : error LNK2019: unresolved external symbol _git_odb_read_prefix referenced in function _Repository_read_raw
pygit2.obj : error LNK2019: unresolved external symbol _git_odb_object_free referenced in function _Repository_read
pygit2.obj : error LNK2019: unresolved external symbol _git_odb_object_type referenced in function _Repository_read
pygit2.obj : error LNK2019: unresolved external symbol _git_odb_object_data referenced in function _Repository_read
pygit2.obj : error LNK2019: unresolved external symbol _git_odb_object_size referenced in function _Repository_read
pygit2.obj : error LNK2019: unresolved external symbol _git_odb_open_wstream referenced in function _Repository_write
pygit2.obj : error LNK2019: unresolved external symbol _git_index_free referenced in function _Repository_get_index
pygit2.obj : error LNK2019: unresolved external symbol _git_repository_index referenced in function _Repository_get_index
pygit2.obj : error LNK2019: unresolved external symbol _git_repository_path referenced in function _Repository_get_path
pygit2.obj : error LNK2019: unresolved external symbol _git_repository_workdir referenced in function _Repository_get_workdir
pygit2.obj : error LNK2019: unresolved external symbol _git_revwalk_push referenced in function _Repository_walk
pygit2.obj : error LNK2019: unresolved external symbol _git_revwalk_free referenced in function _Repository_walk
pygit2.obj : error LNK2019: unresolved external symbol _git_revwalk_sorting referenced in function _Repository_walk
pygit2.obj : error LNK2019: unresolved external symbol _git_revwalk_new referenced in function _Repository_walk
pygit2.obj : error LNK2019: unresolved external symbol _git_commit_create referenced in function _Repository_create_commit
pygit2.obj : error LNK2019: unresolved external symbol _git_tag_create referenced in function _Repository_create_tag
pygit2.obj : error LNK2019: unresolved external symbol _git_strarray_free referenced in function _Repository_listall_references