Page 17 of 19

Posted: Sat Jan 02, 2010 9:02 am
by Seanbot
hmm, trouble with modbaker under Linux.
Assuming that it is supposed to compile correctly, I think I have some OpenGL problems.

Whole bunch of these: ogl_debug.cpp:623: warning: deprecated conversion from string constant to ‘char*’
And a few undefined variables in scope.

Is this a source problem or a library problem?

Posted: Sat Jan 02, 2010 11:17 am
by xenom[GER]
You can ignore all warnings when compiling (e.g. deprecated conversion from string constant to ‘char*’ ).
The deprecated conversions come from the OpenGL helper functions I copied over from Egoboo to ModBaker (those functions use C strings instead of C++ ones, which give that warning).
Are there undefined variables or are it unused ones?
Unused whouldn't be a problem. But those are just another warning. You have to look for real errors.

Is your compile creating a "modbaker" file? If it does, your compile should be fine!

Posted: Sat Jan 02, 2010 11:23 am
by Seanbot
no, I'm getting an error 1.
Haven't worked with compiling enough.

in Several Functions, variables aren't defined, (that's the error message).
These are in ogl_debug.cpp and ogl_extensions.cpp.

Posted: Sat Jan 02, 2010 11:24 am
by xenom[GER]
Strange, I didn't change anything at those files.
Could you please post two or three example error messages (with the name of the missing variable)?

Posted: Sat Jan 02, 2010 11:29 am
by Seanbot

Code: Select all

ogl_extensions.cpp: In function ‘void GetOGLScreen_Info(glCaps_t*)’:
ogl_extensions.cpp:16: error: ‘memset’ was not declared in this scope
ogl_extensions.cpp:75: error: ‘strstr’ was not declared in this scope

ogl_debug.cpp: In function ‘void gl_grab_state(ogl_state_t*)’:
ogl_debug.cpp:315: error: ‘memset’ was not declared in this scope
ogl_debug.cpp:316: error: ‘memcpy’ was not declared in this scope
ogl_debug.cpp: In function ‘void gl_comp_state(ogl_state_comp_t*, ogl_state_t*, ogl_state_t*)’:
ogl_debug.cpp:371: error: ‘memcmp’ was not declared in this scope

Posted: Sat Jan 02, 2010 11:32 am
by xenom[GER]
Please try adding "#include <string>" at the beginning of those files.

Posted: Sat Jan 02, 2010 11:35 am
by Seanbot
Both were already there.

Posted: Sat Jan 02, 2010 11:39 am
by xenom[GER]
Argh, wrong include xD

Please try "#include <cstring>" (memset etc. are C functions, not C++)

Posted: Sat Jan 02, 2010 11:50 am
by Seanbot
That fixed that, but now my GL development libraries are kind of weird.
Several of these: /usr/lib/gcc/i586-redhat-linux/4.4.1/../../../libGL.so: undefined reference to `_nv000025gl'

Posted: Sat Jan 02, 2010 11:56 am
by xenom[GER]
Hm, I've never seen that error message before.
But on another forum, one solved a very similar problem when specifying the complete path to the .so file in the Makefile:
W000t I guess I fixed it, it is probably lib32/lib64 issue, libGLcore can't find libGL because libGLcore is symlink.

I solved it with adding exact location of libGL.so (nvidia's) to libraries ...

thx for help

Posted: Sat Jan 02, 2010 11:58 am
by Seanbot
Where do I add that, to the LDFLAGS variable? If so how?

Posted: Sat Jan 02, 2010 12:10 pm
by xenom[GER]
Yeah, the LDFRAGS variable is corrent.
Add it by adding the following to that line:

Code: Select all

-I /path/to/sofile/lib/
Make sure you add just the path to the .so file (without "libGL.so" in it).

Posted: Sun Jan 03, 2010 9:36 am
by Seanbot
Still having problems.

Posted: Sun Jan 03, 2010 11:56 am
by xenom[GER]
Seanbot wrote:Still having problems.
:-/

Have you tried to reinstall the OpenGL development libraries?

Posted: Sun Jan 03, 2010 10:50 pm
by Seanbot
I remember having similar problems, but I don't remember if I fixed it or not.