Linter "puke" when building demo program on Windows 10

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
User avatar
dan9er
Posts: 19
Joined: 2019-09-18T18:13:57-07:00
Authentication code: 1152
Location: Canada

Linter "puke" when building demo program on Windows 10

Post by dan9er » 2019-10-13T15:12:07-07:00

I've compiled ImageMagick on my Windows 10 machine, however I'm not sure if I'd done so successfully. I've attempted to build the demo program but I'm getting, for the lack of a better term, linker puke.

I'm pastebinning the log because it's just so much:
https://pastebin.com/be1cNScb
Note that I've stripped irrelevant parts of directories for my privacy.

Relevant project tree:

Code: Select all

ImageMagick-Windows\ImageMagick\Magick++\demo
|   analyze.cpp
|   button.cpp
|   demos.tap
|   detrans.cpp
|   flip.cpp
|   gravity.cpp
|   piddle.cpp
|   shapes.cpp
|   smile_anim.miff
|   tile.miff
|   zoom.cpp
|
\---demo
    |   CMakeLists.txt
    |
    +---build
    |   |   CMakeCache.txt
    |   |   cmake_install.cmake
    |   |   Makefile
    |   |   model.miff
    |   |   smile.miff
    |   |
    |   \---CMakeFiles
    |       [CMake's stuff...]
    |
    +---include
    |   |   Magick++.h
    |   |
    |   +---Magick++
    |   |       [.h files...]
    |   |
    |   +---MagickCore
    |   |       [.h files...]
    |   |
    |   \---MagickWand
    |           [.h files...]
    |
    +---lib
    |       CORE_RL_Magick++_.lib
    |       CORE_RL_MagickCore_.lib
    |       CORE_RL_MagickWand_.lib
    |
    \---src
            demo.cpp
CMakeLists.txt:

Code: Select all

cmake_minimum_required(VERSION 3.15)
project(demo)

# compile with C++11
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# set some stuff for Magick++ so it doesn't yell warnings at us
add_compile_definitions(MAGICKCORE_HDRI_ENABLE=0 MAGICKCORE_QUANTUM_DEPTH=8)

# create the executable
add_executable(demo ${CMAKE_SOURCE_DIR}/src/demo.cpp)

# set directories for libraries and includes
target_include_directories(demo PRIVATE ${CMAKE_SOURCE_DIR}/include)
target_link_directories(demo PRIVATE ${CMAKE_SOURCE_DIR}/lib)

# link libraries to executable
target_link_libraries(demo ${CMAKE_SOURCE_DIR}/lib/CORE_RL_Magick++_.lib)
Compiled ImageMagick version is 7.0.8-67
VS Build Tools 2019 version is 16.3.2
Using GNU Make 3.81
Using LLVM clang-cl 8.0.1
Imported .lib file is called CORE_RL_Magick++.lib

There's 2 other things about the log:
  • warning: [...] macro redefined - This is another, less serious issue but I'm mentioning it in case it's relevant here. You can see I've set M++'s variables in my CMakeLists.txt, however I don't know why M++ is overriding them. It doesn't do this on my Ubuntu machine, in fact it complains if I don't set them. Is this a Windows quirk?
  • warning: 'getenv' is deprecated - I believe this is an issue with the "outdated" demo program itself, unless I'm mistaken.

Post Reply