Ask Your Question
0

gcc: error: long: No such file or directory

asked 2020-06-18 01:53:26 -0600

Henjin gravatar image

I'm trying to build opencv to use with qt5. using CMake I configured and generated opencv with qt options. now when I try to run mingw32-make -j 8 as mentioned in the follow-through, I get the error:

gcc: error: long: No such file or directory
C:\Strawberry\c\bin\windres.exe: preprocessing failed.
mingw32-make[2]: * [modules\core\CMakeFiles\opencv_core.dir\build.make:1341: modules/core/CMakeFiles/opencv_core.dir/vs_version.rc.obj] Error 1
mingw32-make[1]:  [CMakeFiles\Makefile2:1889: modules/core/CMakeFiles/opencv_core.dir/all] Error 2
mingw32-make: ** [Makefile:182: all] Error 2

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-06-18 02:45:13 -0600

berak gravatar image

the windres.exe that comes with mingw cannot escape / handle "long long" in the vs_version.rc

(it stops at the blank and sees the 2nd "long" as a file argument)

remedy:

either switch off the allocator stats:

 cmake -DOPENCV_ENABLE_ALLOCATOR_STATS=OFF

or change the type:

 cmake -DOPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int64

then, clean your build folder and re-run cmake

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-06-18 01:52:34 -0600

Seen: 805 times

Last updated: Jun 18 '20