Click here to Skip to main content
Sign Up to vote bad
good
See more: C++MFC
Hello, guys.
I got stuck with connecting Magick++ library (It's a bunch of libraries to handle images) in my C++ project.
Maybe someone have some experience how to do this.
I'm using VS 2012 and already built a VisualStaticMT solution from binaries.
But there is no way I could employ compiled libs in my project.
It seems to me the problem consist in Linker. I tried to find step-by-step solution but in vain.
 
Error 46 error LNK1104: cannot open file 'CORE_DB_magick_.lib'
I tried to copy it in the project dir( it gave nothing)
 
It would be great to see an accurate clarification how to use this Lib in C++ using VS not only for me, but for others who have the same troubles.
Posted 17-Sep-12 14:46pm
Edited 18-Sep-12 8:51am

Comments
Sergey Alexandrovich Kryukov - 17-Sep-12 21:04pm
This "I got stuck is not informative". You did not provide enough information to help you. --SA
Wes Aday - 17-Sep-12 22:34pm
" I could employ compiled libs in my project", and why could you not link to the libraries?
Wes Aday - 18-Sep-12 13:34pm
Did you add the path to those libraries in the project settings in VS?
JOHN 602 - 18-Sep-12 14:42pm
Of course I did See: Project->"MyProject" Properties->Configuration Properties-> than in VC++ Directories : in field "Include directories" I set "C:\Users\Administrator\Desktop\New folder\ImageMagick-6.6.9;C:\Users\Administrator\Desktop\New folder\ImageMagick-6.6.9\VisualMagick\lib;C:\Users\Administrator\Desktop\New folder\ImageMagick-6.6.9\Magick++\lib;$(IncludePath)" in field "Library directorie" i set: C:\Users\Administrator\Desktop\New folder\ImageMagick-6.6.9\Magick++\lib;$(LibraryPath) Than in Linker(tab)->General in field "Additional Library Directories" I set %USERPROFILE%\C:\Users\Administrator\Desktop\New folder\ImageMagick-6.6.9\VisualMagick\lib;%USERPROFILE%\C:\Users\Administrator\Desktop\New folder\ImageMagick\libxml\win32\dsp\libxml2;%(AdditionalLibraryDirectories) In Linker->Input in field "Addition Dependencies" i set ws2_32.lib;CORE_DB_magick_.lib;CORE_DB_Magick++_.lib;CORE_DB_bzlib_.lib;CORE_DB_coders_.lib;CORE_DB_filters_.lib;CORE_DB_jbig_.lib;CORE_DB_jp2_.lib;CORE_DB_jpeg_.lib;CORE_DB_lcms_.lib;CORE_DB_libxml_.lib;CORE_DB_png_.lib;CORE_DB_tiff_.lib;CORE_DB_ttf_.lib;CORE_DB_wand_.lib;CORE_DB_wmf_.lib;CORE_DB_xlib_.lib;CORE_DB_zlib_.lib;CORE_RL_bzlib_.lib;CORE_RL_coders_.lib;CORE_RL_filters_.lib;CORE_RL_jbig_.lib;CORE_RL_jp2_.lib;CORE_RL_jpeg_.lib;CORE_RL_lcms_.lib;CORE_RL_libxml_.lib;CORE_RL_magick_.lib;CORE_RL_Magick++_.lib;CORE_RL_png_.lib;CORE_RL_tiff_.lib;CORE_RL_ttf_.lib;CORE_RL_wand_.lib;CORE_RL_wmf_.lib;CORE_RL_xlib_.lib;CORE_RL_zlib_.lib;%(AdditionalDependencies) Than in filed "Add module to assembly" I set CORE_DB_magick_.lib;CORE_DB_Magick++_.lib;CORE_DB_wand_.lib;X11.lib;%(AddModuleNamesToAssembly)
Richard MacCutchan - 18-Sep-12 16:03pm
%USERPROFILE%\C:\Users\Administrator\Desktop\New folder\ImageMagick-6.6.9\VisualMagick\lib That %USERPROFILE%\ at the front does not look right. What does that complete expression evaluate to?
JackDingler - 18-Sep-12 17:07pm
Looks like it's missing a semicolon between the paths.
Richard MacCutchan - 18-Sep-12 17:11pm
Looks like a lack of understanding.
JOHN 602 - 18-Sep-12 17:30pm
Yeah man. You know smth has changed. I excluded %USERPROFILE%\ from "Additional Library Directories".Started program and got "Missing CORE_RL_bzlib_lib". I exclude all CORE_RL_-libs from "Addition Dependencies" because they initially are absent in Magick++ due to I built it from binaries and checked "For multithreading static libs" instead of just for single thread(Don't remember how checkbox was called). Instead of CORE_RL_bzlib_lib in assembled Magik++ exist CORE_bzlib_xt_lib and this ain't important.(Of course I need to add coorect name of.lib with "_xt_"). But now I got errors like: error LNK2019: unresolved external symbol "__declspec(dllimport) void __cdecl Magick::InitializeMagick(char const *)" (__imp_?InitializeMagick@Magick@@YAXPBD@Z) referenced in function _main error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall Magick::Image::Image(class std::basic_string<char,struct>,class std::allocator > const &)" (__imp_??0Image@Magick@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function _main Before writing this, I've checked smth info this errors type... Nothing useful
JOHN 602 - 18-Sep-12 17:46pm
Just set libs extensions properly Now in In Linker->Input in field "Addition Dependencies" : ws2_32.lib;CORE_DB_magick_.lib;CORE_DB_Magick++_.lib;CORE_DB_bzlib_xt_.lib;CORE_DB_coders_.lib;CORE_DB_filters_xt_.lib;CORE_DB_jbig_xt_.lib;CORE_DB_jp2_xt_.lib;CORE_DB_jpeg_xt_.lib;CORE_DB_lcms_xt_.lib;CORE_DB_libxml_xt_.lib;CORE_DB_png_xt_.lib;CORE_DB_tiff_xt_.lib;CORE_DB_ttf_xt_.lib;CORE_DB_wand_xt_.lib;CORE_DB_wmf_xt_.lib;CORE_DB_xlib_xt_.lib;CORE_DB_zlib_xt_.lib ;%(AdditionalDependencies) After compiling I got LNK1104: cannot open file 'CORE_DB_bzlib_xt_.lib' WTF ??
Richard MacCutchan - 19-Sep-12 4:37am
You seem to be going round in circles randomly changing things rather than looking closely at what you need to add into your project. The Additional Library Directories field should contain the full paths of the directories containing the libraries that you wish to use. The Additional Dependencies field should contain the names of all the libraries that contain the definitions of any references that you are using, and these need to be included once only.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Christian Graus 538
1 Ron Beyer 286
2 samadhan_kshirsagar 229
3 Tadit Dash 213
4 OriginalGriff 198
0 Sergey Alexandrovich Kryukov 7,017
1 Prasad_Kulkarni 3,815
2 OriginalGriff 3,557
3 _Amy 3,372
4 CPallini 3,010


Advertise | Privacy | Mobile
Web02 | 2.6.130619.1 | Last Updated 18 Sep 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid