Hi Igor,
This is what happens when I try to build pmempool.vcxproj. Any suggestions?
libpmemcommon
Build started 4/9/2020 9:16:37 AM.
Target _PrepareForClean:
Deleting file "x64\Debug\libpmemcommon.tlog\libpmemcommon.lastbuildstate".
Target ResolveProjectReferences:
Target InitializeBuildStatus:
Touching "x64\Debug\libpmemcommon.tlog\unsuccessfulbuild".
Target VcpkgTripletSelection:
Using triplet "x64-windows" from "D:\vcpkg\installed\x64-windows\"
Target ClCompile:
auto_flush_windows.c
usc_windows.c
D:\PMDK\pmdk-master\src\libpmem2\usc_windows.c(110,34): error C2065: 'PMEM2_E_BUFFER_TOO_SMALL': undeclared identifier
D:\PMDK\pmdk-master\src\libpmem2\usc_windows.c(136,34): error C2065: 'PMEM2_E_BUFFER_TOO_SMALL': undeclared identifier
badblock_none.c
set_badblocks.c
ctl.c
ctl_cow.c
ctl_prefault.c
ctl_sds.c
ctl_fallocate.c
file.c
D:\PMDK\pmdk-master\src\common\file.c(71,29): error C2220: the following warning is treated as an error
D:\PMDK\pmdk-master\src\common\file.c(71,29): warning C4013: 'pmem2_err_to_errno' undefined; assuming extern returning int
D:\PMDK\pmdk-master\src\common\file.c(176,33): warning C4013: 'pmem2_source_from_fd' undefined; assuming extern returning int
D:\PMDK\pmdk-master\src\common\file.c(181,25): warning C4013: 'pmem2_source_size' undefined; assuming extern returning int
D:\PMDK\pmdk-master\src\common\file.c(183,21): warning C4013: 'pmem2_source_delete' undefined; assuming extern returning int
file_windows.c
mmap.c
mmap_windows.c
os_deep_windows.c
pool_hdr.c
rand.c
Build FAILED.
On Thu, 9 Apr 2020 16:05:45 +0200, Igor Chor??ewicz <
cho...@gmail.com> wrote:
>It's actually a problem with the example itself, I've fixed it here:
>
https://github.com/igchor/libpmemobj-cpp/blob/hash_map_doc_snippet_fix/examples/doc_snippets/concurrent_hash_map.cpp
>It should be merged into master soon, but for now you can try to use the
>example directly from my branch,
>
>Before running the example, you must first create a pool using pmempool
>utility (as described in a comment in the updated version):
>pmempool create obj --layout="concurrent_hash_map" --size 1G path_to_a_pool
>
>and then pass that path_to_a_pool to the example binary.
>
>Note that it's also possible to create a pool from within the program (by
>calling pool::create) - we just didn't want to complicate the example's
>code.
>
>Igor
>
>czw., 9 kwi 2020 o 14:40 steve <
st...@steveheller.org> napisa?(a):
>
>> On Wed, 8 Apr 2020 14:50:35 +0200, Igor Chor??ewicz <
cho...@gmail.com>
>> wrote:
>>
>> >Please take a look here:
>> >
>>
https://pmem.io/libpmemobj-cpp/master/doxygen/classpmem_1_1obj_1_1concurrent__hash__map.html
>> >You can find a code snippet demonstrating a simple usage there. (error
>> >handling is a bit verbose but it demonstrates most of the
>> >possible exceptions).
>>
>> I've downloaded and installed everything needed and can compile and link
>> the program successfully.
>> But when I run it in the VC++ 2019 debugger with the argument
>> "f:\test.map", where f:\ is my Optane PM DAX volume, I get this output:
>>
>> "Exception occured!
>> Exception: Pool already closed"
>>
>> Tracing through it, I see that the line
>>
>> pop = pool<root>::open(path, "concurrent_hash_map example");
>>
>> throws the exception.
>>
>> Can you help me figure out what is going on?
>>
>> Alternatively, do you know of a sample that allows me to store some
>> records and exit normally, then on a separate run, lets me retrieve those
>> records?
>> One thread would be fine; I don't care about multithreading.
>>
>> Thanks!
>> ------------
>> Steve Heller
>>
------------
Steve Heller