16th August 2009 04:04 UTC
AVS Crashes when compilied in Visual C++ 2008
Hello AVS fans!
I'm really impressed by AVS and I plan to port it to OpenGL for in-game visualizations in an up coming music game. I also plan to release the port so anyone interested can make run in OS X (iTunes) or Linux. But right now I can't get the regular build to work in winamp...
When I first tried building AVS 2.81d I got some errors which probably are due to compiler differences between VC++ 6.0 and 2008. I quickly fixed them (you can get my fix for 2.81d here) and linked it to DX SDK (March 2009). But when I now start winamp 5.56 with my dll - visualization is just black and winamp crashes shortly after start.
If I try using your compiled dll then it works great. I tried every build configuration (debug, release, nommx) except laser release which I can't get to link successfully:
1>Linking...
1> Creating library .\vis_avs___Win32_Laser_Release/vis_avs_laser.lib and object
.\vis_avs___Win32_Laser_Release/vis_avs_laser.exp
1>rlib.obj : error LNK2001: unresolved external symbol "int g_line_blend_mode" (?g_line_blend_mode@@3HA)
1>r_sscope.obj : error LNK2001: unresolved external symbol "int g_line_blend_mode" (?g_line_blend_mode@@3HA)
1>rl_trans.obj : error LNK2019: unresolved external symbol _registerVar referenced in function
"public: __thiscall CLASER_Transform::CLASER_Transform(void)" (??0CLASER_Transform@@QAE@XZ)
1>rl_trans.obj : error LNK2019: unresolved external symbol _resetVars referenced in function
"public: __thiscall CLASER_Transform::CLASER_Transform(void)" (??0CLASER_Transform@@QAE@XZ)
1>rl_trans.obj : error LNK2019: unresolved external symbol _freeCode referenced in function
"public: virtual __thiscall CLASER_Transform::~CLASER_Transform(void)" (??1CLASER_Transform@@UAE@XZ)
1>rl_trans.obj : error LNK2019: unresolved external symbol _executeCode referenced in function
"public: void __thiscall CLASER_Transform::dopoint(float &,float &,char (* const)[2][576],int &)"
(?dopoint@CLASER_Transform@@QAEXAAM0QAY11CEA@DAAH@Z)
1>rl_trans.obj : error LNK2019: unresolved external symbol _compileCode referenced in function
"public: virtual int __thiscall CLASER_Transform::render(char (* const)[2][576],int,int *,int *,int,int)"
(?render@CLASER_Transform@@UAEHQAY11CEA@DHPAH1HH@Z)
1>.\vis_avs___Win32_Laser_Release\vis_avs.dll : fatal error LNK1120: 6 unresolved externals
I'm thinking of installing VC++ 6.0 (assuming thats the compiler you used). In-case your wandering: these are the errors I first got when converting the project to 2008:
error C2383: 'C_RLibrary::rf' : default-arguments are not allowed on this symbol. @ rlib.h line 39
error C2383: 'C_RLibrary::rf' : default-arguments are not allowed on this symbol. @ rlib.h line 39
error C2383: 'C_RLibrary::rf' : default-arguments are not allowed on this symbol. @ rlib.h line 39
error C2198: 'C_RBASE *(__cdecl *)(char *)' : too few arguments for call. @ rlib.cpp line 333
error C2198: 'C_RBASE *(__cdecl *)(char *)' : too few arguments for call. @ rlib.cpp line 361
error C2383: 'C_RLibrary::rf' : default-arguments are not allowed on this symbol. @ rlib.h line 39
error C2383: 'C_RLibrary::rf' : default-arguments are not allowed on this symbol. @ rlib.h line 39
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int. @ draw.cpp line 53
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int. @ draw.cpp line 53
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int. @ draw.cpp line 53
error C2383: 'C_RLibrary::rf' : default-arguments are not allowed on this symbol. @ rlib.h line 39
error C2383: 'C_RLibrary::rf' : default-arguments are not allowed on this symbol. @ rlib.h line 39
error C2668: 'abs' : ambiguous call to overloaded function. @ bpm.cpp line 383
error C2668: 'abs' : ambiguous call to overloaded function. @ bpm.cpp line 383
error C2668: 'abs' : ambiguous call to overloaded function. @ bpm.cpp line 397
error C2668: 'abs' : ambiguous call to overloaded function. @ bpm.cpp line 517
error C2383: 'C_RLibrary::rf' : default-arguments are not allowed on this symbol. @ rlib.h line 39
error C2383: 'C_RLibrary::rf' : default-arguments are not allowed on this symbol. @ rlib.h line 39
Do you recognize this issue or any of the problems above? Is there a newer version with VC++ 2008?
Thank you so much for your time.