Menu

FOBS 0.4.2 build problems (missing includes)

user
2008-08-15
2013-05-09
  • Lieven de Cock

    Lieven de Cock - 2008-08-15

    Hello,

    I have build fobs 0.4.2 twice last night.

    System 1 : OpenSuse 11.0 (GCC 4.3.1)  --> BUILD FAILS
    System 2 : OpenSuse 10.2 (GCC 4.1.2) --> build succeeds.

    As such focusing on system 1.
    These are the build failures I get  (well short assembly list ):
    1) Decoder.cpp

    core/Decoder.cpp:94: error: ‘::abs’ has not been declared
    core/Decoder.cpp:95: error: ‘::abs’ has not been declared
    core/Decoder.cpp:123: error: ‘strcpy’ was not declared in this scope
    core/Decoder.cpp:248: error: ‘memset’ was not declared in this scope
    core/Decoder.cpp:601: error: ‘memcpy’ was not declared in this scope
    core/Decoder.cpp:1201: error: ‘memcpy’ was not declared in this scope

    FIX : add the following includes :
    #include <cstring> // strcpy
    #include <cstdlib> // abs

    2) Encoder.cpp
    core/Encoder.cpp:150: error: ‘strdup’ was not declared in this scope
    core/Encoder.cpp:315: error: ‘INT_MAX’ was not declared in this scope
    core/Encoder.cpp:379: error: ‘memset’ was not declared in this scope
    core/Encoder.cpp:561: error: ‘strcpy’ was not declared in this scope
    core/Encoder.cpp:839: error: ‘memcpy’ was not declared in this scope
    core/Encoder.cpp:882: error: ‘memcpy’ was not declared in this scope
    core/Encoder.cpp:976: error: ‘memset’ was not declared in this scope

    FIX : add the following includes :
    #include <cstring> // memcpy, memset, strdup
    #include <climits> // INT_MAX

    3) Transcoder.cpp
    core/Transcoder.cpp:43: error: ‘strdup’ was not declared in this scope
    core/Transcoder.cpp:69: error: ‘free’ was not declared in this scope
    core/Transcoder.cpp:87: error: ‘free’ was not declared in this scope
    core/Transcoder.cpp:88: error: ‘strdup’ was not declared in this scope
    core/Transcoder.cpp:98: error: ‘free’ was not declared in this scope
    core/Transcoder.cpp:99: error: ‘strdup’ was not declared in this scope
    core/Transcoder.cpp:107: error: ‘free’ was not declared in this scope
    core/Transcoder.cpp:108: error: ‘strdup’ was not declared in this scope

    FIX : add the following includes :
    #include <cstring> // strdup
    #include <cstdlib> // free

    I followed for Decoder.cpp the path of includes (only the FOBS includes, not the ffmpeg ones), and there it seems very logical these includes should be added.
    TO BE HONEST : these includes should ALWAYS be added, you need to include what you use !!! The surprising thing is that on my second system I am able to build (most probably some other header is different which sort of provides the missing includes -> anyway bad dependency behavior, just include it right from the start ;-)  ).

    I hope you can adjust the FOBS sources accordingly.

    Cheers,
    Lieven

     
    • Jose San Pedro

      Jose San Pedro - 2008-08-15

      Dear Lieven,

      cheers a lot for this info! I will add these changes to Fobs sources. It seems like gcc is getting a little bit more picky with includes ;)

      Cheers,

      Jose San Pedro

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.