Linker configuration in Visual Studio 6

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
rwikee
Posts: 7
Joined: 2010-06-09T13:27:51-07:00
Authentication code: 8675308

Linker configuration in Visual Studio 6

Post by rwikee »

I am getting a lot of linking error like ...

Code: Select all

Compiling...
button.cpp
piddle.cpp
Magick lib DLL import interface
Magick module DLL export interface
MagickWand lib DLL import interface
MagickWand module DLL export interface
Magick++ lib DLL import
Generating Code...
Magick lib DLL import interface
Magick module DLL export interface
MagickWand lib DLL import interface
MagickWand module DLL export interface
Magick++ lib DLL import
Linking...
piddle.obj : error LNK2005: _main already defined in button.obj
piddle.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: char * __thiscall std::allocator<class Magick::Coordinate>::_Charalloc(unsigned int)" (__imp_?_Charalloc@?$allocator@VCoordinate@Magick@@@std@@QAEPADI@Z)
piddle.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::allocator<class Magick::Coordinate>::deallocate(void *,unsigned int)" (__imp_?deallocate@?$allocator@VCoordinate@Magick@@@std@@QAEXPAXI@Z)
piddle.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: char * __thiscall std::allocator<class Magick::VPath>::_Charalloc(unsigned int)" (__imp_?_Charalloc@?$allocator@VVPath@Magick@@@std@@QAEPADI@Z)
piddle.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::allocator<class Magick::VPath>::deallocate(void *,unsigned int)" (__imp_?deallocate@?$allocator@VVPath@Magick@@@std@@QAEXPAXI@Z)
piddle.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: char * __thiscall std::allocator<class Magick::Drawable>::_Charalloc(unsigned int)" (__imp_?_Charalloc@?$allocator@VDrawable@Magick@@@std@@QAEPADI@Z)
piddle.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall std::allocator<class Magick::Drawable>::deallocate(void *,unsigned int)" (__imp_?deallocate@?$allocator@VDrawable@Magick@@@std@@QAEXPAXI@Z)
button.exe : fatal error LNK1120: 6 unresolved externals
Error executing link.exe.

button.exe - 8 error(s), 0 warning(s)
Please tell me what do i have to do? How do i configure it in visual studio 6. I have installed the win32 binary.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Linker configuration in Visual Studio 6

Post by magick »

You need a sane starting point. Install http://www.imagemagick.org/download/bin ... static.exe. Now move to c:/Program Files/ImageMagick-6.6.2-2-Q16/Magick++_demos (the exact location depends on your system). Click on the Button program. Build and execute. Does that work? If so, use the Button workspace as a template for your own project.
rwikee
Posts: 7
Joined: 2010-06-09T13:27:51-07:00
Authentication code: 8675308

Re: Linker configuration in Visual Studio 6

Post by rwikee »

Thanks a lot for your prompt response, But can you please check the link given in your reply. I guess its not working.
Post Reply