如何解决 fopen64、freopen64、tmpfile64 not declared 错误?
how to solve fopen64, freopen64, tmpfile64 not declared errors?
我已经编译 DCMTK 源代码以生成库(针对 android 平台)并将这些库添加到我的 QT 项目中。在构建我的 qt 项目时,我遇到了这些错误:
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:310: error: '::fopen64' has not been declared
file_ = :: fopen64(filename, modes);
^
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:425: error: '::freopen64' has not been declared
file_ = :: freopen64(filename, modes, file_);
^
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:444: error: '::tmpfile64' has not been declared
file_ = :: tmpfile64();
^
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:790: error: '::fseeko64' has not been declared
result = :: fseeko64(file_, off, whence);
^
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:823: error: '::ftello64' has not been declared
result = :: ftello64(file_);
^
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:847: error: '::fgetpos64' has not been declared
result = :: fgetpos64(file_, pos);
^
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:867: error: '::fsetpos64' has not been declared
result = :: fsetpos64(file_, pos);
我该如何解决这个问题?
解决了这个问题。
问题是我使用的库是在调试中编译的,所以解决方案是在创建库时我应该使用发布而不是调试,然后将这些库添加到项目中,这样就不会发生这样的错误。
我已经编译 DCMTK 源代码以生成库(针对 android 平台)并将这些库添加到我的 QT 项目中。在构建我的 qt 项目时,我遇到了这些错误:
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:310: error: '::fopen64' has not been declared
file_ = :: fopen64(filename, modes);
^
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:425: error: '::freopen64' has not been declared
file_ = :: freopen64(filename, modes, file_);
^
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:444: error: '::tmpfile64' has not been declared
file_ = :: tmpfile64();
^
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:790: error: '::fseeko64' has not been declared
result = :: fseeko64(file_, off, whence);
^
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:823: error: '::ftello64' has not been declared
result = :: ftello64(file_);
^
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:847: error: '::fgetpos64' has not been declared
result = :: fgetpos64(file_, pos);
^
C:\Ashish\QTPROJECT\test\include\dcmtk\ofstd\offile.h:867: error: '::fsetpos64' has not been declared
result = :: fsetpos64(file_, pos);
我该如何解决这个问题?
解决了这个问题。 问题是我使用的库是在调试中编译的,所以解决方案是在创建库时我应该使用发布而不是调试,然后将这些库添加到项目中,这样就不会发生这样的错误。