Code Monkey home page Code Monkey logo

Comments (2)

sxj731533730 avatar sxj731533730 commented on May 26, 2024

cd protobuf-3.4.0\protobuf-3.4.0
F:\protobuf-3.4.0\protobuf-3.4.0\buildMinGW>cmake -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%cd%/install -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_MSVC_STATIC_RUNTIME=OFF ../cmake
F:\protobuf-3.4.0\protobuf-3.4.0\buildMinGW>mingw32-make
F:\protobuf-3.4.0\protobuf-3.4.0\buildMinGW>mingw32-make install
-------------------------------------可以不用opencv,如果使用opencv也需要mingw编译---------------------------------------------------------------
F:>cd ncnn

F:\ncnn>mkdir build

F:\ncnn>cd build

F:\ncnn\build>cmake -G"MinGW Makefiles" -DOpenCV_DIR="D:\Opencv440\buildMinGW\install" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%cd%/install -DProtobuf_INCLUDE_DIR=D:/protobuf-3.4.0/buildMinGW/install/include -DProtobuf_LIBRARIES=D:/protobuf-3.4.0/buildMinGW/install/lib/libprotobuf.a -D Protobuf_PROTOC_EXECUTABLE=D:/protobuf-3.4.0/buildMinGW/install/bin/protoc.exe -D NCNN_VULKAN=OFF -DNCNN_AVX2=OFF -DNCNN_SSE2=OFF ..
F:\ncnn\build>mingw32-make install

from ncnn.

HHscut avatar HHscut commented on May 26, 2024

I try to comment the following code in cpu.cpp (line 190-215) and it works. Though I don't understand why it works.

// static LONG CALLBACK catch_sigill(struct _EXCEPTION_POINTERS* ExceptionInfo)
// {
//     if (ExceptionInfo->ExceptionRecord->ExceptionCode == EXCEPTION_ILLEGAL_INSTRUCTION)
//     {
//         g_sigill_caught = 1;
//         longjmp(g_jmpbuf, -1);
//     }

//     return EXCEPTION_CONTINUE_SEARCH;
// }

// static int detectisa(const void* some_inst)
// {
//     g_sigill_caught = 0;

//     PVOID eh = AddVectoredExceptionHandler(1, catch_sigill);

//     if (setjmp(g_jmpbuf) == 0)
//     {
//         ((void (*)())some_inst)();
//     }

//     RemoveVectoredExceptionHandler(eh);

//     return g_sigill_caught ? 0 : 1;
// }
cmake -G"MinGW Makefiles" -DOpenCV_DIR="D:\opencv\mingw_build\installl" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/install -DProtobuf_INCLUDE_DIR=D:/ncnn20240127/protobuf/mingw_build/install/include -DProtobuf_LIBRARIES=D:/ncnn20240127/protobuf/mingw_build/install/lib/libprotobuf.a -D Protobuf_PROTOC_EXECUTABLE=D:/ncnn20240127/protobuf/mingw_build/install/bin/protoc.exe -D NCNN_VULKAN=OFF -DNCNN_AVX2=OFF -DNCNN_SSE2=OFF -DNCNN_OPENMP=OFF .. 

from ncnn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.