libyal / libvmdk

Library and tools to access the VMware Virtual Disk (VMDK) format
GNU Lesser General Public License v3.0
163 stars 66 forks source link

TP_POOL support not implemented yet #9

Closed karlmortensen closed 8 years ago

karlmortensen commented 8 years ago

It would be really nice to be able to build libvmdk and libvhdi with Visual Studio 2015. I end up hitting this issue: https://github.com/libyal/libewf/issues/28

Setting WINVER to 0x0601 (Windows 7) did not seem to help.

joachimmetz commented 8 years ago

For reference: https://github.com/libyal/libcthreads/issues/3

It would be really nice to be able to build libvmdk and libvhdi with Visual Studio 2015.

Having time to work on a fix for it would also be very nice ;)

Setting WINVER to 0x0601 (Windows 7) did not seem to help.

How did you set WINVER ?

karlmortensen commented 8 years ago

I concur about the time thing. :-)

I just used:

define WINVER 0x0601

There were a bunch of errors that came up when I did that:

libclocale.vcxproj -> C:\dev\tp\libvmdk_64bit\libvmdk\msvscpp\Release\libclocale.lib 1> libcthreads_thread_pool.c 1>....\libcthreads\libcthreads_thread_pool.c(41): warning C4005: 'WINVER': macro redefinition 1> C:\Program Files (x86)\Windows Kits\8.1\Include\shared\sdkddkver.h(215): note: see previous definition of 'WINVER' 1>....\libcthreads\libcthreads_thread_pool.c(65): error C2039: 'callback_function': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(71): warning C4013: 'libcthreads_internal_thread_pool_pop' undefined; assuming extern returning int 1>....\libcthreads\libcthreads_thread_pool.c(82): error C2039: 'callback_function': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(84): error C2039: 'callback_function_arguments': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(92): error C2039: 'status': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(405): error C2039: 'values_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(408): error C2039: 'values_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(422): error C2039: 'values_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(422): warning C4022: 'memset': pointer mismatch for actual parameter 1 1>....\libcthreads\libcthreads_thread_pool.c(422): error C2168: 'memset': too few actual parameters for intrinsic function 1>....\libcthreads\libcthreads_thread_pool.c(433): error C2039: 'allocated_number_of_values': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(436): error C2039: 'condition_mutex': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(437): error C2198: 'libcthreads_mutex_initialize': too few arguments for call 1>....\libcthreads\libcthreads_thread_pool.c(449): error C2039: 'empty_condition': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(450): error C2198: 'libcthreads_condition_initialize': too few arguments for call 1>....\libcthreads\libcthreads_thread_pool.c(462): error C2039: 'full_condition': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(463): error C2198: 'libcthreads_condition_initialize': too few arguments for call 1>....\libcthreads\libcthreads_thread_pool.c(488): error C2039: 'thread_handles_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(491): error C2039: 'thread_handles_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(505): error C2039: 'thread_handles_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(505): warning C4022: 'memset': pointer mismatch for actual parameter 1 1>....\libcthreads\libcthreads_thread_pool.c(505): error C2168: 'memset': too few actual parameters for intrinsic function 1>....\libcthreads\libcthreads_thread_pool.c(516): error C2039: 'number_of_threads': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(531): error C2039: 'thread_identifiers_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(534): error C2039: 'thread_identifiers_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(548): error C2039: 'thread_identifiers_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(548): warning C4022: 'memset': pointer mismatch for actual parameter 1 1>....\libcthreads\libcthreads_thread_pool.c(548): error C2168: 'memset': too few actual parameters for intrinsic function 1>....\libcthreads\libcthreads_thread_pool.c(573): error C2039: 'thread_identifiers_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(573): error C2198: 'CreateThread': too few arguments for call 1>....\libcthreads\libcthreads_thread_pool.c(590): error C2039: 'thread_handles_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(666): error C2039: 'callback_function': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(667): error C2039: 'callback_function_arguments': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(678): error C2039: 'thread_identifiers_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(681): error C2039: 'thread_identifiers_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(681): error C2198: 'HeapFree': too few arguments for call 1>....\libcthreads\libcthreads_thread_pool.c(685): error C2039: 'thread_handles_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(690): error C2039: 'thread_handles_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(691): warning C4022: 'WaitForSingleObject': pointer mismatch for actual parameter 1 1>....\libcthreads\libcthreads_thread_pool.c(691): error C2198: 'WaitForSingleObject': too few arguments for call 1>....\libcthreads\libcthreads_thread_pool.c(696): error C2039: 'thread_handles_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(696): error C2198: 'HeapFree': too few arguments for call 1>....\libcthreads\libcthreads_thread_pool.c(720): error C2039: 'full_condition': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(723): error C2039: 'full_condition': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(724): error C2198: 'libcthreads_condition_free': too few arguments for call 1>....\libcthreads\libcthreads_thread_pool.c(726): error C2039: 'empty_condition': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(729): error C2039: 'empty_condition': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(730): error C2198: 'libcthreads_condition_free': too few arguments for call 1>....\libcthreads\libcthreads_thread_pool.c(732): error C2039: 'condition_mutex': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(735): error C2039: 'condition_mutex': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(736): error C2198: 'libcthreads_mutex_free': too few arguments for call 1>....\libcthreads\libcthreads_thread_pool.c(738): error C2039: 'values_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(741): error C2039: 'values_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(741): error C2198: 'HeapFree': too few arguments for call 1>....\libcthreads\libcthreads_thread_pool.c(774): error C2039: 'values_array': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(786): error C2039: 'condition_mutex': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(787): warning C4047: 'function': 'libcthreads_mutext ' differs in levels of indirection from 'libcerror_errort *' 1>....\libcthreads\libcthreads_thread_pool.c(787): warning C4024: 'libcthreads_mutex_grab': different types for formal and actual parameter 1 1>....\libcthreads\libcthreads_thread_pool.c(787): error C2198: 'libcthreads_mutex_grab': too few arguments for call 1>....\libcthreads\libcthreads_thread_pool.c(798): error C2039: 'number_of_values': is not a member of 'libcthreads_internal_thread_pool' 1> c:\dev\tp\libvmdk_64bit\libvmdk\libcthreads\libcthreads_thread_pool.h(45): note: see declaration of 'libcthreads_internal_thread_pool' 1>....\libcthreads\libcthreads_thread_pool.c(798): fatal error C1903: unable to recover from previous error(s); stopping compilation 1> INTERNAL COMPILER ERROR in 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\CL.exe' 1> Please choose the Technical Support command on the Visual C++ 1> Help menu, or open the Technical Support help file for more information

joachimmetz commented 8 years ago

Per: https://github.com/libyal/libvmdk/wiki/Building#building

Make sure to check if your build environment defines the correct WINVER for your build. The code uses WINAPI version specific functions based on WINVER. You can define a custom WINVER in the Microsoft Visual Studio C++ project files or in common\config_winapi.h
joachimmetz commented 8 years ago

You'll need to set it for all projects or global via e.g. common\config_winapi.h

karlmortensen commented 8 years ago

Okay, that works much better than what I did.

I still want to eventually get TP_POOL support in libcthreads, but this does everything I must have right now, so I'll close this issue.

Thanks!