0
0

I installed the FMOD libraries on my Gentoo machine and started tinkering with the examples.

I got a Segmentation Fault in the Load From Memory example and started digging around.
There is currently no check if the file was successfully loaded, stemming from main.cpp line 32 (called by main.cpp line 72).

Also, GCC 4.3 has cleaned up their includes, and while the examples compile fine under the makefile, when I dropped them into Eclipse I had to #include <cstdlib>, which provides the exit() function.

  • You must to post comments
0
0

Thanks for the info, I’m guessing the segfault issue was permission based?

Just looking at the example now I can see that no checks are made for if the file opened successfully. We should probably check that, however the main focus of the example is to show the concepts, so we haven’t overly cluttered the examples with error checks.

  • You must to post comments
0
0

The segfault issue was actually directory based. Have to be in the actual example directory.

I did come across another error in compiling an example.
This one is compiler based, I’m using GCC 4.3.3.

[code:hixjkf7y]me262@wheeljack /opt/fmodex/fmoddesignerapi/examples/realtime_tweaking $ su -c make
Password:
g++ -O3 -o realtime_tweaking -I../../../api/inc main.cpp ../../api/lib/libfmodeventnet64.so -Wl,-rpath ../../../api/lib -Wl,-rpath ../../api/lib
main.cpp: In function ‘FMOD_RESULT eventcallback(FMOD_EVENT*, FMOD_EVENT_CALLBACKTYPE, void*, void*, void)’:
main.cpp:29: error: cast from ‘void
‘ to ‘unsigned int’ loses precision
main.cpp:30: error: cast from ‘void‘ to ‘unsigned int’ loses precision
main.cpp:30: error: cast from ‘void
‘ to ‘unsigned int’ loses precision
main.cpp: In function ‘int main(int, char**)’:
main.cpp:46: warning: deprecated conversion from string constant to ‘char
main.cpp:46: warning: deprecated conversion from string constant to ‘char

main.cpp:46: warning: deprecated conversion from string constant to ‘char*’
make: *** [all] Error 1[/code:hixjkf7y]

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.