This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DLP ALC LIGHTCRAFTER SDK Compilation

Windows 7 x64, follow the manual , all version except CMAKE 3.5.2 are the same. 

Can't solve problem with error "cc1plus.exe: out of memory allocating 348697 bytes":

[ 20%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/convert.
pp.obj
[ 20%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/copy.cpp
obj
[ 20%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/datastru
ts.cpp.obj
[ 20%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/drawing.
pp.obj
[ 20%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/dxt.cpp.
bj
[ 20%] Building CXX object modules/core/CMakeFiles/opencv_core.dir/src/glob.cpp
obj

cc1plus.exe: out of memory allocating 348697 bytes
modules\core\CMakeFiles\opencv_core.dir\build.make:312: recipe for target 'modu
es/core/CMakeFiles/opencv_core.dir/src/glob.cpp.obj' failed
mingw32-make[2]: *** [modules/core/CMakeFiles/opencv_core.dir/src/glob.cpp.obj]
Error 1
CMakeFiles\Makefile2:1217: recipe for target 'modules/core/CMakeFiles/opencv_co
e.dir/all' failed
mingw32-make[1]: *** [modules/core/CMakeFiles/opencv_core.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

e:\opencv2410\opencv\mingw_bld4>




Thanks!

  • Ok, I think it will be a good idea to make a remark in manual that for 64-bit machine you need MinGW-w64 (not MinGW-w32) and you still will able to compile x86 code. And do not need to install QT fro mingw32, but download it from here (form example).

  • Did that fix your problem? Thanks for letting us know!

    -Paul
  • Another mistake at page 23 

    Find CMAKE_CONFIGURATION_TYPES as shown in Figure 34. Type “Release” into that space.
    Click on the “Generate” button. Allow CMake to run and finish generating the files. There should be no
    errors.
    

    instead of changing CMAKE_CONFIGURATION_TYPES, need to change CMAKE_BUILD_TYPE to Release.

  • Yes, using MinGW-w64 fixed the problem.
  • Thanks for the input! We'll make note of the corrections.

    Paul
  • Just got next error while compiling DLP SDK itself:

    [ 21%] Building C object 3rd_party/glfw-3.0.4/src/CMakeFiles/glfw.dir/win32_wind
    ow.c.obj
    [ 22%] Building C object 3rd_party/glfw-3.0.4/src/CMakeFiles/glfw.dir/wgl_contex
    t.c.obj
    [ 24%] Linking C static library ..\..\..\lib\libglfw3.a
    [ 24%] Built target glfw
    [ 25%] Building C object CMakeFiles/DLP_SDK.dir/3rd_party/hidapi-master/windows/
    hid.c.obj
    [ 26%] Building CXX object CMakeFiles/DLP_SDK.dir/src/common/other.cpp.obj
    C:\TexasInstruments-DLP\DLP-ALC-LIGHTCRAFTER-SDK-2.0_COPY\DLP-ALC-LIGHTCRAFTER-S
    DK\src\common\other.cpp: In function 'void dlp::Time::Sleep::Microseconds(unsign
    ed int)':
    C:\TexasInstruments-DLP\DLP-ALC-LIGHTCRAFTER-SDK-2.0_COPY\DLP-ALC-LIGHTCRAFTER-S
    DK\src\common\other.cpp:99:10: error: 'std::this_thread' has not been declared
         std::this_thread::sleep_for(timespan);
              ^
    C:\TexasInstruments-DLP\DLP-ALC-LIGHTCRAFTER-SDK-2.0_COPY\DLP-ALC-LIGHTCRAFTER-S
    DK\src\common\other.cpp: In function 'void dlp::Time::Sleep::Milliseconds(unsign
    ed int)':
    C:\TexasInstruments-DLP\DLP-ALC-LIGHTCRAFTER-SDK-2.0_COPY\DLP-ALC-LIGHTCRAFTER-S
    DK\src\common\other.cpp:108:10: error: 'std::this_thread' has not been declared
         std::this_thread::sleep_for(timespan);
              ^
    C:\TexasInstruments-DLP\DLP-ALC-LIGHTCRAFTER-SDK-2.0_COPY\DLP-ALC-LIGHTCRAFTER-S
    DK\src\common\other.cpp: In function 'void dlp::Time::Sleep::Seconds(unsigned in
    t)':
    C:\TexasInstruments-DLP\DLP-ALC-LIGHTCRAFTER-SDK-2.0_COPY\DLP-ALC-LIGHTCRAFTER-S
    DK\src\common\other.cpp:118:10: error: 'std::this_thread' has not been declared
         std::this_thread::sleep_for(timespan);
              ^
    CMakeFiles\DLP_SDK.dir\build.make:87: recipe for target 'CMakeFiles/DLP_SDK.dir/
    src/common/other.cpp.obj' failed
    mingw32-make[2]: *** [CMakeFiles/DLP_SDK.dir/src/common/other.cpp.obj] Error 1
    CMakeFiles\Makefile2:98: recipe for target 'CMakeFiles/DLP_SDK.dir/all' failed
    mingw32-make[1]: *** [CMakeFiles/DLP_SDK.dir/all] Error 2
    Makefile:82: recipe for target 'all' failed
    mingw32-make: *** [all] Error 2
    
    c:\TexasInstruments-DLP\DLP-ALC-LIGHTCRAFTER-SDK-2.0_COPY\DLP-ALC-LIGHTCRAFTER-S
    DK\nikk_build2>

    any ideas? Thanks.

  • Ok, solved this issue by use MinGW with POSIX threads (from here)

    What should I put for DLP_SDK_DIR in CMAKE?