Code::Blocks で Magick++ を使用しようとしています (どちらも最新バージョンです)。私はwin7 x64を使用しており、ImageMagick x86とx64の両方を動的にインストールしました(DLLを使用)。
デモ C++ ファイル (以下のコードなど) を実行しようとするたびに、同じメッセージが表示されます。
\ImageMagick-6.8.6-Q16\include\" -c C:\Users\ad\Desktop\C++\Magick++\test\main.cpp -o obj\Debug\main.o
mingw32-g++.exe: fatal error: no input files
compilation terminated.
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings (0 minutes, 0 seconds)
誰もこれを経験したことがありますか?それを機能させるのを手伝ってもらえますか?
.jpg
プロジェクトと同じフォルダに「wall.jpg」というファイルを置きます。
ありがとう
magick++demo
フォルダーのソース コード
#include <Magick++.h>
#include <iostream>
using namespace std;
using namespace Magick;
int main(int argc,char **argv)
{
InitializeMagick(*argv);
// Construct the image object. Seperating image construction from the
// the read operation ensures that a failure to read the image file
// doesn't render the image object useless.
Image image;
try {
// Read a file into image object
image.read( "wall.jpg" );
// Crop the image to specified size (width, height, xOffset, yOffset)
image.crop( Geometry(100,100, 100, 100) );
// Write the image to a file
image.write( "x.gif" );
}
catch( Exception &error_ )
{
cout << "Caught exception: " << error_.what() << endl;
return 1;
}
return 0;
}