IM and MVSE 2012/2013

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
kirash4
Posts: 34
Joined: 2010-04-12T15:30:59-07:00
Authentication code: 8675308

IM and MVSE 2012/2013

Post by kirash4 »

Does anyone have a step-by-step configuration for using Microsoft Visual Studio Express to write apps that use the Magick++ API? Note, I'm not trying to compile IM (unless I need to do that), I already downloaded and installed the Win64 dynamic IM version (and included the developer headers and all.) I'm certain there are specific options that need to be configured within MVSE so it knows where the libraries and include files are and what not. So far I've always developed on my unix server but I need/want to move to my Win64 machine for a specific windows based application and I need to be able to use Magick++.

Does such guide exist anywhere?
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: IM and MVSE 2012/2013

Post by dlemstra »

Do you want users of your application to install ImageMagick (dynamic build) or do you want to include ImageMagick in your application (static build)?
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
kirash4
Posts: 34
Joined: 2010-04-12T15:30:59-07:00
Authentication code: 8675308

Re: IM and MVSE 2012/2013

Post by kirash4 »

dlemstra wrote:Do you want users of your application to install ImageMagick (dynamic build) or do you want to include ImageMagick in your application (static build)?
Static.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: IM and MVSE 2012/2013

Post by dlemstra »

The best method would then be to download the source of ImageMagick and follow these following steps to compile it: http://www.imagemagick.org/script/insta ... hp#windows. Make sure you select static build in configure.exe.

When you are done you can add your own project to the solution. Take a look at the configure/mogrify project to see how they are configured before you remove them.
Last edited by dlemstra on 2014-04-04T08:44:24-07:00, edited 1 time in total.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
kirash4
Posts: 34
Joined: 2010-04-12T15:30:59-07:00
Authentication code: 8675308

Re: IM and MVSE 2012/2013

Post by kirash4 »

Awesome, thank you. I will be fightin-, I mean, trying that this evening/weekend.
kirash4
Posts: 34
Joined: 2010-04-12T15:30:59-07:00
Authentication code: 8675308

Re: IM and MVSE 2012/2013

Post by kirash4 »

Ok, I guess this won't work for the Visual Studio Express version. Everything I tried gave me errors. This one kept popping up:

Code: Select all

Error	1	error C1083: Cannot open include file: 'afxwin.h': No such file or directory	g:\imagemagick-6.8.8\visualmagick\configure\stdafx.h	15	1	configure
So unless I shell out a bunch of money to get the full version of Visual Studio, this is a no-go. Thanks anyway for the suggestion.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: IM and MVSE 2012/2013

Post by dlemstra »

You don't need to build the configure.exe program. You can just run the executable that comes with the source.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
kirash4
Posts: 34
Joined: 2010-04-12T15:30:59-07:00
Authentication code: 8675308

Re: IM and MVSE 2012/2013

Post by kirash4 »

dlemstra wrote:You don't need to build the configure.exe program. You can just run the executable that comes with the source.
I was simply following the directions from imagemagick.org which says to build the configure program.

However, I did find the provided exe and ran that. I changed it to a static, multi-threaded build (tried both DLL as well as the non-DLL), changed it to Q8 and enabled X11. Then started the compile ... which ran for a while with several warnings:

Code: Select all

warning MSB8012: TargetPath(G:\ImageMagick-6.8.8\VisualMagick\filters\..\lib\CORE_filters.lib) does not match the Library's OutputFile property value (G:\ImageMagick-6.8.8\VisualMagick\lib\CORE_RL_filters_.lib). This may cause your project to build incorrectly. To correct this, please make sure that $(OutDir), $(TargetName) and $(TargetExt) property values match the value specified in %(Lib.OutputFile).
And eventually it fails with a ton of unresolved symbols.

I should point out that when I first opened the project/solution, MCSE said it needed to migrate the files and it did so. The report it spits out after that looks like this for every single utility:

Code: Select all

    utilities\UTIL_animate_xt_exe.vcproj: Due to the requirement that Visual C++ projects produce an embedded (by default) Windows SxS manifest, manifest files in the project are now automatically built with the Manifest Tool. You may need to change your build in order for it to work correctly. For instance, it is recommended that the dependency information contained in any manifest files be converted to "#pragma comment(linker,"<insert dependency here>")" in a header file that is included from your source code. If your project already embeds a manifest in the RT_MANIFEST resource section through a resource (.rc) file, the line may need to be commented out before the project will build correctly.

    utilities\UTIL_animate_xt_exe.vcproj: Due to a conformance change in the C++ compiler, code change may be required before your project will build without errors. Previous versions of the C++ compiler allowed specification of member function pointers by member function name (e.g. MemberFunctionName). The C++ standard requires a fully qualified name with the use of the address-of operator (e.g. &ClassName::MemberFunctionName). If your project contains forms or controls used in the Windows Forms Designer, you may have to change code in InitializeComponent because the designer generated code used the non-conformant syntax in delegate construction (used in event handlers).

    utilities\UTIL_animate_xt_exe.vcproj: This application has been updated to include settings related to the User Account Control (UAC) feature of Windows Vista. By default, when run on Windows Vista with UAC enabled, this application is marked to run with the same privileges as the process that launched it. This marking also disables the application from running with virtualization. You can change UAC related settings from the Property Pages of the project.

    utilities\UTIL_animate_xt_exe.vcproj: MSB8012: $(TargetPath) ('G:\ImageMagick-6.8.8\VisualMagick\utilities\..\bin\UTIL_animate.exe') does not match the Librarian's OutputFile property value '..\bin\UTIL_animate.exe' ('G:\ImageMagick-6.8.8\bin\UTIL_animate.exe') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).

    utilities\UTIL_animate_xt_exe.vcproj: MSB8012: $(TargetName) ('UTIL_animate') does not match the Linker's OutputFile property value '..\bin\animate.exe' ('animate') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).

    utilities\UTIL_animate_xt_exe.vcproj: MSB8012: $(TargetPath) ('G:\ImageMagick-6.8.8\VisualMagick\utilities\..\bin\UTIL_animate.exe') does not match the Linker's OutputFile property value '..\bin\animate.exe' ('G:\ImageMagick-6.8.8\bin\animate.exe') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).

    utilities\UTIL_animate_xt_exe.vcproj: MSB8012: $(TargetPath) ('G:\ImageMagick-6.8.8\VisualMagick\utilities\..\bin\UTIL_animate.exe') does not match the Librarian's OutputFile property value '..\bin\UTIL_animate.exe' ('G:\ImageMagick-6.8.8\bin\UTIL_animate.exe') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).

    utilities\UTIL_animate_xt_exe.vcproj: MSB8012: $(TargetName) ('UTIL_animate') does not match the Linker's OutputFile property value '..\bin\animate.exe' ('animate') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Link.OutputFile).

    utilities\UTIL_animate_xt_exe.vcproj: MSB8012: $(TargetPath) ('G:\ImageMagick-6.8.8\VisualMagick\utilities\..\bin\UTIL_animate.exe') does not match the Linker's OutputFile property value '..\bin\animate.exe' ('G:\ImageMagick-6.8.8\bin\animate.exe') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).

    utilities\UTIL_animate_xt_exe.vcproj: Converting project file 'G:\ImageMagick-6.8.8\VisualMagick\utilities\UTIL_animate_xt_exe.vcproj'.

    utilities\UTIL_animate_xt_exe.vcproj: Visual C++ now provides improved safety in its C and C++ Libraries. This includes new and improved functions, additional checking and validation, and internal design changes. These libraries are turned on by default. You may see some warnings about unsafe functions or parameters when you build your project. The warnings will generally suggest an alternative safer coding style or function. It is advised that you correct these warnings, in order to make your code more safe. Full details can be found in the documentation by searching for 'Security Enhancements in the CRT' and for 'Checked Iterators'.

    utilities\UTIL_animate_xt_exe.vcproj: The C/C++ compiler default settings have been modified to be more compliant with ISO Standard C++. Included in those changes are enforcing Standard C++ for loop scoping and supporting wchar_t as a native type. These changes may cause existing code to no longer compile without changes to the code or the compiler options with which it is built.

    utilities\UTIL_animate_xt_exe.vcproj: Done converting to new project file 'G:\ImageMagick-6.8.8\VisualMagick\utilities\UTIL_animate_xt_exe.vcxproj'.
And for the lib files, it's even longer:

Code: Select all

    bzlib\CORE_bzlib_xt_lib.vcproj: Due to the requirement that Visual C++ projects produce an embedded (by default) Windows SxS manifest, manifest files in the project are now automatically built with the Manifest Tool. You may need to change your build in order for it to work correctly. For instance, it is recommended that the dependency information contained in any manifest files be converted to "#pragma comment(linker,"<insert dependency here>")" in a header file that is included from your source code. If your project already embeds a manifest in the RT_MANIFEST resource section through a resource (.rc) file, the line may need to be commented out before the project will build correctly.

    bzlib\CORE_bzlib_xt_lib.vcproj: Due to a conformance change in the C++ compiler, code change may be required before your project will build without errors. Previous versions of the C++ compiler allowed specification of member function pointers by member function name (e.g. MemberFunctionName). The C++ standard requires a fully qualified name with the use of the address-of operator (e.g. &ClassName::MemberFunctionName). If your project contains forms or controls used in the Windows Forms Designer, you may have to change code in InitializeComponent because the designer generated code used the non-conformant syntax in delegate construction (used in event handlers).

    bzlib\CORE_bzlib_xt_lib.vcproj: This application has been updated to include settings related to the User Account Control (UAC) feature of Windows Vista. By default, when run on Windows Vista with UAC enabled, this application is marked to run with the same privileges as the process that launched it. This marking also disables the application from running with virtualization. You can change UAC related settings from the Property Pages of the project.

    bzlib\CORE_bzlib_xt_lib.vcproj: VCConvertEngine could not convert attribute LinkIncremental = 1 under Tool VCLibrarianTool.

    bzlib\CORE_bzlib_xt_lib.vcproj: VCConvertEngine could not convert attribute TargetMachine = 1 under Tool VCLibrarianTool.

    bzlib\CORE_bzlib_xt_lib.vcproj: VCConvertEngine could not convert attribute SubSystem = 2 under Tool VCLibrarianTool.

    bzlib\CORE_bzlib_xt_lib.vcproj: VCConvertEngine could not convert attribute LinkIncremental = 1 under Tool VCLibrarianTool.

    bzlib\CORE_bzlib_xt_lib.vcproj: VCConvertEngine could not convert attribute TargetMachine = 1 under Tool VCLibrarianTool.

    bzlib\CORE_bzlib_xt_lib.vcproj: VCConvertEngine could not convert attribute SubSystem = 2 under Tool VCLibrarianTool.

    bzlib\CORE_bzlib_xt_lib.vcproj: MSB8012: $(TargetName) ('CORE_bzlib') does not match the Librarian's OutputFile property value '..\lib\CORE_RL_bzlib_.lib' ('CORE_RL_bzlib_') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Lib.OutputFile).

    bzlib\CORE_bzlib_xt_lib.vcproj: MSB8012: $(TargetPath) ('G:\ImageMagick-6.8.8\VisualMagick\bzlib\..\lib\CORE_bzlib.lib') does not match the Librarian's OutputFile property value '..\lib\CORE_RL_bzlib_.lib' ('G:\ImageMagick-6.8.8\lib\CORE_RL_bzlib_.lib') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).

    bzlib\CORE_bzlib_xt_lib.vcproj: MSB8012: $(TargetPath) ('G:\ImageMagick-6.8.8\VisualMagick\bzlib\..\lib\CORE_bzlib.lib') does not match the Linker's OutputFile property value '..\lib\CORE_bzlib.lib' ('G:\ImageMagick-6.8.8\lib\CORE_bzlib.lib') in project configuration 'Release|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).

    bzlib\CORE_bzlib_xt_lib.vcproj: MSB8012: $(TargetName) ('CORE_bzlib') does not match the Librarian's OutputFile property value '..\lib\CORE_DB_bzlib_.lib' ('CORE_DB_bzlib_') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetName) property value matches the value specified in %(Lib.OutputFile).

    bzlib\CORE_bzlib_xt_lib.vcproj: MSB8012: $(TargetPath) ('G:\ImageMagick-6.8.8\VisualMagick\bzlib\..\lib\CORE_bzlib.lib') does not match the Librarian's OutputFile property value '..\lib\CORE_DB_bzlib_.lib' ('G:\ImageMagick-6.8.8\lib\CORE_DB_bzlib_.lib') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Lib.OutputFile).

    bzlib\CORE_bzlib_xt_lib.vcproj: MSB8012: $(TargetPath) ('G:\ImageMagick-6.8.8\VisualMagick\bzlib\..\lib\CORE_bzlib.lib') does not match the Linker's OutputFile property value '..\lib\CORE_bzlib.lib' ('G:\ImageMagick-6.8.8\lib\CORE_bzlib.lib') in project configuration 'Debug|Win32'. This may cause your project to build incorrectly. To correct this, please make sure that $(TargetPath) property value matches the value specified in %(Link.OutputFile).

    bzlib\CORE_bzlib_xt_lib.vcproj: Converting project file 'G:\ImageMagick-6.8.8\VisualMagick\bzlib\CORE_bzlib_xt_lib.vcproj'.

    bzlib\CORE_bzlib_xt_lib.vcproj: Visual C++ now provides improved safety in its C and C++ Libraries. This includes new and improved functions, additional checking and validation, and internal design changes. These libraries are turned on by default. You may see some warnings about unsafe functions or parameters when you build your project. The warnings will generally suggest an alternative safer coding style or function. It is advised that you correct these warnings, in order to make your code more safe. Full details can be found in the documentation by searching for 'Security Enhancements in the CRT' and for 'Checked Iterators'.

    bzlib\CORE_bzlib_xt_lib.vcproj: The C/C++ compiler default settings have been modified to be more compliant with ISO Standard C++. Included in those changes are enforcing Standard C++ for loop scoping and supporting wchar_t as a native type. These changes may cause existing code to no longer compile without changes to the code or the compiler options with which it is built.

    bzlib\CORE_bzlib_xt_lib.vcproj: Done converting to new project file 'G:\ImageMagick-6.8.8\VisualMagick\bzlib\CORE_bzlib_xt_lib.vcxproj'.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: IM and MVSE 2012/2013

Post by dlemstra »

We should probably update that page to let you know that step is optional. We also recently added a batch file called 'UpgradeToVS2012.cmd' that will help you to get rid of the warnings. This should also be added to that page. Run that batch file after you have executed the configure.exe program. Can you post some of the link errors you are getting after this?

p.s. thank you for posting them inside a code block :)
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
kirash4
Posts: 34
Joined: 2010-04-12T15:30:59-07:00
Authentication code: 8675308

Re: IM and MVSE 2012/2013

Post by kirash4 »

UPDATE: I ran UpgradeToVS2012.cmd as administrator and this is what I got:

Code: Select all

.\build\UpgradeSolution.ps1 : The term '.\build\UpgradeSolution.ps1' is not
recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:1 char:1
+ .\build\UpgradeSolution.ps1 2012
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (.\build\UpgradeSolution.ps1:Str
   ing) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Press any key to continue . . .
Funny thing is, the .\build\UpgradeSolution.ps1 file does exist.

------

Running the UpgradeToVS2012.cmd tells me I need PowerShell installed ... which I have. I verified the registry key, it's there. I verified I have the latest version by (re)downloading from MS and all is well. So I'm not sure why it's failing. Any ideas?
kirash4
Posts: 34
Joined: 2010-04-12T15:30:59-07:00
Authentication code: 8675308

Re: IM and MVSE 2012/2013

Post by kirash4 »

If this helps, this is what I've done so far:

Code: Select all

- Unzipped the source files on my G:\ drive
- entered G:\ImageMagick-6.8.8\VisualMagick\configure
- ran configure.exe
  changed the setting to 'Static Multi-threaded DLL runtimes'
  changed Quantum depth to Q8
  enabled X11 Support
- Hit Next twice to exit the configure window
- changed to G:\ImageMagick-6.8.8\VisualMagick
- ran UpgradeToVS2012.cmd as administrator
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: IM and MVSE 2012/2013

Post by dlemstra »

Why would you want to enable X11 support? And would you mind sharing the linker errors?

I also have no clue why powershell is giving you that error. Have you tried running the powershell command that is in the 'UpgradeToVS2012.cmd' file from a command prompt.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
kirash4
Posts: 34
Joined: 2010-04-12T15:30:59-07:00
Authentication code: 8675308

Re: IM and MVSE 2012/2013

Post by kirash4 »

dlemstra wrote:Why would you want to enable X11 support? And would you mind sharing the linker errors?

I also have no clue why powershell is giving you that error. Have you tried running the powershell command that is in the 'UpgradeToVS2012.cmd' file from a command prompt.
I have no answer on the X11 Support other than without them, animate, import, and display won't work. I suppose I don't need to build those since all I really care for is having the necessary files required so I can build my applications with IM support and if i need those other three programs I could always install a binary version of IM (assuming it won't conflict with the compiled one.)

When I try to run the command that's inside (inside of an Administrator powershell window), that too gives me errors:

Code: Select all

PS G:\ImageMagick-6.8.8\VisualMagick> powershell -ExecutionPolicy Unrestricted .\build\UpgradeSolution.ps1
Upgrading solution: .\VisualDynamicMT.sln
devenv : The term 'devenv' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At G:\ImageMagick-6.8.8\VisualMagick\build\UpgradeSolution.ps1:144 char:3
+   devenv /upgrade $fileName
+   ~~~~~~
    + CategoryInfo          : ObjectNotFound: (devenv:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

CheckExitCode : Upgrade failed.
At G:\ImageMagick-6.8.8\VisualMagick\build\UpgradeSolution.ps1:145 char:3
+   CheckExitCode "Upgrade failed."
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
    + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,CheckExitCode
As for the linking errors, remember those appear when I was I attempting to compile everything without first running the UpgradeToVS2012.cmd file. So when I do that, after all of the errors posted in my previous post, this is the long list of errors:

Code: Select all

Error	66	error LNK2019: unresolved external symbol _XLoadQueryFont referenced in function _XBestFont	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_conjure
Error	67	error LNK2019: unresolved external symbol _XLoadQueryFont referenced in function _XBestFont	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_stream
Error	68	error LNK2019: unresolved external symbol _XLoadQueryFont referenced in function _XBestFont	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_display
Error	69	error LNK2001: unresolved external symbol _XLoadQueryFont	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(widget.obj)	UTIL_display
Error	70	error LNK2001: unresolved external symbol _XLoadQueryFont	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(display.obj)	UTIL_display
Error	71	error LNK2019: unresolved external symbol _XCreateImage referenced in function _XMakeImage	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_display
Error	72	error LNK2019: unresolved external symbol _XGetImage referenced in function _XAnnotateImage	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_display
Error	73	error LNK2019: unresolved external symbol _XOpenDisplay referenced in function _XImportImage	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_display
Error	74	error LNK2019: unresolved external symbol _XLoadQueryFont referenced in function _XBestFont	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	75	error LNK2001: unresolved external symbol _XLoadQueryFont	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(widget.obj)	UTIL_convert
Error	76	error LNK2001: unresolved external symbol _XLoadQueryFont	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(display.obj)	UTIL_convert
Error	77	error LNK2019: unresolved external symbol _XCreateImage referenced in function _XMakeImage	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	78	error LNK2019: unresolved external symbol _XGetImage referenced in function _XAnnotateImage	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	79	error LNK2019: unresolved external symbol _XOpenDisplay referenced in function _XImportImage	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	80	error LNK2001: unresolved external symbol _XOpenDisplay	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(animate.obj)	UTIL_convert
Error	81	error LNK2001: unresolved external symbol _XOpenDisplay	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(display.obj)	UTIL_convert
Error	82	error LNK2019: unresolved external symbol _XrmInitialize referenced in function _XGetResourceDatabase	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	83	error LNK2019: unresolved external symbol _XGetDefault referenced in function _XGetResourceDatabase	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	84	error LNK2019: unresolved external symbol _XDisplayName referenced in function _XImportImage	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	85	error LNK2001: unresolved external symbol _XDisplayName	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(animate.obj)	UTIL_convert
Error	86	error LNK2001: unresolved external symbol _XDisplayName	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(display.obj)	UTIL_convert
Error	87	error LNK2019: unresolved external symbol _XSynchronize referenced in function _XInitializeWindows	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	88	error LNK2019: unresolved external symbol _XInternAtom referenced in function _XBestVisualInfo	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	89	error LNK2001: unresolved external symbol _XInternAtom	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(animate.obj)	UTIL_convert
Error	90	error LNK2001: unresolved external symbol _XInternAtom	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(display.obj)	UTIL_convert
Error	91	error LNK2019: unresolved external symbol _XCopyColormapAndFree referenced in function _XMakeStandardColormap	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	92	error LNK2019: unresolved external symbol _XCreateColormap referenced in function _XMakeStandardColormap	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	93	error LNK2019: unresolved external symbol _XCreatePixmapCursor referenced in function _XMakeCursor	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	94	error LNK2019: unresolved external symbol _XCreateFontCursor referenced in function _XGetWindowInfo	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
Error	95	error LNK2001: unresolved external symbol _XCreateFontCursor	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(widget.obj)	UTIL_convert
Error	96	error LNK2001: unresolved external symbol _XCreateFontCursor	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(display.obj)	UTIL_convert
Error	97	error LNK2019: unresolved external symbol _XCreateGC referenced in function _XAnnotateImage	G:\ImageMagick-6.8.8\VisualMagick\utilities\CORE_RL_magick_.lib(xwindow.obj)	UTIL_convert
It suddenly dawned on me that those are X11 related symbols, at least they're similar to the ones I get on my unix server when I forget to include X11 headers. So I went back and disabled X11 Support and tried again. Lo and behold, it compiled without any errors. Great. Remember this is all still done without having run the UpgradeToVS2012.cmd file!

Now, next step. How do I include it in my own code so I can compile with IM support?

By the way, thanks for all your guidance with this.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: IM and MVSE 2012/2013

Post by dlemstra »

The upgrade from the really old version of VisualStudio that is created by configure.exe does not perfectly upgrade to the newer version. The powershell script is only there to get rid of the warnings from VisualStudio. It is an optional step.

Are you building an x64 version of ImageMagick? We don't ship an x64 version of the x11.lib library and that would explain the link errors.

Now you can right click your solution and add a new C++ project. I am not sure what kind of project you want so you will have to decide the type yourself. You should then set the 'Additional Include Directories' to the include folder of Magick++. And set 'Additional Library Directories' to the lib folder of VisualMagick.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
kirash4
Posts: 34
Joined: 2010-04-12T15:30:59-07:00
Authentication code: 8675308

Re: IM and MVSE 2012/2013

Post by kirash4 »

No, I didn't select 64-bit during the configure step. But I am building on a 64-bit machine. Maybe that has something to do with it.

Anyway, as for what kind of project I'm building. Basically I want to develop a stand along application that allows a user to import an image, manipulate it (with IM), and save a binary file back to disk. Basically this is for a POV design I'm working on. Right now, I have unix built command line utilities that I wrote to do what I need, read in a file, read each pixel color, and spit the values out as bytes into a file. On the POV hardware, that binary file is then read in as a stream and flashed on a string of LEDs. That process is what I want to built for a Win32 platform so that people who have this POV device can upload their own images.

So that's why this whole process of getting IM to work with MVSE so I can start developing in that.
Post Reply