Windows7でmingwを使用してopenexrをコンパイルしようとしています。私はこのエラーを取得しています:
main.cpp: In function 'int main(int, char**)':
main.cpp:213:28: error: 'strcmp' was not declared in this scope
make[1]: *** [main.o] Error 1
make[1]: Leaving directory `/d/openexr/build/openexr-1.6.1/exrmaketiled'
make: *** [all-recursive] Error 1
なぜこのエラーが発生するのですか?どうすればそれをスラブできますか?
私はmingwとopenexrに慣れていないので、何かばかげたことをしたかもしれません!
edit1:
私はそれを作るためにこのスクリプトを使用しています:
!/bin/sh
# modified synfig build file, taken from
# http://www.synfig.org/Windows_build_instructions
echo "Making OpenEXR..."
# Including configuration
if [ -r "./make_openexr.conf" ]; then
. ./make_openexr.conf
else
echo "No config file (./make_openexr.conf) found."
exit 1
fi
CURRENT_DIR=`pwd`
echo "Cleanup directories"
rm -rf ${BUILD_DIR}/zlib-${ZLIB_VERSION}
[ $? -eq 0 ] || exit 1
rm -rf ${BUILD_DIR}/ilmbase-${ILMBASE_VERSION}
[ $? -eq 0 ] || exit 1
rm -rf ${BUILD_DIR}/openexr-${OPENEXR_VERSION}
[ $? -eq 0 ] || exit 1
echo "Preparing sources"
echo PATH is $PATH
echo tar -xzf ${ZLIB_SRC} -C ${BUILD_DIR}
tar -xzf ${ZLIB_SRC} -C ${BUILD_DIR}
[ $? -eq 0 ] || exit 1
echo tar -xzf ${ILMBASE_SRC} -C ${BUILD_DIR}
tar -xzf ${ILMBASE_SRC} -C ${BUILD_DIR}
[ $? -eq 0 ] || exit 1
echo tar -xzf ${OPENEXR_SRC} -C ${BUILD_DIR}
tar -xzf ${OPENEXR_SRC} -C ${BUILD_DIR}
[ $? -eq 0 ] || exit 1
echo "Configuring zlib"
cd ${BUILD_DIR}/zlib-${ZLIB_VERSION}
[ $? -eq 0 ] || exit 1
./configure --prefix=${TEMP_INSTALL}
[ $? -eq 0 ] || exit 1
echo "Making"
make
[ $? -eq 0 ] || exit 1
make install
[ $? -eq 0 ] || exit 1
echo "zlib Done"
echo "Applying patches for ILMBase... "
cd ${BUILD_DIR}/ilmbase-${ILMBASE_VERSION}
[ $? -eq 0 ] || exit 1
for SFILE in ${ILMBASE_PATCHES[@]}
do
patch -p1 <${PATCHES_DIR}/${SFILE}
[ $? -eq 0 ] || exit 1
done
echo "Configuring ILMbase"
[ $? -eq 0 ] || exit 1
./configure --host=${MINGW_HOST} --prefix=${TEMP_INSTALL} \
--disable-static --disable-threading --disable-posix-sem
[ $? -eq 0 ] || exit 1
echo "Making"
make
[ $? -eq 0 ] || exit 1
make install
[ $? -eq 0 ] || exit 1
echo "ILMBase Done"
echo "Applying patches for OpenEXR... "
cd ${BUILD_DIR}/openexr-${OPENEXR_VERSION}
[ $? -eq 0 ] || exit 1
for SFILE in ${OPENEXR_PATCHES[@]}
do
patch -p1 <${PATCHES_DIR}/${SFILE}
[ $? -eq 0 ] || exit 1
done
# Now the temp/openexr dir exists, we can add it to paths
if [ -d "${TEMP_INSTALL}" ]; then
PATH="${TEMP_INSTALL}/bin:${PATH}"
PKG_CONFIG_PATH="${TEMP_INSTALL}/lib/pkgconfig:${PKG_CONFIG_PATH}"
fi
# set inc/lib path (for zlib)
CXXFLAGS+=" -I${TEMP_INSTALL}/include"
LDFLAGS+=" -L${TEMP_INSTALL}/lib"
export PATH
export PKG_CONFIG_PATH
export CXXFLAGS
export LDFLAGS
echo "Configuring OpenEXR"
[ $? -eq 0 ] || exit 1
./configure --host=${MINGW_HOST} --prefix=${TEMP_INSTALL} \
--disable-static --disable-threading --disable-posix-sem --disable-ilmbasetest
[ $? -eq 0 ] || exit 1
echo "separately build b44ExpLogTable as the openexr script doesn't work under msys"
cd ${BUILD_DIR}/openexr-${OPENEXR_VERSION}/IlmImf
[ $? -eq 0 ] || exit 1
mingw32-g++ --verbose -g -O2 -I${TEMP_INSTALL}/include/OpenEXR -L${TEMP_INSTALL}/lib b44ExpLogTable.cpp -lHalf -o b44ExpLogTable
[ $? -eq 0 ] || exit 1
cd ..
[ $? -eq 0 ] || exit 1
echo "Making"
make
[ $? -eq 0 ] || exit 1
make install
[ $? -eq 0 ] || exit 1
cd ${CURRENT_DIR}
[ $? -eq 0 ] || exit 1
# rm -rf ${BUILD_DIR}/openexr-${OPENEXR_VERSION}
# [ $? -eq 0 ] || exit 1
echo "Done: OpenEXR"
私はmingwのセットアップを信じていますが、mysysが正しくなく、システムがインクルード(およびライブラリパス)を見つけることができません。どうすればこれを確認できますか?