CMake make install fails with "error:___ was not declared in this scope"
CMake make install fails with "error:___ was not declared in this scope"
我对编程还比较陌生,运行 经过深入搜索后遇到了一个大问题,但没有找到合适的解决方案。我正在做我自己的研究项目,它依赖于某人开发的 CMake 包(源代码可以在 GitHub 上找到)。
我正在尝试使用 CMake 3.22.2 在 Windows 10 64 位上使用 MinGW32-GCC 6.3.0 编译文件。但是,每当我尝试执行“make install”命令时,我都会遇到以下错误。
[ 2%] Building CXX object CMakeFiles/tn93.dir/src/TN93.cpp.obj
[ 4%] Building CXX object CMakeFiles/tn93.dir/src/stringBuffer.cc.obj
[ 7%] Building CXX object CMakeFiles/tn93.dir/src/tn93_shared.cc.obj
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc: In function 'int readFASTA(FILE*, char&, StringBuffer&, StringBuffer&, Vector&, Vector&, long int&, bool, Vector*, char, double)':
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc:717:14: error: 'flockfile' was not declared in this scope
flockfile(F);
^
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc:722:40: error: 'getc_unlocked' was not declared in this scope
int currentC = getc_unlocked (F);
^
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc:724:29: error: 'feof_unlocked' was not declared in this scope
if (feof_unlocked (F))
^
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc:834:35: error: 'funlockfile' was not declared in this scope
funlockfile (F);
^
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc:860:33: error: 'funlockfile' was not declared in this scope
funlockfile (F);
^
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc:874:21: error: 'funlockfile' was not declared in this scope
funlockfile (F);
^
make[2]: *** [CMakeFiles\tn93.dir\build.make:106: CMakeFiles/tn93.dir/src/tn93_shared.cc.obj] Error 1
make[1]: *** [CMakeFiles\Makefile2:100: CMakeFiles/tn93.dir/all] Error 2
make: *** [Makefile:135: all] Error 2
其他信息,这是 CMake 调用:
C:\Users\MaC\Downloads\New folder\tn93> cmake -G"MinGW Makefiles"
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/MinGW/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/MaC/Downloads/New folder/tn93
这是文件树
├───CMakeFiles
│ ├───3.22.2
│ │ ├───CompilerIdC
│ │ │ └───tmp
│ │ └───CompilerIdCXX
│ │ └───tmp
│ ├───CMakeTmp
│ ├───fasta_diff.dir
│ │ └───src
│ ├───FindOpenMP
│ ├───NF.dir
│ ├───nucfreqsfasta.dir
│ │ └───src
│ ├───Progress
│ ├───readreduce.dir
│ │ └───src
│ ├───selectreads.dir
│ │ └───src
│ ├───seqcoverage.dir
│ │ └───src
│ ├───ShortestPathTN93.dir
│ │ └───src
│ ├───tn93-cluster.dir
│ │ └───src
│ ├───tn93.dir
│ │ └───src
│ ├───TN93SP.dir
│ └───validate_fasta.dir
│ └───src
├───data
└───src
如何修复此错误?
我对编程还比较陌生,运行 经过深入搜索后遇到了一个大问题,但没有找到合适的解决方案。我正在做我自己的研究项目,它依赖于某人开发的 CMake 包(源代码可以在 GitHub 上找到)。
我正在尝试使用 CMake 3.22.2 在 Windows 10 64 位上使用 MinGW32-GCC 6.3.0 编译文件。但是,每当我尝试执行“make install”命令时,我都会遇到以下错误。
[ 2%] Building CXX object CMakeFiles/tn93.dir/src/TN93.cpp.obj
[ 4%] Building CXX object CMakeFiles/tn93.dir/src/stringBuffer.cc.obj
[ 7%] Building CXX object CMakeFiles/tn93.dir/src/tn93_shared.cc.obj
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc: In function 'int readFASTA(FILE*, char&, StringBuffer&, StringBuffer&, Vector&, Vector&, long int&, bool, Vector*, char, double)':
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc:717:14: error: 'flockfile' was not declared in this scope
flockfile(F);
^
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc:722:40: error: 'getc_unlocked' was not declared in this scope
int currentC = getc_unlocked (F);
^
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc:724:29: error: 'feof_unlocked' was not declared in this scope
if (feof_unlocked (F))
^
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc:834:35: error: 'funlockfile' was not declared in this scope
funlockfile (F);
^
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc:860:33: error: 'funlockfile' was not declared in this scope
funlockfile (F);
^
C:\Users\MaC\Downloads\New folder\tn93\src\tn93_shared.cc:874:21: error: 'funlockfile' was not declared in this scope
funlockfile (F);
^
make[2]: *** [CMakeFiles\tn93.dir\build.make:106: CMakeFiles/tn93.dir/src/tn93_shared.cc.obj] Error 1
make[1]: *** [CMakeFiles\Makefile2:100: CMakeFiles/tn93.dir/all] Error 2
make: *** [Makefile:135: all] Error 2
其他信息,这是 CMake 调用:
C:\Users\MaC\Downloads\New folder\tn93> cmake -G"MinGW Makefiles"
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
-- The C compiler identification is GNU 6.3.0
-- The CXX compiler identification is GNU 6.3.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/MinGW/bin/gcc.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/MinGW/bin/g++.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
-- Could NOT find OpenMP_CXX (missing: OpenMP_CXX_FLAGS OpenMP_CXX_LIB_NAMES)
-- Could NOT find OpenMP (missing: OpenMP_C_FOUND OpenMP_CXX_FOUND)
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/MaC/Downloads/New folder/tn93
这是文件树
├───CMakeFiles
│ ├───3.22.2
│ │ ├───CompilerIdC
│ │ │ └───tmp
│ │ └───CompilerIdCXX
│ │ └───tmp
│ ├───CMakeTmp
│ ├───fasta_diff.dir
│ │ └───src
│ ├───FindOpenMP
│ ├───NF.dir
│ ├───nucfreqsfasta.dir
│ │ └───src
│ ├───Progress
│ ├───readreduce.dir
│ │ └───src
│ ├───selectreads.dir
│ │ └───src
│ ├───seqcoverage.dir
│ │ └───src
│ ├───ShortestPathTN93.dir
│ │ └───src
│ ├───tn93-cluster.dir
│ │ └───src
│ ├───tn93.dir
│ │ └───src
│ ├───TN93SP.dir
│ └───validate_fasta.dir
│ └───src
├───data
└───src
如何修复此错误?