I admit, this is a weird one and I'm just reporting this to have a record of it.
I'm building master (previously 0.3.95, but same issue) on MSVC, and for some weird reason, the following functions are not part of the produced .lib/.dll files (verified with dumpbin /exports
):
lf_db_load_data lf_db_read_timestamp lf_db_save lf_db_save_file lf_mount_copy
I currently have no idea why this is the case, the source code looks fine to me and these functions don't look any different than others I think.
Looks like this also happens on Linux: https://travis-ci.org/letmaik/lensfunpy/jobs/490962742#L1086 Here the effect is delayed as the linker by default allows to build shared libraries with unresolved symbols, so this errors only when actually loading the library.
Ok, think I got it. The declaration in the header and the implementations do not match. It also looks like some of the C-API functions of lfDatabase are not correct anymore and should be removed. e.g lf_db_load_data()
Ah, great that you figured it out so quickly.
Why do you say that lf_db_load_data should be removed? I actually use
this function :)
On 09.02.2019 15:24, seebk wrote:
Related
Bugs:
#117To be more precise, the interface of the C wrapper does not match the functionality of the C++ class. The lfDatabase load/save functionality and the respective C wrapper function and parameters need some optimisation and alignments. So there will be a lf_db_load_data and lf_db_save_data function in the end :)
What exactly does not match (a branch in the definition of LF_EXPORT?)
The declaration in the header file was slightly different to the definition in the source file. I think this is already fixed for lf_db_read_timestamp(). The implementation of lf_mount_copy() is missing.
The lf_db_save and load functions have to be adapted the new lfDatabase class API. The concept of the load and save functions with its respective overloads is still a bit messy, though.
So, this one can be closed, and the remaining things are tracked elsewhere?
Yes, we can close this. Discussion can continue in the respective GitHub issue about the C-Wrapper: https://github.com/lensfun/lensfun/issues/502