Menu

#117 Some C API functions not exported on Windows

wont-fix
seebk
None
2019-04-21
2019-02-09
letmaik
No

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.

Related

Bugs: #117

Discussion

  • letmaik

    letmaik - 2019-02-09

    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.

     
  • seebk

    seebk - 2019-02-09

    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()

     
    • letmaik

      letmaik - 2019-02-09

      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:

      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()


      [bugs:#117] https://sourceforge.net/p/lensfun/bugs/117/ Some C API
      functions not exported on Windows

      Status: open
      Created: Sat Feb 09, 2019 02:18 PM UTC by letmaik
      Last Updated: Sat Feb 09, 2019 03:18 PM UTC
      Owner: nobody

      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.


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/lensfun/bugs/117/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #117

      • seebk

        seebk - 2019-02-09

        To 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 :)

         
    • Torsten Bronger

      Torsten Bronger - 2019-04-20

      What exactly does not match (a branch in the definition of LF_EXPORT?)

       
      • seebk

        seebk - 2019-04-20

        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.

         
  • Torsten Bronger

    Torsten Bronger - 2019-04-21

    So, this one can be closed, and the remaining things are tracked elsewhere?

     
  • seebk

    seebk - 2019-04-21

    Yes, we can close this. Discussion can continue in the respective GitHub issue about the C-Wrapper: https://github.com/lensfun/lensfun/issues/502

     
  • seebk

    seebk - 2019-04-21
    • status: open --> wont-fix
    • assigned_to: seebk