Author Topic: umm, yeah, help anyone  (Read 9149 times)

0 Members and 2 Guests are viewing this topic.

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: umm, yeah, help anyone
And windows.h is definitely in Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include ? Cause it's the only include folder you've got and it does sound like one hell of an odd choice.

That's one way to fix it, a better way is just to declare i at the start of the function.  This is just one of those many stupid MSVC things which violates coding specs and that MS coders have gotten used to doing.

Of all the things that piss me off about programming for VC that one is probably the most annoying because it goes against the biggest rules of variable scoping (i.e that a variable should be declared immediately before it is used if possible and that a variable should have the minimum scope possible).

 Must be even worse for people who don't actually use VC and still have to do it to let the code compile for the rest of us though :D
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: umm, yeah, help anyone
And windows.h is definitely in Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include ? Cause it's the only include folder you've got and it does sound like one hell of an odd choice.

yes. altough there was a weird problem while trying to find the file, the search didnt find it until i told it to look for hidden files and all, but both files arent hidden... odd stuff...
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 
Re: umm, yeah, help anyone
@pecenipicek:
 
I think you are also using VC++ express 2005
Have you added platform SDK path to 'references' in project properties?

right-click on project name(e.g:'code') -> properties -> common properties -> references -> Add Path

I added the platform SDK include/lib paths to both 'project properties' and 'tools->option->project and solution -> VC++ Directories',now it doesnt give 'windows.h/winsock.h missing errors' anymore.
I am new to this VC++ express 2005 thing too,so I might be wrong.

edit:removed img because it's not working  :blah:

edit2:just got another 5 linker errors while compiling freespace2 project:(code.lib liblua.lib libjpg.lib were compiled successfully with some non-essential warnings)

Quote
code.lib(movie.obj) : error LNK2019: unresolved external symbol "void __cdecl mve_close(struct MVESTREAM *)" (?mve_close@@YAXPAUMVESTREAM@@@Z) referenced in function "bool __cdecl movie_play(char *)" (?movie_play@@YA_NPAD@Z)

code.lib(movie.obj) : error LNK2019: unresolved external symbol "void __cdecl mve_shutdown(void)" (?mve_shutdown@@YAXXZ) referenced in function "bool __cdecl movie_play(char *)" (?movie_play@@YA_NPAD@Z)

code.lib(movie.obj) : error LNK2019: unresolved external symbol "void __cdecl mve_play(struct MVESTREAM *)" (?mve_play@@YAXPAUMVESTREAM@@@Z) referenced in function "bool __cdecl movie_play(char *)" (?movie_play@@YA_NPAD@Z)

code.lib(movie.obj) : error LNK2019: unresolved external symbol "void __cdecl mve_init(struct MVESTREAM *)" (?mve_init@@YAXPAUMVESTREAM@@@Z) referenced in function "bool __cdecl movie_play(char *)" (?movie_play@@YA_NPAD@Z)

code.lib(movie.obj) : error LNK2019: unresolved external symbol "struct MVESTREAM * __cdecl mve_open(char *)" (?mve_open@@YAPAUMVESTREAM@@PAD@Z) referenced in function "bool __cdecl movie_play(char *)" (?movie_play@@YA_NPAD@Z)

Additional Dependencies:
kernel32.lib advapi32.lib user32.lib ole32.lib gdi32.lib Quartz.lib d3d8.lib d3dx8.lib DxErr8.lib odbc32.lib odbccp32.lib wsock32.lib winmm.lib vfw32.lib msacm32.lib comctl32.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib

Ignored libs:
libci.lib,libc.lib,libcd.lib,libcmt.lib
« Last Edit: May 31, 2006, 12:53:47 pm by DefeatedRemus »

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: umm, yeah, help anyone
Add the following files to the project:
code/cutscene/decoder16.cpp
code/cutscene/mve_audio.cpp
code/cutscene/mvelib.cpp
code/cutscene/mvelib.h
code/cutscene/mveplayer.cpp

And also note that audio for MVEs will only work if the build is for OpenAL (set USE_OPENAL as a preproc define).  Also add ..\..\openal\include to your list of includes for the project, ..\..\openal\libs\win32 and ..\..\openal\libs\win64 to the lib directories, and openal32.lib to the libs to use.

 
Re: umm, yeah, help anyone
thnx,compiling with OpenAl include path/lib path/missing project files added and defined USE_OPENAL in mve_audio.cpp.

edit:successfully compiled but it crashed with 'Debug Assertion Failed: vector line 756,expression:vector subscript out of range' error when I was trying to run it.

Quote
  Using PURE D3D Device
  Window in debugging mode... mouse clicking may cause problems!
  Alpha texture format = ARGB, 4:4:4:4
  Non-alpha texture format = ARGB, 1:5:5:5
  Max texture units: 2
  Max texture size: 2048x2048
  Can use compressed textures: YES
  Texture compression available: YES
... Direct3D init is complete!
Size of bitmap info = 705 KB
Size of bitmap extra info = 40 bytes
ANI cursorweb with size 24x24 (25.0% wasted)
GRAPHICS: Initializing default colors...
SCRIPTING: Beginning initialization sequence...
SCRIPTING: Beginning Lua initialization...
LUA: Opening LUA state...
LUA: Initializing base Lua libraries...

I dont know what exactly caused this problem/how to debug it,and it doesnt allow me to press any of the 3 buttons(Abort,Retry,Ignore) to 'press Retry to debug the application'.
« Last Edit: May 31, 2006, 02:31:01 pm by DefeatedRemus »

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: umm, yeah, help anyone
edit:successfully compiled but it crashed with 'Debug Assertion Failed: vector line 756,expression:vector subscript out of range' error when I was trying to run it.
Did it give a line number or filename or anything?  Try running with OpenGL and see if it still happens.

 

Offline pecenipicek

  • Roast Chicken
  • 211
  • Powered by copious amounts of coffee and nicotine
    • Skype
    • Steam
    • Twitter
    • PeceniPicek's own deviantart page
Re: umm, yeah, help anyone
@pecenipicek:
 
I think you are also using VC++ express 2005
Have you added platform SDK path to 'references' in project properties?

right-click on project name(e.g:'code') -> properties -> common properties -> references -> Add Path

I added the platform SDK include/lib paths to both 'project properties' and 'tools->option->project and solution -> VC++ Directories',now it doesnt give 'windows.h/winsock.h missing errors' anymore.
I am new to this VC++ express 2005 thing too,so I might be wrong.

tried it and nope. when it gets to compiling the code its still saying the file aint there. but i managed to atleast compile libjpg :p :D

can anyone else help?
Skype: vrganjko
Ho, ho, ho, to the bottle I go
to heal my heart and drown my woe!
Rain may fall and wind may blow,
and many miles be still to go,
but under a tall tree I will lie!

The Apocalypse Project needs YOU! - recruiting info thread.

 
Re: umm, yeah, help anyone
Did it give a line number or filename or anything?  Try running with OpenGL and see if it still happens.
In D3D mode it just points to the file Program Files/Visual Studio 8/vc/include/vector(without any extension),which gives the 'assertion failed:vector out of range' error.

In OpenGl mode it complaints about the outdated version of OpenGl(Current GL Version of 1.1 is less than the required version of 1.2.Switch video modes or update your drivers.)tried to update to the latest driver but the problem is still there.
« Last Edit: May 31, 2006, 09:34:25 pm by DefeatedRemus »

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: umm, yeah, help anyone
In OpenGl mode it complaints about the outdated version of OpenGl(Current GL Version of 1.1 is less than the required version of 1.2.Switch video modes or update your drivers.)tried to update to the latest driver but the problem is still there.
What video card and driver version are you using now?

 
Re: umm, yeah, help anyone
In OpenGl mode it complaints about the outdated version of OpenGl(Current GL Version of 1.1 is less than the required version of 1.2.Switch video modes or update your drivers.)tried to update to the latest driver but the problem is still there.
What video card and driver version are you using now?
'ancient' Nvidia Geforce4 MX 440 and 84.21(latest official version),tried on 2 pc(1 'ancient'(celeron 1.3) and another one is newer(sempron 64 3000+)),the video cards on both pc are very old(MX ish) because I dont play 'modern so-called state-of-art graphics' game :D

  

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: umm, yeah, help anyone
'ancient' Nvidia Geforce4 MX 440 and 84.21(latest official version),tried on 2 pc(1 'ancient'(celeron 1.3) and another one is newer(sempron 64 3000+)),the video cards on both pc are very old(MX ish) because I dont play 'modern so-called state-of-art graphics' game :D
Hmm, what version of Windows are you running?

That card should be fine with OpenGL, the version should be at least 1.5 with those drivers I believe.  The only thing I can think is that it's using software rendering for some reason.  I'll make a change to the OpenGL init code later tonight and maybe that will fix the problem for you (had an issue with that code before, even though it's set according to spec from MS).

 
Re: umm, yeah, help anyone
Hmm, what version of Windows are you running?

That card should be fine with OpenGL, the version should be at least 1.5 with those drivers I believe.  The only thing I can think is that it's using software rendering for some reason.  I'll make a change to the OpenGL init code later tonight and maybe that will fix the problem for you (had an issue with that code before, even though it's set according to spec from MS).
Thanks.

Im running Windows 2000 sp4.

It looks like "ver = (char *)glGetString(GL_VERSION);" gets the wrong string(its always return "1.1" with any version of driver it seems),the 2nd int decimal number 'minor' converted by "sscanf() with 'dot' as delimiter" is less than the defined REQUIRE_GL_MINOR_VERSION(2),hence the error.

I will try to comment out the check lines for now,but I doubt it will still 'trigger' the 'vector subscript out of range' error even if I could 'bypass' this check in OpenGL mode.


 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: umm, yeah, help anyone
It's still doing that? I thought that was fixed donkey's years ago?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: umm, yeah, help anyone
It's still doing that? I thought that was fixed donkey's years ago?
It's not the y2k-type thing, if that's what you were thinking.


@DefeatedRemus:  Update to current CVS and try again.  May be fixed now.

 
Re: umm, yeah, help anyone
It's still doing that? I thought that was fixed donkey's years ago?
It's not the y2k-type thing, if that's what you were thinking.


@DefeatedRemus:  Update to current CVS and try again.  May be fixed now.
Thx,I just ran the compiled executable in openGL with 'opengl version check' commented,same 'vector subscript out of range' error except I can press the 'Retry' button to debug this time,the breakpoint points to line 3700 "gr_font_init(); // loads up all fonts" in freespace2.cpp.I dont know what that means though,since I am newbie at C++/debugging.

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: umm, yeah, help anyone
same 'vector subscript out of range' error except I can press the 'Retry' button to debug this time,the breakpoint points to line 3700 "gr_font_init(); // loads up all fonts" in freespace2.cpp.I dont know what that means though,since I am newbie at C++/debugging.
Huh.  I would assume that it's the scripting system for some reason (Lua, specifically).  Probably something for WMCoolmon to answer since I don't think anyone else has had this problem and he knows that code the best.

 
Re: umm, yeah, help anyone
Huh.  I would assume that it's the scripting system for some reason (Lua, specifically).  Probably something for WMCoolmon to answer since I don't think anyone else has had this problem and he knows that code the best.
ok just for your info:it gives another error related to vector if you ignore the 'vector subscript out of range one':
Quote
expression:("Standard C++ Libraries out of range",0)