Jump to content
Eternal Lands Official Forums
Beaverhunter

Current CVS errors

Recommended Posts

Oki, so I'm starting to get abit tired of updating CVS and then get quite a few errors (not blaming anyone though), and then have to report it in a new thread or something all the time. So can't there be a Sticky thread where we can post small errors in CVS codes that are just about a tiny piece of code not being right or alike, not a compilation guide, just a place for non-devs to tell devs what happens quickly and in 1 place.

 

It would be great if some mod could be able to delete/edit competely solved errors aswell so that the thread doesn't get spammed or HUGE.

 

So let's start off with my current error:

 

1>zipfilesystem.cpp

1>c:\dev\elc\io\zipfilesystem.hpp(21) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

1>elfilewrapper.cpp

1>.\io\elfilewrapper.cpp(3) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

1>elfile.cpp

1>c:\dev\elc\io\elfile.hpp(10) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

 

stdint.h is still not present in MSVS 2005 standard.

Share this post


Link to post
Share on other sites

Well, really, the problem is that there are 3 platforms currently used for EL:

OSX, which 0ctane supports, with help, and keeping it working takes a lot of his time;

MSVC, which, AFAIK, none of the devs use now, and which doesn't use the standards as found in other compilers (gcc isn't perfect on support of the language, but it's a lot closer); and

Win/*nix using gcc, which is most people.

 

Some of the devs are better than others at checking for compile problems, luckily we don't have problems like this too often. I have nudged the person who made the changes though, hopefully it'll be fixed soon.

In the meantime, you should be able to use the old texture loader (check make.defaults for the options you can put in the preprocessor line in MSVC)

Share this post


Link to post
Share on other sites

ttlanhil:

Yes, I'm aware of that and I find it quite "sad", because MSVS isn't really that bad, comparing the IDE/GUI of the compliers MSVS is superior in all categories vs the other "free" compilers that most of you use (adding this: http://www.wholetomato.com/ also makes it even stronger), but of course it's not the outside that counts, it's the inside.

But my point is that MSVS doesn't do that bad, and even if there aren't any devs on that platform I would like to refer to the motto of EL "we leave no one behind" if there are any complaints about MSVS being minority.

 

And of course the point of the thread was obviously not a complaint but a mention of that spamming the forum with small errors, one thread each might not be an ideal solution.

 

On topic:

I tried to change the includes to this:

#ifdef _MSC_VER

#include <windows.h>

typedef unsigned int uint_fast32_t;

typedef int int_fast32_t;

#else

#include <stdint.h>

#endif //MSVC

 

That gets me further but then I start to get errors:

1>Compiling...

1>zipfilesystem.cpp

1>.\io\zipfilesystem.cpp(22) : error C2589: '(' : illegal token on right side of '::'

1>.\io\zipfilesystem.cpp(22) : error C2059: syntax error : '::'

1>elfilewrapper.cpp

1>c:\dev\elc\io\elfile.hpp(91) : error C2589: '(' : illegal token on right side of '::'

1>c:\dev\elc\io\elfile.hpp(91) : error C2059: syntax error : '::'

1>c:\dev\elc\io\elfile.hpp(91) : error C2589: '(' : illegal token on right side of '::'

1>c:\dev\elc\io\elfile.hpp(91) : error C2589: '(' : illegal token on right side of '::'

1>elfile.cpp

1>c:\dev\elc\io\elfile.hpp(91) : error C2589: '(' : illegal token on right side of '::'

1>c:\dev\elc\io\elfile.hpp(91) : error C2059: syntax error : '::'

1>c:\dev\elc\io\elfile.hpp(91) : error C2589: '(' : illegal token on right side of '::'

1>c:\dev\elc\io\elfile.hpp(91) : error C2589: '(' : illegal token on right side of '::'

Edited by Beaverhunter

Share this post


Link to post
Share on other sites

Ohmigosh. Okay, new solution. Right-click each of the .cpp files, properties, compiler, compile as: C++

Been a while since I played with MSVC, so the above is a rough guide, not accurate. But make it compile *.cpp as C++ (gee, it'd be nice if it was smart enough to compile based on the extension...)

Share this post


Link to post
Share on other sites

Ohmigosh. Okay, new solution. Right-click each of the .cpp files, properties, compiler, compile as: C++

Been a while since I played with MSVC, so the above is a rough guide, not accurate. But make it compile *.cpp as C++ (gee, it'd be nice if it was smart enough to compile based on the extension...)

 

Hmm sorry but I just checked and they are set to C++, and the .c files are set to C =/ So it was smart enough or changed before in some way.

Share this post


Link to post
Share on other sites

Not using windows myself, I have to gues here, but I suspect the error is with windows.h declaring min and max as macros, thereby utterly confusing poor MSVC.

 

Is the include necessary? What happens if you remove the #include <windows.h> file.

Share this post


Link to post
Share on other sites

Not using windows myself, I have to gues here, but I suspect the error is with windows.h declaring min and max as macros, thereby utterly confusing poor MSVC.

 

Is the include necessary? What happens if you remove the #include <windows.h> file.

 

aah yes, that did the trick it seems.

 

Now it looks like this:

#ifdef _MSC_VER

typedef unsigned int uint_fast32_t;

typedef int int_fast32_t;

#else

#include <stdint.h>

#endif //MSVC

 

In every file where it only was:

#include <stdint.h>

 

I assumed the windows.h was needed because thats how we solved a previous error conserning stdint.h.

The files that seem to need a change:

zipfilesystem.hpp, elfile.hpp, elfilewrapper.cpp, elfilewrapper.h, memorybuffer.hpp

Share this post


Link to post
Share on other sites
But my point is that MSVS doesn't do that bad, and even if there aren't any devs on that platform I would like to refer to the motto of EL "we leave no one behind" if there are any complaints about MSVS being minority.
I'm not saying that we won't try to support MSVC; but people using it need to expect that there will be problems. The best thing to do is provide a working patch, if possible, otherwise lets developers know about the problem. Like in this thread.
#ifdef _MSC_VER

typedef unsigned int uint_fast32_t;

typedef int int_fast32_t;

#else

#include <stdint.h>

#endif //MSVC

Will be in CVS shortly, thanks :blink:

 

ed: Done. 2 files have the new MSVC check, the others simply had the includes removed (after checking that they were unneeded)

Edited by ttlanhil

Share this post


Link to post
Share on other sites
... I would like to refer to the motto of EL "we leave no one behind" if there are any complaints about MSVS being minority.

Ha! Count your blessings Beaverhunter. OS X users are being continuously left behind. We no longer have shadows. Soon, with the graphics card requirements, many Mac users will be left behind since they cannot upgrade their graphics cards.

Share this post


Link to post
Share on other sites

That motto is within resonable limits. We can't support every computer in the world, like an IBM XT computer for example.

The motto also means that everyone with a decent computer that is no older than, say, 5 years, can play the game. It was NEVER meant to have everyone enjoy all the nice graphical features.

Share this post


Link to post
Share on other sites
... I would like to refer to the motto of EL "we leave no one behind" if there are any complaints about MSVS being minority.

Ha! Count your blessings Beaverhunter. OS X users are being continuously left behind. We no longer have shadows. Soon, with the graphics card requirements, many Mac users will be left behind since they cannot upgrade their graphics cards.

 

Well true but I would say they are different cases =p I mean getting a game developed on windows/linux to run on a mac... that's like getting an xbox game to run on a playstation... Getting an xbox game that worked on xbox version 1.0 to work on xbox version 1.1 is easier.

 

And yes I understand that that motto isn't going to support everyone and not leaving anyone behind, actually I'm abit against that motto since it limits the development of EL to use basic libraries/graphics/textures and so on... but of course it's a nice feature/motto otherwise.

I myself am amazed that some ppl can even run EL on their notebooks or what ever, I had to get a new comp to get EL to run, I had Intel Celeron 2,2ghz + Geforce FX 5600 (EL froze and whole comp too). And I see people complain when using like grahpics cards similar to the strength of Geforce 1-2, they should get a new comp+gpu no matter if they play EL or not.

 

On topic:

This is not maybe an error that is due to compiling but I have noticed that my CPU usage is at about 20% on EL, it has been under 10% before, so something must be taking up unnessesary resources or CPU speed in the new codes that were added. A 10% increase on a Core 2 Duo is like 1000% increase on an old CPU (which most ppl use), so maybe someone can check through for possible additions in code that can have caused something like this? (before the new code becomes too big, if someone has time for it that is)

 

And maybe a relevant question: Has anyone else experienced this on newer versions of CVS?

 

And yes I have of course allready tried to turn on and off every option available and with no good result except for about 1-2% when turning off shadows and pretty much everything else.

 

This might be temporary, I'll have to check more on it later, but someone could still check because there's definently an increase.

Edited by Beaverhunter

Share this post


Link to post
Share on other sites

Latest CVS displays this error with MSVC 2005

 

.\io\elc_io.c(100) : error C2065: 'uint8_t' : undeclared identifier

 

I also have problems with the HPP files (zipfilesystem.hpp etc.). I've set zipfilesystem.cpp to compile as c++ but it doesn't help

 

#ifndef __cplusplus

#error "Including C++ header in C translation unit!"

#endif

 

Btw uint8_t is also used in the HPP files

Share this post


Link to post
Share on other sites
uint8_t
Hopefully fixed in CVS now. Please report back if there are further issues. :D

As for __cplusplus ... I'm not sure what to change this to. The simple solution is to delete that check in your copy of the code, I guess, though it's not ideal.

Edited by ttlanhil

Share this post


Link to post
Share on other sites

No problems with uint8_t. But now you should typedef uint32_t and uint16_t as well :D

 

As for the __cplusplus i believe it should just be removed. This is some c++ builder nonsense

Share this post


Link to post
Share on other sites
No problems with uint8_t. But now you should typedef uint32_t and uint16_t as well :)

 

As for the __cplusplus i believe it should just be removed. This is some c++ builder nonsense

Hrm, okay, done and done. :D

Share this post


Link to post
Share on other sites

CVS does not compile. Well, does not link, symbols not found:

_start_paste_to_text_field

 

When I comment out widgets.c:2193: start_paste_to_text_field(tf);

it links ...

Share this post


Link to post
Share on other sites

Uhm, you're OSX, right? Nudge Grum, he's been doing the notepad and related stuff recently, and that code should all be #ifdef'd so only linux users (IIRC) get it.

Share this post


Link to post
Share on other sites

Current CVS errors as of 24th june 2007:

 

1>sound.c

1>.\sound.c(1425) : error C2275: 'ALuint' : illegal use of this type as an expression

1> C:\dev\include\AL\al.h(63) : see declaration of 'ALuint'

1>.\sound.c(1425) : error C2146: syntax error : missing ';' before identifier 'error'

1>.\sound.c(1425) : error C2065: 'error' : undeclared identifier

1>.\sound.c(1462) : error C2275: 'ALuint' : illegal use of this type as an expression

1> C:\dev\include\AL\al.h(63) : see declaration of 'ALuint'

1>.\sound.c(1462) : error C2146: syntax error : missing ';' before identifier 'error'

1>elconfig.c

1>.\elconfig.c(1594) : error C2065: 'fname' : undeclared identifier

 

Got the last error fixed by adding NEW_ACTOR_ANIMATION and NEW_FILE_IO to pre-defs.

Edited by Beaverhunter

Share this post


Link to post
Share on other sites

CVS does not compile. Well, does not link, symbols not found:

_start_paste_to_text_field

 

When I comment out widgets.c:2193: start_paste_to_text_field(tf);

it links ...

fixed :wub:

Share this post


Link to post
Share on other sites

My my, some serious issues compiling today...

 

elconfig.c: In function ‘read_el_ini’:
elconfig.c:1632: error: ‘fname’ undeclared (first use in this function)
elconfig.c:1632: error: (Each undeclared identifier is reported only once
elconfig.c:1632: error: for each function it appears in.)
make: *** [elconfig.o] Error 1

Commenting that line fixes it.

 

reflection.c: In function ‘draw_lake_tiles’:
reflection.c:846: error: ‘blend_vec’ undeclared (first use in this function)
reflection.c:846: error: (Each undeclared identifier is reported only once
reflection.c:846: error: for each function it appears in.)
reflection.c:917: error: expected expression before ‘else’
reflection.c:1160: error: expected declaration or statement at end of input
reflection.c:703: warning: unused variable ‘cur_shader’
reflection.c:701: warning: unused variable ‘noise_scale’
make: *** [reflection.o] Error 1

Commenting the line helped, again.

 

framebuffer.o: In function `make_color_framebuffer':
/home/alex/el2_cvs/elc/framebuffer.c:303: undefined reference to `check_formats'
reflection.o: In function `display_3d_reflection':
/home/alex/el2_cvs/elc/reflection.c:528: undefined reference to `water_shader_quality'
/home/alex/el2_cvs/elc/reflection.c:579: undefined reference to `water_shader_quality'
reflection.o: In function `blend_reflection_fog':
/home/alex/el2_cvs/elc/reflection.c:602: undefined reference to `water_shader_quality'
update.o: In function `init_update':
/home/alex/el2_cvs/elc/update.c:59: undefined reference to `file_update_clear_old'
collect2: ld returned 1 exit status
make: *** [el.x86.linux.bin] Error 1

No idea with this one.

 

I had to initially disable NEW_FILE_IO, USE_SHADER and USE_TR1 because they were just a serious pain in the arse - errors all over the place. Reverting to cvs from 10 years ago, just to be safe...

Share this post


Link to post
Share on other sites

Anyone working with CVS, please make sure that the client can swtill compile with the OLD compile options to reduce problems like this. But add the new compile options needed but commented out into make.defaults . Also it would be a good idea to have a single thread for your compile option where bugs specific to the new feature or major change can be tested and comments about new dependencies can be added as well..

 

Once the code becomes stable we can look at uncommenting the define in make.defaults

Share this post


Link to post
Share on other sites

/usr/bin/ld: Undefined symbols:

_check_formats

 

 

check_formats(); is called in framebuffer.c:303: check_formats(); but not declared anywhere.

 

I guess what xaphier really meant was this:

Index: framebuffer.c
===================================================================
RCS file: /cvsroot/elc/elc/framebuffer.c,v
retrieving revision 1.19
diff -u -d -p -r1.19 framebuffer.c
--- framebuffer.c	   24 Jun 2007 13:52:57 -0000	  1.19
+++ framebuffer.c	   24 Jun 2007 15:45:49 -0000
@@ -300,7 +300,7 @@ void make_color_framebuffer(int width, i
{
	if ((width <= 0) || (height <= 0)) return;

-	   check_formats();
+	   check_fbo_formats();

	glGenTextures(1, fbo_texture);
	ELglGenFramebuffersEXT(1, fbo);

 

/EDIT:

Perspective setting in advanced video has no effect :wub:

Edited by Florian

Share this post


Link to post
Share on other sites
Anyone working with CVS, please make sure that the client can swtill compile with the OLD compile options to reduce problems like this.

My problem is purely the number of combinations of defines that should be tested. I checked compiling with all the varients of sound options, but didn't consider others. Maybe I should try each combination of every define within my scope of changes, but that will get out of hand.... especially when its taking about 10 minutes to compile from clean each time I test.

 

Can we get a list of what compile options client was last released with so we can at least test the "standard"?

 

I haven't looked to see if those errors are due to my code. :-S

Share this post


Link to post
Share on other sites
1>sound.c

1>.\sound.c(1425) : error C2275: 'ALuint' : illegal use of this type as an expression

Ummmm, ok then. I've no idea why you are are getting that. That expression is used in a bunch of other places without any problems (within NEW_SOUND and not). It *should* just be a simple variable declaration.

 

Those 2 are outside NEW_SOUND, so it must be a problem with that, but I don't understand why. I also don't understand why I don't have problem compiling without NEW_SOUND. There don't seem to be any other defines around (that I can see) that could affect it). :-S

 

What version of OpenAL are you using?

Share this post


Link to post
Share on other sites

I guess I use OpenAL 1.1 like most others?

 

Some more errors came with the new files:

1>shader.c

1>.\shader\shader.c(85) : error C2275: 'GLhandleARB' : illegal use of this type as an expression

1> C:\dev\include\GL/glext.h(3065) : see declaration of 'GLhandleARB'

1>.\shader\shader.c(85) : error C2146: syntax error : missing ';' before identifier 'shader_object'

1>.\shader\shader.c(85) : error C2065: 'shader_object' : undeclared identifier

1>.\shader\shader.c(85) : error C2065: 'vertex_shader_object' : undeclared identifier

1>.\shader\shader.c(85) : error C2065: 'fragment_shader_object' : undeclared identifier

1>noise.c

1>.\shader\noise.c : error C4335: Mac file format detected: please convert the source file to either DOS or UNIX format

1>sound.c

1>.\sound.c(1425) : error C2275: 'ALuint' : illegal use of this type as an expression

1> C:\dev\include\AL\al.h(63) : see declaration of 'ALuint'

1>.\sound.c(1425) : error C2146: syntax error : missing ';' before identifier 'error'

1>.\sound.c(1425) : error C2065: 'error' : undeclared identifier

1>.\sound.c(1462) : error C2275: 'ALuint' : illegal use of this type as an expression

1> C:\dev\include\AL\al.h(63) : see declaration of 'ALuint'

1>.\sound.c(1462) : error C2146: syntax error : missing ';' before identifier 'error'

1>reflection.c

1>.\reflection.c(846) : error C2065: 'blend_vec' : undeclared identifier

1>.\reflection.c(917) : error C2181: illegal else without matching if

1>.\reflection.c(938) : error C2143: syntax error : missing ';' before 'type'

1>.\reflection.c(947) : error C2143: syntax error : missing ';' before 'type'

1>.\reflection.c(950) : error C2275: 'GLint' : illegal use of this type as an expression

1> C:\Program\Microsoft Visual Studio 8\VC\PlatformSDK\include\GL/gl.h(48) : see declaration of 'GLint'

1>.\reflection.c(950) : error C2146: syntax error : missing ';' before identifier 'view_port'

1>.\reflection.c(950) : error C2065: 'view_port' : undeclared identifier

1>.\reflection.c(950) : error C2109: subscript requires array or pointer type

1>.\reflection.c(994) : error C2065: 'i' : undeclared identifier

1>.\reflection.c(996) : error C2065: 'lights_c' : undeclared identifier

1>.\reflection.c(996) : error C2109: subscript requires array or pointer type

1>.\reflection.c(997) : error C2109: subscript requires array or pointer type

1>.\reflection.c(998) : error C2109: subscript requires array or pointer type

1>.\reflection.c(999) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1002) : error C2065: 'j' : undeclared identifier

1>.\reflection.c(1004) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1006) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1020) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1020) : error C2198: 'glColor3fv' : too few arguments for call

1>.\reflection.c(1022) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1022) : error C2198: 'glColor3fv' : too few arguments for call

1>.\reflection.c(1024) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1024) : error C2198: 'glColor3fv' : too few arguments for call

1>.\reflection.c(1026) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1026) : error C2198: 'glColor3fv' : too few arguments for call

1>.\reflection.c(1031) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1031) : error C2198: 'glColor3fv' : too few arguments for call

1>.\reflection.c(1033) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1033) : error C2198: 'glColor3fv' : too few arguments for call

1>.\reflection.c(1035) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1035) : error C2198: 'glColor3fv' : too few arguments for call

1>.\reflection.c(1037) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1037) : error C2198: 'glColor3fv' : too few arguments for call

1>.\reflection.c(1053) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1053) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1053) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1053) : error C2109: subscript requires array or pointer type

1>.\reflection.c(1053) : error C2198: 'glViewport' : too few arguments for call

1>map.c

1>.\map.c(323) : error C2065: 'int_fast32_t' : undeclared identifier

1>.\map.c(323) : error C2146: syntax error : missing ';' before identifier 'terrain_buffer_size'

1>.\map.c(323) : error C2065: 'terrain_buffer_size' : undeclared identifier

1>.\map.c(324) : error C2146: syntax error : missing ';' before identifier 'water_buffer_size'

1>.\map.c(324) : error C2065: 'water_buffer_size' : undeclared identifier

1>.\map.c(325) : error C2146: syntax error : missing ';' before identifier 'i'

1>.\map.c(325) : error C2065: 'i' : undeclared identifier

1>.\map.c(325) : error C2065: 'j' : undeclared identifier

1>.\map.c(325) : error C2065: 'cur_tile' : undeclared identifier

1>frustum.c

1>.\frustum.c(362) : error C2143: syntax error : missing ';' before 'type'

1>.\frustum.c(363) : error C2143: syntax error : missing ';' before 'type'

1>.\frustum.c(364) : error C2143: syntax error : missing ';' before 'type'

1>.\frustum.c(366) : error C2065: 'x' : undeclared identifier

1>.\frustum.c(366) : error C2065: 'y' : undeclared identifier

1>.\frustum.c(366) : error C2065: 'z' : undeclared identifier

1>framebuffer.c

1>.\framebuffer.c(30) : error C2065: 'GL_DEPTH24_STENCIL8_EXT' : undeclared identifier

1>.\framebuffer.c(30) : error C2099: initializer is not a constant

1>.\framebuffer.c(197) : error C2275: 'GLuint' : illegal use of this type as an expression

1> C:\Program\Microsoft Visual Studio 8\VC\PlatformSDK\include\GL/gl.h(52) : see declaration of 'GLuint'

1>.\framebuffer.c(197) : error C2146: syntax error : missing ';' before identifier 'status'

1>.\framebuffer.c(197) : error C2065: 'status' : undeclared identifier

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.

×