Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Managed C++/CLI
  4. Compiling a shared library

Compiling a shared library

Scheduled Pinned Locked Moved Managed C++/CLI
helpc++javapythonphp
4 Posts 2 Posters 13 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member_15047707
    wrote on last edited by
    #1

    Dear Community! Concerning a topic that deals with the compilation of a program written in C++ i would like to ask for your support. Just for information at the beginning: I am a beginner in C++ programming. Most of the things I do in Python, Java and PHP. However, for writing the master thesis, I have to deal with an open source software where the relevant part is written in C++ where i have to modify one part and now have to compile the folder where the source files are located to a shared library (.so) The source code is from https://github.com/qgis/QGIS The file i modified was https://github.com/qgis/QGIS/blob/master/src/analysis/raster/qgskde.cpp (In the installed version of QGIS, the folder analysis appears just as _analysis.so) I am working on a MacBook using MacOS 10.15.4 and a Raspberry Pi using Raspbian and have CMake Version 3.4 installed. The CMakeLists.txt File i try to compile using the command "cmake . --debug-output" (having directed to the directory "..../QGIS-master/src/analysis/" before) is https://github.com/qgis/QGIS/blob/master/src/analysis/CMakeLists.txt where i added cmake_minimum_required(VERSION 3.4.0) in Line 4. The output i get when executing the command described above is:

    Running with debug output on.
    CMake Error at CMakeLists.txt:390 (find_package):
    By not providing "FindEXIV2.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "EXIV2", but
    CMake did not find one.

    Could not find a package configuration file provided by "EXIV2" with any of
    the following names:

    EXIV2Config.cmake
    exiv2-config.cmake
    

    Add the installation prefix of "EXIV2" to CMAKE_PREFIX_PATH or set
    "EXIV2_DIR" to a directory containing one of the above files. If "EXIV2"
    provides a separate development package or SDK, be sure it has been
    installed.

    Called from: [1] /home/pi/QGIS-master/src/analysis/CMakeLists.txt
    -- Configuring incomplete, errors occurred!
    See also "/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeOutput.log".

    After several attempts of trying to solve this problem using google i don't get any further. I attached the

    CMakeOutput.log

    below. Can someone give my advice on how i proceed here? Thanks for any help in advance. Best regards! CMakeOutput.log ----------------------------------------------

    The system is: Linux - 4.1.19+ - armv6l
    Compiling the C compiler identification source file "

    L 1 Reply Last reply
    0
    • M Member_15047707

      Dear Community! Concerning a topic that deals with the compilation of a program written in C++ i would like to ask for your support. Just for information at the beginning: I am a beginner in C++ programming. Most of the things I do in Python, Java and PHP. However, for writing the master thesis, I have to deal with an open source software where the relevant part is written in C++ where i have to modify one part and now have to compile the folder where the source files are located to a shared library (.so) The source code is from https://github.com/qgis/QGIS The file i modified was https://github.com/qgis/QGIS/blob/master/src/analysis/raster/qgskde.cpp (In the installed version of QGIS, the folder analysis appears just as _analysis.so) I am working on a MacBook using MacOS 10.15.4 and a Raspberry Pi using Raspbian and have CMake Version 3.4 installed. The CMakeLists.txt File i try to compile using the command "cmake . --debug-output" (having directed to the directory "..../QGIS-master/src/analysis/" before) is https://github.com/qgis/QGIS/blob/master/src/analysis/CMakeLists.txt where i added cmake_minimum_required(VERSION 3.4.0) in Line 4. The output i get when executing the command described above is:

      Running with debug output on.
      CMake Error at CMakeLists.txt:390 (find_package):
      By not providing "FindEXIV2.cmake" in CMAKE_MODULE_PATH this project has
      asked CMake to find a package configuration file provided by "EXIV2", but
      CMake did not find one.

      Could not find a package configuration file provided by "EXIV2" with any of
      the following names:

      EXIV2Config.cmake
      exiv2-config.cmake
      

      Add the installation prefix of "EXIV2" to CMAKE_PREFIX_PATH or set
      "EXIV2_DIR" to a directory containing one of the above files. If "EXIV2"
      provides a separate development package or SDK, be sure it has been
      installed.

      Called from: [1] /home/pi/QGIS-master/src/analysis/CMakeLists.txt
      -- Configuring incomplete, errors occurred!
      See also "/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeOutput.log".

      After several attempts of trying to solve this problem using google i don't get any further. I attached the

      CMakeOutput.log

      below. Can someone give my advice on how i proceed here? Thanks for any help in advance. Best regards! CMakeOutput.log ----------------------------------------------

      The system is: Linux - 4.1.19+ - armv6l
      Compiling the C compiler identification source file "

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Did you compile it "before" you started making changes? That way, you know that it worked in the first place. If not, start over.

      It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

      M 1 Reply Last reply
      0
      • L Lost User

        Did you compile it "before" you started making changes? That way, you know that it worked in the first place. If not, start over.

        It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

        M Offline
        M Offline
        Member_15047707
        wrote on last edited by
        #3

        No unfortunately not. But I have downloaded the same sourcecode (means kind of "virgin") from github where i didn't implement my changes (which are should not have any impact as it is just a change of a formula in one calculation) and the exact error occurs also. However, I've worked myself through somehow to get around this exiv2 problem by inserting

        set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_MODULE_PATH}/home/pi/QGIS-master/src/analysis/")

        to the CMakeLists.txt file. However, i'm stuck at this line now:

        Running with debug output on.
        -- Found exiv2: /usr/lib/arm-linux-gnueabihf/libexiv2.so
        Called from: [2] /home/pi/QGIS-master/src/analysis/FindEXIV2.cmake
        [1] /home/pi/QGIS-master/src/analysis/CMakeLists.txt
        CMake Error at CMakeLists.txt:400 (ADD_FLEX_FILES_PREFIX):
        Unknown CMake command "ADD_FLEX_FILES_PREFIX".

        Called from: [1] /home/pi/QGIS-master/src/analysis/CMakeLists.txt
        -- Configuring incomplete, errors occurred!
        See also "/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeOutput.log".

        and except finding google solutions that redirect me to the same file or similar ones of the QGIS github project i cant find where it fails now. Do you have an idea? Thanks for your time in advance!

        L 1 Reply Last reply
        0
        • M Member_15047707

          No unfortunately not. But I have downloaded the same sourcecode (means kind of "virgin") from github where i didn't implement my changes (which are should not have any impact as it is just a change of a formula in one calculation) and the exact error occurs also. However, I've worked myself through somehow to get around this exiv2 problem by inserting

          set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_MODULE_PATH}/home/pi/QGIS-master/src/analysis/")

          to the CMakeLists.txt file. However, i'm stuck at this line now:

          Running with debug output on.
          -- Found exiv2: /usr/lib/arm-linux-gnueabihf/libexiv2.so
          Called from: [2] /home/pi/QGIS-master/src/analysis/FindEXIV2.cmake
          [1] /home/pi/QGIS-master/src/analysis/CMakeLists.txt
          CMake Error at CMakeLists.txt:400 (ADD_FLEX_FILES_PREFIX):
          Unknown CMake command "ADD_FLEX_FILES_PREFIX".

          Called from: [1] /home/pi/QGIS-master/src/analysis/CMakeLists.txt
          -- Configuring incomplete, errors occurred!
          See also "/home/pi/QGIS-master/src/analysis/CMakeFiles/CMakeOutput.log".

          and except finding google solutions that redirect me to the same file or similar ones of the QGIS github project i cant find where it fails now. Do you have an idea? Thanks for your time in advance!

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Then check the history of this project. Maybe it never worked (recently). Anyway, take out some useful part and see if you can compile that. Never met software where I couldn't find something to remove / refactor (or totally rewrite). If you don't understand it, you probably don't need it.

          It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups