Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cairomm] No way to actually use cairomm after installation #15816

Closed
atimholt opened this issue Jan 22, 2021 · 4 comments · Fixed by #13100
Closed

[cairomm] No way to actually use cairomm after installation #15816

atimholt opened this issue Jan 22, 2021 · 4 comments · Fixed by #13100
Assignees
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist

Comments

@atimholt
Copy link

atimholt commented Jan 22, 2021

Describe the bug
After installing cairomm, no instructions are given for how to integrate it into a cmake project, and no files of the form '*cairomm*config.cmake' exist anywhere in the vcpkg directory.

Environment

  • OS: Windows
  • Compiler: Microsoft (R) Build Engine version 16.8.2+25e4d540b for .NET Framework

To Reproduce
Steps to reproduce the behavior:

  1. ./vcpkg install cairomm
  2. Manually try every capitalization and punctuation variation of the typical cmake commands, attempting to compile the project (with the 'cmake --build' command) every time.
  3. Repeat step 2 after following the cmake-integration instructions for './vcpkg install cairo', for good measure.

Expected behavior
One should be able to follow instructions (currently absent), given at the end of the './vcpkg install cairomm' command, which will allow a project using the cairomm library to compile.

Failure logs
The following is typical output from the compiler (via the 'cmake --build build' command), whether or not the 'cairo' package (as opposed to the 'cairomm' package) is integrated into the cmake project, per the instructions given after './vcpkg install cairo'.

|| CMake is re-running because C:/[project_path]/build/CMakeFiles/generate.stamp is out-of-date.
|| the file 'C:/[project_path]/CMakeLists.txt'
|| is newer than 'C:/[project_path]/build/CMakeFiles/generate.stamp.depend'
|| result='-1'
|| -- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.19042.
|| -- Configuring done
|| -- Generating done
|| -- Build files have been written to: C:/[project_path]/build
|| Microsoft (R) Build Engine version 16.8.2+25e4d540b for .NET Framework
|| Copyright (C) Microsoft Corporation. All rights reserved.
||
|| Checking Build System
|| main.obj : error LNK2001: unresolved external symbol "public: void __cdecl Cairo::Context::show_page(void)" (?show_page@Context@Cairo@@QEAAXXZ) [C:[project_path]\build\src\main.vcxproj]
|| main.obj : error LNK2001: unresolved external symbol "public: void __cdecl Cairo::Context::stroke(void)" (?stroke@Context@Cairo@@QEAAXXZ) [C:[project_path]\build\src\main.vcxproj]
|| main.obj : error LNK2001: unresolved external symbol "public: void __cdecl Cairo::Context::line_to(double,double)" (?line_to@Context@Cairo@@QEAAXNN@Z) [C:[project_path]\build\src\main.vcxproj]
|| main.obj : error LNK2001: unresolved external symbol "public: void __cdecl Cairo::Context::move_to(double,double)" (?move_to@Context@Cairo@@QEAAXNN@Z) [C:[project_path]\build\src\main.vcxproj]
|| main.obj : error LNK2001: unresolved external symbol "public: void __cdecl Cairo::Context::set_line_width(double)" (?set_line_width@Context@Cairo@@QEAAXN@Z) [C:[project_path]\build\src\main.vcxproj]
|| main.obj : error LNK2001: unresolved external symbol "public: void __cdecl Cairo::Context::set_source_rgb(double,double,double)" (?set_source_rgb@Context@Cairo@@QEAAXNNN@Z) [C:[project_path]\build\src\main.vcxproj]
|| main.obj : error LNK2001: unresolved external symbol "public: static class std::shared_ptr __cdecl Cairo::Context::create(class std::shared_ptr const &)" (?create@Context@Cairo@@sa?AV?$shared_ptr@VContext@Cairo@@@std@@aebv?$shared_ptr@VSurface@Cairo@@@4@@z) [C:[project_path]\build\src\main.vcxproj]
|| main.obj : error LNK2001: unresolved external symbol "public: static class std::shared_ptr __cdecl Cairo::SvgSurface::create(class std::basic_string<char,struct std::char_traits,class std::allocator >,double,double)" (?create@SvgSurface@Cairo@@sa?AV?$shared_ptr@VSvgSurface@Cairo@@@std@@v?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@4@NN@Z) [C:[project_path]\build\src\main.vcxproj]
|| C:[project_path]\build\src\Debug\main.exe : fatal error LNK1120: 8 unresolved externals [C:[project_path]\build\src\main.vcxproj]

Additional Context
The above linker failure output is given as illustrative that cairomm is not simply a header-only library, at the least.

@Neumann-A
Copy link
Contributor

try out #13100

@NancyLi1013 NancyLi1013 added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Jan 25, 2021
@NancyLi1013
Copy link
Contributor

Hi @atimholt

Thanks for posting this issue.

Could you please try to build cairomm via this PR #13100?

@NancyLi1013
Copy link
Contributor

Please update to latest vcpkg and rebuild this. Feel free to reopen this issue if it is still a problem for you.

@tueda
Copy link
Contributor

tueda commented Jun 23, 2021

Still vcpkg doesn't tell any clue on how to use cairomm in a CMake project. One has to figure it out somehow:

find_package(PkgConfig REQUIRED)
pkg_check_modules(CAIROMM REQUIRED IMPORTED_TARGET cairomm-1.16)

target_compile_features(main PRIVATE cxx_std_17)
target_link_libraries(main PRIVATE PkgConfig::CAIROMM)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants