FeiGeChuanShu / GFPGAN-ncnn

a naive NCNN implementation of GFPGAN aims at developing Practical Algorithms for Real-world Face Restoration
74 stars 16 forks source link

undefined reference to `ncnn::Mat::reshape(int, int, int, ncnn::Allocator*) const' #4

Open magicse opened 2 years ago

magicse commented 2 years ago

Comiler Mingw-w64 here log with errors

[100%] Linking CXX executable Z:\AI_SDK\CPP_GFPGAN\GFPGAN-ncnn-main\ncnn_gfpgan. exe "C:\Program Files\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\ncnn_gfpg an.dir\link.txt --verbose=1 "C:\Program Files\CMake\bin\cmake.exe" -E rm -f CMakeFiles\ncnn_gfpgan.dir/objec ts.a C:\mingw64\bin\ar.exe qc CMakeFiles\ncnn_gfpgan.dir/objects.a @CMakeFiles\ncnn_g fpgan.dir\objects1.rsp C:\mingw64\bin\x86_64-w64-mingw32-g++.exe -std=c++11 -pie -fPIE -fPIC -Wall -O3 -fopenmp -O3 -DNDEBUG -Wl,--whole-archive CMakeFiles\ncnn_gfpgan.dir/objects.a -Wl,--no-whole-archive -o Z:\AI_SDK\CPP_GFPGAN\GFPGAN-ncnn-main\ncnn_gfpgan.exe -Wl,--out-implib,Z:\AI_SDK\CPP_GFPGAN\GFPGAN-ncnn-main\libncnn_gfpgan.dll.a -Wl, --major-image-version,0,--minor-image-version,0 @CMakeFiles\ncnn_gfpgan.dir\link libs.rsp C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw 32/bin/ld.exe: CMakeFiles\ncnn_gfpgan.dir/objects.a(gfpgan.cpp.obj):gfpgan.cpp:( .text+0x13e): undefined reference to ncnn::Net::Net()' C:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.1.0/../../../../x86_64-w64-mingw 32/bin/ld.exe: CMakeFiles\ncnn_gfpgan.dir/objects.a(gfpgan.cpp.obj):gfpgan.cpp:( .text+0xcc0): undefined reference toncnn::Mat::reshape(int, int, int, ncnn::Allocator*) const'

magicse commented 2 years ago

When NCNN compiled without openMP and Pthreads support, all good working