Author Topic: undefined GL references when linking  (Read 6559 times)

realflash

  • Guest
undefined GL references when linking
« on: 16 June 2005, 11:46:24 »
I'm getting closer to a compile.

I'm using latest CVS (checked out this morning). Configure completes OK. All files seem to compile OK. My problem occurs when linking starts, at which point a host of undefined references get reported, all beginning with gll. For example:

Code: [Select]
./build/i686-pc-linux-gnu/optimize/shared_lib/sources/libglestlib.a(shader_gl.o)(.text+0x746): In function `Shared::Graphics::Gl::ShaderProgramGl::setUniform(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Shared::Graphics::Vec3<float> const&)':
shared_lib/sources/../include/graphics/vec.h:193: undefined reference to `glUniform3fvARB'
./build/i686-pc-linux-gnu/optimize/shared_lib/sources/libglestlib.a(shader_gl.o)(.text+0x7a3): In function `Shared::Graphics::Gl::ShaderProgramGl::setUniform(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Shared::Graphics::Vec2<float> const&)':
shared_lib/sources/../include/graphics/vec.h:62: undefined reference to `glUniform2fvARB'
./build/i686-pc-linux-gnu/optimize/shared_lib/sources/libglestlib.a(shader_gl.o)(.text+0x800): In function `Shared::Graphics::Gl::ShaderProgramGl::setUniform(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, float)':
shared_lib/sources/graphics/gl/shader_gl.cpp:117: undefined reference to `glUniform1fARB'
./build/i686-pc-linux-gnu/optimize/shared_lib/sources/libglestlib.a(shader_gl.o)(.text+0x860): In function `Shared::Graphics::Gl::ShaderProgramGl::setUniform(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)':
shared_lib/sources/graphics/gl/shader_gl.cpp:111: undefined reference to `glUniform1iARB'


I'm guessing an OpenGL header file of some kind is missing? Can someone please tell me which files should contain the definitions of these reference, and the package the files came from? Thanks
« Last Edit: 1 January 1970, 00:00:00 by realflash »

Jon

  • Guest
(No subject)
« Reply #1 on: 21 August 2005, 12:16:21 »
Is there a work-around for this problem?

I am attempting to compile Glest 1.1.1 on Fedora Core 4. I have followed the instruction at: http://http://www.glest.org/board/viewtopic.php?t=820 but have run up against the 'undefined reference' problem.

I have an ATI Radeon 9250 card (that works fine under Windows) and have installed the proprietary ATI driver (using the RPM method) I have confirmed that fglrxinfo sees it properly, as follows;

Quote
$ fglrxinfo
display: :0.0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 8500 Prototype DDR Athlon (3DNow!) (FireGL) (GNU_ICD)
OpenGL version string: 1.3.1010 (X4.3.0-8.16.20)

glxinfo reports;
Quote
$ glxinfo
name of display: :0.0
display: :0  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,
    GLX_EXT_import_context, GLX_OML_swap_method, GLX_SGI_make_current_read,
    GLX_SGIS_multisample, GLX_SGIX_fbconfig
client glx vendor string: ATI
client glx version string: 1.3
client glx extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context,
    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_ATI_pixel_format_float,
    GLX_ATI_render_texture
GLX extensions:
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_EXT_import_context,
    GLX_ARB_multisample
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: RADEON 8500 Prototype DDR Athlon (3DNow!) (FireGL) (GNU_ICD)
OpenGL version string: 1.3.1010 (X4.3.0-8.16.20)
OpenGL extensions:
    GL_ARB_multitexture, GL_EXT_texture_env_add, GL_EXT_compiled_vertex_array,
    GL_S3_s3tc, GL_ARB_occlusion_query, GL_ARB_point_parameters,
    GL_ARB_texture_border_clamp, GL_ARB_texture_compression,
    GL_ARB_texture_cube_map, GL_ARB_texture_env_add,
    GL_ARB_texture_env_combine, GL_ARB_texture_env_crossbar,
    GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,
    GL_ARB_transpose_matrix, GL_ARB_vertex_blend, GL_ARB_vertex_buffer_object,
    GL_ARB_vertex_program, GL_ARB_window_pos, GL_ATI_element_array,
    GL_ATI_envmap_bumpmap, GL_ATI_fragment_shader, GL_ATI_map_object_buffer,
    GL_ATI_texture_env_combine3, GL_ATI_texture_mirror_once,
    GL_ATI_vertex_array_object, GL_ATI_vertex_attrib_array_object,
    GL_ATI_vertex_streams, GL_ATIX_texture_env_combine3,
    GL_ATIX_texture_env_route, GL_ATIX_vertex_shader_output_point_size,
    GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color, GL_EXT_blend_func_separate,
    GL_EXT_blend_minmax, GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,
    GL_EXT_draw_range_elements, GL_EXT_fog_coord, GL_EXT_multi_draw_arrays,
    GL_EXT_packed_pixels, GL_EXT_point_parameters, GL_EXT_polygon_offset,
    GL_EXT_rescale_normal, GL_EXT_secondary_color,
    GL_EXT_separate_specular_color, GL_EXT_stencil_wrap,
    GL_EXT_texgen_reflection, GL_EXT_texture3D,
    GL_EXT_texture_compression_s3tc, GL_EXT_texture_cube_map,
    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_combine,
    GL_EXT_texture_env_dot3, GL_EXT_texture_filter_anisotropic,
    GL_EXT_texture_lod_bias, GL_EXT_texture_mirror_clamp,
    GL_EXT_texture_object, GL_EXT_texture_rectangle, GL_EXT_vertex_array,
    GL_EXT_vertex_shader, GL_HP_occlusion_test, GL_NV_blend_square,
    GL_NV_occlusion_query, GL_NV_texgen_reflection, GL_SGI_color_matrix,
    GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp,
    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays
glu version: 1.3
glu extensions:
    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav
 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat
----------------------------------------------------------------------
0x23 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  1 0 Slow
0x24 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  1 0 Slow
0x25 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  1 0 Slow
0x26 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  1 0 Slow
0x27 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  1 0 None
0x28 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  1 0 None
0x29 24 tc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  1 0 None
0x2a 24 tc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  1 0 None
0x2b 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8 16 16 16 16  1 0 Slow
0x2c 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8 16 16 16 16  1 0 Slow
0x2d 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0 16 16 16 16  1 0 Slow
0x2e 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0 16 16 16 16  1 0 Slow
0x2f 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  8  0  0  0  0  1 0 None
0x30 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  8  0  0  0  0  1 0 None
0x31 24 dc  0 32  0 r  y  .  8  8  8  8  0 24  0  0  0  0  0  1 0 None
0x32 24 dc  0 32  0 r  .  .  8  8  8  8  0 24  0  0  0  0  0  1 0 None


I see that Martinho has responded to this post: http://http://www.glest.org/board/viewtopic.php?t=832 refering to 'GLsdk', but I have no idea how to implement the suggestion.

Any assistance will be appreciated.

Cheers,
Jon
« Last Edit: 1 January 1970, 00:00:00 by Jon »

crusadingknight

  • Guest
(No subject)
« Reply #2 on: 21 August 2005, 17:26:59 »
I only speak english and french, but I believe he was saying to retrieve http://oss.sgi.com/projects/ogl-sample/GLsdk.zip, and extract and compile in glprocs.c and glprocs.h so that you can properly detect extensions? (Excuse the fact that I may be wrong here, as I don't speak spanish.  :(  )
« Last Edit: 1 January 1970, 00:00:00 by crusadingknight »

Jon

  • Guest
(No subject)
« Reply #3 on: 21 August 2005, 19:04:37 »
Thanks for this crusadingknight. I know how to do this under Windows & VC++, but I am pretty much a noob when it comes to Linux, autconf and Jam. Can anyone advise me what changes I need to make (presumably to the configure script) to make this happen?

Cheers,
Jon
« Last Edit: 1 January 1970, 00:00:00 by Jon »

martiño

  • Behemoth
  • *******
  • Posts: 1,095
    • View Profile
(No subject)
« Reply #4 on: 21 August 2005, 21:00:08 »
You dont really need those ARB OpenGL calls, they are in the Shared Library because I use this library for more things, but GLEST NEVER USES THEM. You can just comment these lines of code in the shared library shader code and it will be fine.
« Last Edit: 1 January 1970, 00:00:00 by martiño »

Jon

  • Guest
(No subject)
« Reply #5 on: 22 August 2005, 07:04:51 »
Thanks very much for this.

Your suggestions helped heaps. I have managed to get Glest 1.1.1 to compile on my Fedora Core 4 system. Yeee-Haaaa!

Next step: get the save-game code working on Linux.
« Last Edit: 1 January 1970, 00:00:00 by Jon »

 

anything