I've encountered an error compiling STAF on Ubuntu 12.04 which comes with g++ version 4.6.3. When trying to compile STAF from source I got huge numbers of linker errors, along the lines of:
The strange thing was that my cross-compilers didn't exhibit the error, only my native compiler. I discovered that my cross compilers were based on g++ 4.4, and when I reverted to the most recent g++ 4.4 build in the Ubuntu repository (as of writing, 4.4.7) the linker errors vanished.
I'm not certain what causes this issue, but I figgured you should be made aware that it's happening. This will hopefully also help others work out what's wrong with their STAF compilation in future.
Cheers,
Stuart
STAFSemService.cpp:(.text+0xfb0b): undefined reference to `STAFString::~STAFString()'
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for reporting this. Some of the STAF code was written a long time ago and may need to be updated to avoid this error using the latest g++ version. I'll look into this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've encountered an error compiling STAF on Ubuntu 12.04 which comes with g++ version 4.6.3. When trying to compile STAF from source I got huge numbers of linker errors, along the lines of:
STAFSemService.cpp:(.text+0xf904): undefined reference to
STAFEventSem::post()' STAFSemService.cpp:(.text+0xf91f): undefined reference to
STAFString::STAFString(char const*, unsigned int, STAFString::CodePageType)'STAFSemService.cpp:(.text+0xf934): undefined reference to
STAFCommandParseResult::optionTimes(STAFString const&)' STAFSemService.cpp:(.text+0xf943): undefined reference to
STAFString::~STAFString()'STAFSemService.cpp:(.text+0xf9d2): undefined reference to
STAFMutexSem::release()' STAFSemService.cpp:(.text+0xf9e8): undefined reference to
STAFThreadSafeDecrement'The strange thing was that my cross-compilers didn't exhibit the error, only my native compiler. I discovered that my cross compilers were based on g++ 4.4, and when I reverted to the most recent g++ 4.4 build in the Ubuntu repository (as of writing, 4.4.7) the linker errors vanished.
I'm not certain what causes this issue, but I figgured you should be made aware that it's happening. This will hopefully also help others work out what's wrong with their STAF compilation in future.
Cheers,
Stuart
STAFSemService.cpp:(.text+0xfb0b): undefined reference to `STAFString::~STAFString()'
Thanks for reporting this. Some of the STAF code was written a long time ago and may need to be updated to avoid this error using the latest g++ version. I'll look into this.