Page 1 of 1

Linker configuration in Visual Studio 6

Posted: 2010-06-10T11:10:36-07:00
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.

Re: Linker configuration in Visual Studio 6

Posted: 2010-06-10T11:28:52-07:00
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.

Re: Linker configuration in Visual Studio 6

Posted: 2010-06-10T13:14:39-07:00
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.