Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Beaverhunter

load_gl_extensions causing CVS to not compile

Recommended Posts

Lots of errors with the new load gl extension system.

 

1>Compiling...

1>load_gl_extensions.c

1>.\load_gl_extensions.c(2) : fatal error C1083: Cannot open include file: 'stdint.h': No such file or directory

1>textures.c

1>\load_gl_extensions.h(259) : error C2061: syntax error : identifier 'have_extension'

1>\load_gl_extensions.h(259) : error C2059: syntax error : ';'

1>\load_gl_extensions.h(259) : error C2059: syntax error : 'type'

1>\load_gl_extensions.h(260) : error C2061: syntax error : identifier 'get_texture_units'

1>\load_gl_extensions.h(260) : error C2059: syntax error : ';'

1>\elc\load_gl_extensions.h(260) : error C2059: syntax error : ')'

1>.\textures.c(142) : error C2065: 'uint_fast32_t' : undeclared identifier

1>.\textures.c(142) : error C2146: syntax error : missing ';' before identifier 'texture_width'

1>.\textures.c(142) : error C2065: 'texture_width' : undeclared identifier

1>.\textures.c(142) : error C2065: 'texture_height' : undeclared identifier

1>.\textures.c(142) : error C2065: 'idx' : undeclared identifier

1>.\textures.c(143) : error C2146: syntax error : missing ';' before identifier 'pixel'

1>.\textures.c(143) : error C2065: 'pixel' : undeclared identifier

1>.\textures.c(143) : error C2065: 'temp' : undeclared identifier

1>.\textures.c(143) : error C2065: 'r' : undeclared identifier

1>.\textures.c(143) : error C2065: 'g' : undeclared identifier

1>.\textures.c(143) : error C2065: 'b' : undeclared identifier

1>.\textures.c(143) : error C2065: 'a' : undeclared identifier

1>.\textures.c(144) : error C2146: syntax error : missing ';' before identifier 'bpp'

1>.\textures.c(144) : error C2065: 'i' : undeclared identifier

1>.\textures.c(144) : error C2065: 'j' : undeclared identifier

1>.\textures.c(144) : error C2065: 'index' : undeclared identifier

1>.\textures.c(144) : error C2065: 'x_padding' : undeclared identifier

Edited by Beaverhunter

Share this post


Link to post
Share on other sites

I believe this happens becuase MSVC does not support C99 extensions, so no uint_fast32_t and stdint.h is present. For my version to build I had to:

 

1. #define uint_fast32_t unsigned int in load_gl_extensions.h

2. remove the include to stdint.h in load_gl_extensions.c

3. added include to <windows.h> in load_gl_extensions.h

 

Generally these actions should be done within

#ifdef _MSC_VER not to cause problems for other users

 

System: WindowsXP

IDE: MS VC++ 2005 Express

Share this post


Link to post
Share on other sites
I believe this happens becuase MSVC does not support C99 extensions, so no uint_fast32_t and stdint.h is present. For my version to build I had to:

<snip>

Can you provide a patch to be committed?

Share this post


Link to post
Share on other sites

I'll put a change into CVS to do the above shortly... Without having used MSVC for a while, I can't guarantee that it'll all be fixed, but it will be a clean change for the above problems.

 

ed: Done. If there are further problems or the fix needs to be extended to other compilers, please make a further note (with compiler and other details where relevant).

Edited by ttlanhil

Share this post


Link to post
Share on other sites

Oki, thanks getting alittle further now but now I get some gl.h related errors instead.

 

1>load_gl_extensions.c

1>C:\Program\Microsoft Visual Studio 8\VC\PlatformSDK\include\GL/gl.h(1152) : error C2054: expected '(' to follow 'WINGDIAPI'

1>C:\Program\Microsoft Visual Studio 8\VC\PlatformSDK\include\GL/gl.h(1152) : error C2085: 'APIENTRY' : not in formal parameter list

1>C:\Program\Microsoft Visual Studio 8\VC\PlatformSDK\include\GL/gl.h(1152) : error C2146: syntax error : missing ',' before identifier 'glAccum'

1>C:\Program\Microsoft Visual Studio 8\VC\PlatformSDK\include\GL/gl.h(1152) : error C2143: syntax error : missing ';' before '('

1>C:\Program\Microsoft Visual Studio 8\VC\PlatformSDK\include\GL/gl.h(1152) : error C2059: syntax error : ')'

 

This basicly keeps repeating but with different identifiers.

 

Also my compiler complains about load_gl_extensions.c having inconsistent file ending.

Edited by Beaverhunter

Share this post


Link to post
Share on other sites

we can't fix anything in your system libraries... you'll have to post where the problem functions are called in ELC's code to be of any help

Share this post


Link to post
Share on other sites

we can't fix anything in your system libraries... you'll have to post where the problem functions are called in ELC's code to be of any help

 

Hmm yes true but it's unfortunately all the output I get=( It has something to do with that file load_gl_extensions.c, and also some recent change since I had different errors before updating CVS today.

Not really sure on how to get more output on this? Any ideas? (I don't get any EL code errors)

Share this post


Link to post
Share on other sites

As of 8:20 a.m. PST I get the following errors compiling CVS..last CVS version I compiled without errors was a couple days ago.. running Mepis 64 (Debian based) linux here.. :

 

In file included from gl_init.h:9,

from global.h:138,

from 2d_objects.c:7:

load_gl_extensions.h:263: error: syntax error before 'have_extension'

load_gl_extensions.h:263: warning: type defaults to 'int' in declaration of 'have_extension'

load_gl_extensions.h:263: warning: data definition has no type or storage class

load_gl_extensions.h:264: error: syntax error before 'get_texture_units'

load_gl_extensions.h:264: warning: type defaults to 'int' in declaration of 'get_texture_units'

load_gl_extensions.h:264: warning: data definition has no type or storage class

make: ***

Share this post


Link to post
Share on other sites

beaverhunter:

okay, try removing the #include <windows.h> line from load_gl_extensions.h

if that brings back other errors, try putting it before the opengl includes

 

pardu:

it seems your system doesn't know what uint_fast32_t is either...

any other errors? what version of gcc/glibc do you have?

Edited by ttlanhil

Share this post


Link to post
Share on other sites

beaverhunter:

okay, try removing the #include <windows.h> line from load_gl_extensions.h

if that brings back other errors, try putting it before the opengl includes

...

 

Moving this:

#ifdef _MSC_VER
#include <windows.h>
typedef unsigned int uint_fast32_t;
#endif //MSVC

 

To the top worked, I actually thought about testing that but then I was "Nah, no way that it can cause all those errors" :) I guess it could. Errors gone it seems.

Share this post


Link to post
Share on other sites

Okay, MSVC fix now in CVS, now only one error in this thread to deal with (until the next post) :)

Share this post


Link to post
Share on other sites

...

 

Also my compiler complains about load_gl_extensions.c having inconsistent file ending.

 

This is still present though, every time I open the file it asks if I want to convert it to proper file endings. Can this be fixed aswell?

 

Ooh and a little side note:

In CVS the font bugs are present, only font 1 works, and it has changed? It doesn't look like before.

It seems like the font doesn't scale properly either, when something is far away (not that far) the name and the bar is huge.

Update:

The huge part was possible to decrease by changing the option Name Font Size, but it still looks different from before, the HP bar seems fixed and smaller.

Very huge some steps away from you, abit smaller closer.

Also everything white seems much more grey now.

Edited by Beaverhunter

Share this post


Link to post
Share on other sites
This is still present though, every time I open the file it asks if I want to convert it to proper file endings. Can this be fixed aswell?
It may cause trouble for Xaphier, but done.
Ooh and a little side note:

In CVS the font bugs are present, only font 1 works, and it has changed? It doesn't look like before.

You probably don't have FONTS_FIX set if only 1 works
It seems like the font doesn't scale properly either, when something is far away (not that far) the name and the bar is huge.
That was a recent change I checked in so that the actor banners were always flat (so if your viewing angle is 45degrees or 30 degrees, it'll look the same). Yes, you may need to adjust the name font size, as it seems to use a slightly different default size.
Also everything white seems much more grey now.
Note sure what this is...

Share this post


Link to post
Share on other sites

Hmm I do have FONTS_FIX set actually=/ I'm gonna try and download the whole game package and so on, maybe there was some font files changed when patch and so on came?

 

Hmm but that just doesn't look right right now, it's HUGE... and it's bigger the further away from you the name is. Maybe this is a font file problem aswell or something but right now it doesn't look good.

 

I just felt that all the white text in the hud seemed blured and abit more greyish, not sure though, I have been playing another game for some hours now (sorry, had to get some variation) so maybe my eyes aren't adjusted properly right now=P (no need to worry too much about this yet)

 

On topic:

Now both load_gl_extensions.cpp and .h gives me "inconsitent line ending" =/ Making extra lines like that didn't work=/

Edited by Beaverhunter

Share this post


Link to post
Share on other sites
Hmm but that just doesn't look right right now, it's HUGE... and it's bigger the further away from you the name is. Maybe this is a font file problem aswell or something but right now it doesn't look good.
No. The name font is exactly the same size no matter what the distance is (in pixels. It will look different because the rest of the 3D world is scaled)
I just felt that all the white text in the hud seemed blured and abit more greyish, not sure though, I have been playing another game for some hours now (sorry, had to get some variation) so maybe my eyes aren't adjusted properly right now=P (no need to worry too much about this yet)
Since there have been no changes there (AFAIK), I'd say it is your eyes...
On topic:

Now both load_gl_extensions.cpp and .h gives me "inconsitent line ending" =/ Making extra lines like that didn't work=/

I didn't make extra lines, I changed line endings... Unfortunately, in the wrong direction (todos instead of fromdos). Which is inconsistent with the rest of ELC. It'll be fixed in CVS in a moment.

Oh, and it's .c not .cpp ...

ed: Done.

Edited by ttlanhil

Share this post


Link to post
Share on other sites

Hmm, but are you sure we are seeing at the same thing? I seriously mean that when a creature moves further away the name and bar gets bigger, and that seems very strange to me. I guess I could get you a screenshot. Also the name font and bar seems more "stiff" or not italic-ish, it's more straight than before it seems or maybe at least more clean/sharp.

 

I did just install a new copy of EL and that didn't fix the fonts and I do compile with FONTS_FIX, I have always been. Only Type 1 works.

 

But anyway the original topic issue seems to be fixed now at least. I might make a new topic about it...

Edited by Beaverhunter

Share this post


Link to post
Share on other sites

Get a ruler. If the banners are a different size at different angles or distances, make a new thread for it... But I expect you'll find it's always exactly the same size (which makes it look strange compared to the actors changing size, I know). And yes it'll look straighter, as it's now flat to your view angle, not always 90 degrees to the ground like it used to be

Share this post


Link to post
Share on other sites

[

 

pardu:

it seems your system doesn't know what uint_fast32_t is either...

any other errors? what version of gcc/glibc do you have?

 

 

4.03 I believe .... I will google for any problems specific to my linux distro or specific to 64 bit architecture.

 

Thank you for the quick response

Share this post


Link to post
Share on other sites

4 should be new enough, but you can check with

gcc -v

or check glibc with something like

apt-cache showpkg glibc-doc

it's not a 64bit problem, my system is 64bit, there's something missing in your libraries

Share this post


Link to post
Share on other sites

4 should be new enough, but you can check with

gcc -v

or check glibc with something like

apt-cache showpkg glibc-doc

it's not a 64bit problem, my system is 64bit, there's something missing in your libraries

 

@3[~]$ gcc -v

Using built-in specs.

Target: x86_64-linux-gnu

Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --enable-checking=release x86_64-linux-gnu

Thread model: posix

gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)

@3[~]$ apt-cache showpkg glibc-doc

Package: glibc-doc

Versions:

2.3.6-0ubuntu20.4(/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_dapper-updates_main_binary-amd64_Packages)(/var/lib/dpkg/status)

2.3.6-0ubuntu20(/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_dapper_main_binary-amd64_Packages)

2.3.5-1ubuntu12(/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_breezy_main_binary-amd64_Packages)

 

Reverse Depends:

libc6-dev,glibc-doc

libc6,glibc-doc

manpages-de-dev,glibc-doc

ddd,glibc-doc

libc6-dev,glibc-doc

libc6,glibc-doc

libc6-dev,glibc-doc

libc6,glibc-doc

Dependencies:

2.3.6-0ubuntu20.4 - libc-doc (0 (null)) libc6-doc (0 (null)) glibcdoc (0 (null)) libc-doc (0 (null)) libc6-doc (0 (null)) glibcdoc (0 (null))

2.3.6-0ubuntu20 - libc-doc (0 (null)) libc6-doc (0 (null)) glibcdoc (0 (null)) libc-doc (0 (null)) libc6-doc (0 (null)) glibcdoc (0 (null))

2.3.5-1ubuntu12 - libc-doc (0 (null)) libc6-doc (0 (null)) glibcdoc (0 (null)) libc-doc (0 (null)) libc6-doc (0 (null)) glibcdoc (0 (null))

Provides:

2.3.6-0ubuntu20.4 - libc-doc

2.3.6-0ubuntu20 - libc-doc

2.3.5-1ubuntu12 - libc-doc

Reverse Provides:

 

sorry I am not more help.. I am not used to 64 bit arch and have only been using this distro a week or so :/

Share this post


Link to post
Share on other sites

Okay, try editing Makefile.linux, and at the end of the

CFLAGS=

line, add -std=gnu99

make clean && make

 

Your glibc really should be providing this type, the only reason I can think of so far is that gcc is set to use the old standard ( C89 instead of C99 )

Share this post


Link to post
Share on other sites

Pardu, Looks like stdint.h is not included. Can you check if it works when in load_gl_extensions.h, right before the line

#include <GL/gl.h>

you add

#include <stdint.h>

 

If that helps, we should probably figure out where to put it exactly in load_gl_extensions.h, and remove the include from load_gl_extensions.c.

Share this post


Link to post
Share on other sites

Pardu, Looks like stdint.h is not included. Can you check if it works when in load_gl_extensions.h, right before the line

#include <GL/gl.h>

you add

#include <stdint.h>

 

If that helps, we should probably figure out where to put it exactly in load_gl_extensions.h, and remove the include from load_gl_extensions.c.

 

Including stdinit.h cleared things up and I compiled the latest CVS version with no problems.

Thank you all very much for your patience.

 

p.s. I promise never to try to steal your libraries in game again Ttlanhil :D

Share this post


Link to post
Share on other sites

Ok, good :)

I committed achange to CVS, could you undo your change, update CVS, and check if it still compiles?

Share this post


Link to post
Share on other sites

Ok, good :P

I committed achange to CVS, could you undo your change, update CVS, and check if it still compiles?

 

 

worked like a charm.. ty again :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×