このページのdcraw.cをBorland C++ Compiler 5.5でコンパイルしようとすると非常に多くのエラーがでてしまいます。
使用したコマンドは以下の通りです。
bcc32 dcraw.c
どうすればコンパイルできるでしょうか。
http://www.cybercom.net/~dcoffin/dcraw/index.html
Decoding raw digital photos in Linux
いや~きたないソースコードですね。
一応コンパイルしてみました。
①一番最初の行に以下を追加します。
#define NO_JPEG
#define WIN32
②#include <sys/utime.h>
この行はコメントにしてください。
③以下のメークファイルを実行してください。
#
# Borland C++ IDE generated makefile
# Generated 2005/08/27 at 18:26:59
#
.AUTODEPEND
#
# Borland C++ tools
#
IMPLIB = Implib
BCC32 = Bcc32 +BccW32.cfg
BCC32I = Bcc32i +BccW32.cfg
TLINK32 = TLink32
ILINK32 = Ilink32
TLIB = TLib
BRC32 = Brc32
TASM32 = Tasm32
#
# IDE macros
#
#
# Options
#
IDE_LinkFLAGS32 = -LC:¥BC5¥LIB
LinkerLocalOptsAtC32_dcrawdexe = -Tpe -ap -c
ResLocalOptsAtC32_dcrawdexe =
BLocalOptsAtC32_dcrawdexe =
CompInheritOptsAt_dcrawdexe = -IC:¥BC5¥INCLUDE
LinkerInheritOptsAt_dcrawdexe = -x
LinkerOptsAt_dcrawdexe = $(LinkerLocalOptsAtC32_dcrawdexe)
ResOptsAt_dcrawdexe = $(ResLocalOptsAtC32_dcrawdexe)
BOptsAt_dcrawdexe = $(BLocalOptsAtC32_dcrawdexe)
#
# Dependency List
#
Dep_dcraw = ¥
dcraw.exe
dcraw : BccW32.cfg $(Dep_dcraw)
echo MakeNode
Dep_dcrawdexe = ¥
dcraw.obj
dcraw.exe : $(Dep_dcrawdexe)
$(ILINK32) @&&|
/v $(IDE_LinkFLAGS32) $(LinkerOptsAt_dcrawdexe) $(LinkerInheritOptsAt_dcrawdexe) +
C:¥BC5¥LIB¥c0x32.obj+
dcraw.obj
$<,$*
C:¥BC5¥LIB¥import32.lib+
C:¥BC5¥LIB¥cw32.lib
|
dcraw.obj : dcraw.c
$(BCC32) -P- -c @&&|
$(CompOptsAt_dcrawdexe) $(CompInheritOptsAt_dcrawdexe) -o$@ dcraw.c
|
# Compiler configuration file
# 以下を変更した場合、 make -B を実行してください
BccW32.cfg :
Copy &&|
-w
-R
-v
-WM-
-vi
-H
-H=dcraw.csm
-WC
-w-
-j25
| $@
http://www.hatena.ne.jp/1125131935
人力検索はてな - http://www.cybercom.net/~dcoffin/dcraw/index.html このページのdcraw.cをBorland C++ Compiler 5.5でコンパイルしようとすると非常に多くのエラーがでてしまいます。 使..
あ~、、とりあえず…、
51行目の”Sys/utime.h”を”utime.h”にして(”Sys/”を取った。)、
「bcc32 -DNO_JPEG -DWIN32 -g0 dcraw.c」ってやったら、とりあえずはコンパイル出来ました…。
けど、ものすごい強引かも…。
動くのかな…?(汗)
JPEG使用の場合は、おそらく、
Independent JPEG Group
これ使えばいいんだと思います。
…、かなり適当ですみません。
けど一応コンパイルできたんで…。^^;
できました。
なんかよく分かりませんが、プロトタイプ宣言が無いという警告がやたら出てきたんですが、実行ファイルはできていました。
あとよく分からなかったんですが、JPEG使用の場合というのはどういうことでしょうか?
Yahoo! JAPAN
先にお答えしたgoldmanです。
それでは,以下に実行結果を示しますのでご確認ください。
C:¥BC5¥BC55¥SRC>C:¥BC5¥BC55¥Bin¥bcc32.exe -w- -IC:¥BC5¥BC55¥Include -LC:¥BC5¥BC
5¥Lib C:¥BC5¥BC55¥SRC¥dcraw.c
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
C:¥BC5¥BC55¥SRC¥dcraw.c:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
C:¥BC5¥BC55¥SRC>dir *.exe
2005/08/27 23:14 160,768 dcraw.exe
1 個のファイル 160,768 バイト
どうしても同様のエラーが出てしまってうまくいきませんでした。
今度、Makeについてしっかり勉強したいと思います。
指示通りやったつもりですが、makeを実行するところでエラーがでてしまいます。
①、②を実施。
③実行コマンド make -f Makefile
Makefile内容
#
# Borland C++ IDE generated makefile
# Generated 2005/08/27 at 18:26:59
#
.AUTODEPEND
から
-j25
| $@
まで
エラー内容
C:¥Documents and Settings¥ryo>make -f Makefile
MAKE Version 5.2 Copyright (c) 1987, 2000 Borland
Error Makefile 45: Command syntax error
Error Makefile 51: Command syntax error
Error Makefile 52: Command syntax error
Error Makefile 53: Command syntax error
Error Makefile 54: Command syntax error
Error Makefile 55: No match found for wildcard ’$<,$*’
Error Makefile 55: Command syntax error
Error Makefile 56: Command syntax error
Error Makefile 57: Command syntax error
Error Makefile 61: Command syntax error
Error Makefile 63: Command syntax error
Error Makefile 65: Command syntax error
Error Makefile 70: Command syntax error
Error Makefile 71: Command syntax error
Error Makefile 72: Command syntax error
Error Makefile 73: Command syntax error
Error Makefile 74: Command syntax error
Error Makefile 75: Command syntax error
Error Makefile 76: Command syntax error
Error Makefile 78: Command syntax error
Error Makefile 79: Command syntax error
Error Makefile 80: Command syntax error
Error Makefile 81: Command syntax error
*** 23 errors during make ***
何分初心者なもので、よろしくお願いします。