marcogulino / AndroidUsbCamera

Android USB Camera Driver/Bridge for GNU/Linux
178 stars 104 forks source link

Fixing a bug caused by the inclusion of the C avcodec library in this C++ program. #12

Closed bakennedy closed 2 years ago

bakennedy commented 13 years ago

It fixes this: $ make [ 11%] Built target qtInterfaces_lib [ 17%] Building CXX object src/CMakeFiles/AndroidUsbCameraStaticLib.dir/framesconverter.cpp.o In file included from /usr/include/libavutil/avutil.h:81, from /usr/include/libavcodec/avcodec.h:30, from /home/brian/Stage/AndroidUsbCamera/src/framesconverter.cpp:28: /usr/include/libavutil/common.h: In function ‘int32_t av_clipl_int32(int64_t)’: /usr/include/libavutil/common.h:154: error: ‘UINT64_C’ was not declared in this scope make[2]: * [src/CMakeFiles/AndroidUsbCameraStaticLib.dir/framesconverter.cpp.o] Error 1 make[1]: * [src/CMakeFiles/AndroidUsbCameraStaticLib.dir/all] Error 2 make: *\ [all] Error 2

brijeshkamani commented 13 years ago

Hi bakennedy,

I have downloaded the source given by the link given here but i am still getting error when i am going to make the source....

[root@volansys build]# make [ 5%] Generating socketinterface.moc [ 11%] Building CXX object src/qtInterfaces/CMakeFiles/qtInterfaces_lib.dir/socketinterface.cpp.o Linking CXX static library libqtInterfaces_lib.a [ 11%] Built target qtInterfaces_lib [ 17%] Generating socketconnector.moc [ 23%] Generating framesconverter.moc [ 29%] Generating androidusbcamera.moc [ 35%] Generating framesfactory.moc [ 41%] Generating frame.moc [ 47%] Generating framescreator.moc [ 52%] Generating framesdataextractor.moc [ 58%] Building CXX object src/CMakeFiles/AndroidUsbCameraStaticLib.dir/framesconverter.cpp.o In file included from /usr/local/include/libavutil/avutil.h:125, from /usr/local/include/libavutil/samplefmt.h:22, from /usr/local/include/libavcodec/avcodec.h:30, from /home/volansys/bakennedy-AndroidUsbCamera-86a9d4a/src/framesconverter.cpp:32: /usr/local/include/libavutil/common.h: In function ‘int32_t av_clipl_int32_c(int64_t)’: /usr/local/include/libavutil/common.h:170: error: ‘UINT64_C’ was not declared in this scope make[2]: *\ [src/CMakeFiles/AndroidUsbCameraStaticLib.dir/framesconverter.cpp.o] Error 1

Regard's , Brijesh Kamani

brijeshkamani commented 13 years ago

I got the problem this error was generated due to the ffmpeg development package. I have installed ffmpeg 0.8 but not have installed ffmpeg development package due to that i was getting this error.

Regards, Brijesh Kamani

manishahg commented 12 years ago

This is how i fixed it !!

sudo gedit /usr/include/libavutil/common.h

   add these lines : 
    #  if !defined (UINT64_MAX)
    #   define UINT64_MAX  18446744073709551615ULL
    #  endif
    #  if !defined (INT64_MAX)
    #   define INT64_MAX  9223372036854775807LL
    #  endif
    #ifndef INT64_C
    #define INT64_C(x)   (x + (INT64_MAX - INT64_MAX))
    #define UINT64_C(x)  (x + (UINT64_MAX - UINT64_MAX))
    #endif
   save and exit