Coder Social home page Coder Social logo

Problems compiling with MSVC about lensfun HOT 8 CLOSED

bronger avatar bronger commented on September 23, 2024
Problems compiling with MSVC

from lensfun.

Comments (8)

bronger avatar bronger commented on September 23, 2024

The python/tibs build system is not actively maintained any more. Can you please try the cmake build system? The instructions are also in the README. On windows you can also use the CMake GUI to configure it. I have used the lensfun CMake build chain several times on windows in the past and it should work this way.

Original comment by: seebk

from lensfun.

bronger avatar bronger commented on September 23, 2024

I switched to cmake now. It finds glib after I manually define the glib2 dir using "-DGLIB2_BASE_DIR=glib-2.0". Is that desired? When I then run "make" I get "makefile:32: *** missing separator." Line 32 is the "!ELSE" line in this snippet of cmake_build/Makefile:

!IF "$(OS)" == "Windows_NT"
NULL=
!ELSE
NULL=nul
!ENDIF

Original comment by: neothemachine

from lensfun.

bronger avatar bronger commented on September 23, 2024

I got it working now, the Makefile produced by cmake is for NMake, so I have to invoke "nmake" and not the gnu make. I think this should be mentioned in the README.

Original comment by: neothemachine

from lensfun.

bronger avatar bronger commented on September 23, 2024

Did you use CMake-GUI or from command line? In the GUI you have to select the proper Makefile type to be generated. AFAIk NMake is the default, so probably you justed missed this setting.

On the command line GNU Make should be default makefile type. However, you can influence it with the -G option.

Regarding glib: Unfortunately there is no reliable automatic process to find required libs on windows. If glib is installed in the MingW compiler folder structure and a package config file is available, CMake may find it automatically. Otherwise you have to set the path manually as you did.

Original comment by: seebk

from lensfun.

bronger avatar bronger commented on September 23, 2024

I used the command line. Apparently the default is "whatever is installed", on another machine which had Visual Studio (and not just the SDK) it used the Visual Studio generator, so yeah, my final working command line is: "cmake .. -G "NMake Makefiles" -DGLIB2_BASE_DIR=glib-2.0 -DBUILD_TESTS=off -DLENSFUN_INSTALL_PREFIX= ".

To actually use the dll I had to also copy libglib-2.0-0.dll, libiconv-2.dll, and libintl-8.dll in the same folder. The first one makes sense, the other two are dependencies of glib. The documentation of glib is a bit inconclusive as to which of their dlls one needs in which case. Are these dlls the ones that lensfun needs?

By the way, I'm doing all this to have binaries for my lensfun Python wrapper, for 32 and 64 bit and Python 2 and 3, so in total four binaries. You can see the build process output for 32 bit Python 2.7 here:
https://ci.appveyor.com/project/neothemachine/lensfunpy/build/job/7m4gbvtc8x86mojs

The produced binaries for that run are here:
https://ci.appveyor.com/project/neothemachine/lensfunpy/build/job/7m4gbvtc8x86mojs/artifacts

And the project here:
https://github.com/neothemachine/lensfunpy/tree/appveyor

There still seems to be a problem with the 64 bit build but I think that's nothing serious. I'll look into that tomorrow.

Original comment by: neothemachine

from lensfun.

bronger avatar bronger commented on September 23, 2024

There still seems to be a problem with the 64 bit build but I think
that's nothing serious. I'll look into that tomorrow.

Just a note that everything is working now for 32 and 64 bit. I had a
problem in the Python side, the actual lensfun compilation was already
fine. For Windows I'm bundling the database files with my Python
library, I think that's the way to go.

Original comment by: neothemachine

from lensfun.

bronger avatar bronger commented on September 23, 2024

This issue can be closed.

Original comment by: neothemachine

from lensfun.

bronger avatar bronger commented on September 23, 2024
  • status: open --> fixed

Original comment by: bronger

from lensfun.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.