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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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