Thread: function redefinition. quake 3

  1. #1
    Registered User xconspirisist's Avatar
    Join Date
    Nov 2003
    Posts
    44

    function redefinition. quake 3

    if anyone knows anything about the q3 source, its going to be a lot of help to me, if not, read on anyway. Im trying to enable the loadconfig and saveconfig menus.

    I am getting this error from the compile ;
    Code:
    debug-x86-Linux-2.3/Q3/q3_ui/q3_ui/ui_loadconfig.o(.text+0x574): In function `UI_LoadConfigMenu':
    debug-x86-Linux-2.3/Q3/q3_ui/q3_ui/ui_loadconfig.c:238: multiple definition of `UI_LoadConfigMenu'
    debug-x86-Linux-2.3/Q3/q3_ui/q3_ui/ui_loadconfig.o(.text+0x574):debug-x86-Linux-2.3/Q3/q3_ui/q3_ui/ui_loadconfig.c:238: first defined here
    if you look closely, its the same word !! the only way it could be redefined if it was in a loop of some sort....

    the code is as follows :
    Code:
    void UI_LoadConfig_Cache( void ) {
    	trap_R_RegisterShaderNoMip( ART_BACK0 );
    	trap_R_RegisterShaderNoMip( ART_BACK1 );
    	trap_R_RegisterShaderNoMip( ART_FIGHT0 );
    	trap_R_RegisterShaderNoMip( ART_FIGHT1 );
    	trap_R_RegisterShaderNoMip( ART_FRAMEL );
    	trap_R_RegisterShaderNoMip( ART_FRAMER );
    	trap_R_RegisterShaderNoMip( ART_ARROWS );
    	trap_R_RegisterShaderNoMip( ART_ARROWLEFT );
    	trap_R_RegisterShaderNoMip( ART_ARROWRIGHT );
    }
    im not defineing a fuction either...

    If its unclear, please tell me. Many thanks.

  2. #2
    carry on JaWiB's Avatar
    Join Date
    Feb 2003
    Location
    Seattle, WA
    Posts
    1,972
    Hmm is it just me or does the function you posted not match the compile errors?

    (UI_LoadConfigMenu/UI_LoadConfig_Cache)
    "Think not but that I know these things; or think
    I know them not: not therefore am I short
    Of knowing what I ought."
    -John Milton, Paradise Regained (1671)

    "Work hard and it might happen."
    -XSquared

  3. #3
    Registered User xconspirisist's Avatar
    Join Date
    Nov 2003
    Posts
    44
    My bad. I get these compile errors :

    Code:
    debug-x86-Linux-2.3/Q3/q3_ui/q3_ui/ui_loadconfig.o(.text+0x574): In function `UI_LoadConfig_Cache':
    debug-x86-Linux-2.3/Q3/q3_ui/q3_ui/ui_loadconfig.c:232: multiple definition of `UI_LoadConfig_Cache'
    debug-x86-Linux-2.3/Q3/q3_ui/q3_ui/ui_loadconfig.o(.text+0x574):debug-x86-Linux-2.3/Q3/q3_ui/q3_ui/ui_loadconfig.c:232: first defined here
    And on line 232, the line the compile error is relating to, is the funtion I previously posted :

    Code:
    void UI_LoadConfig_Cache( void ) { // <<<< Line 232
    	trap_R_RegisterShaderNoMip( ART_BACK0 );
    	trap_R_RegisterShaderNoMip( ART_BACK1 );
    	trap_R_RegisterShaderNoMip( ART_FIGHT0 );
    	trap_R_RegisterShaderNoMip( ART_FIGHT1 );
    	trap_R_RegisterShaderNoMip( ART_FRAMEL );
    	trap_R_RegisterShaderNoMip( ART_FRAMER );
    	trap_R_RegisterShaderNoMip( ART_ARROWS );
    	trap_R_RegisterShaderNoMip( ART_ARROWLEFT );
    	trap_R_RegisterShaderNoMip( ART_ARROWRIGHT );
    }

  4. #4
    Registered User xconspirisist's Avatar
    Join Date
    Nov 2003
    Posts
    44
    I think its looping the file, somehow, or building it twice, im not quite sure. When I try to compile the file, on its own, without the build - then it compiles fine.

    ( I think those errors I posted are build errors )

  5. #5
    mov.w #$1337,D0 Jeremy G's Avatar
    Join Date
    Nov 2001
    Posts
    704
    www.quake3world.com
    www.planetquake.com (forums)

    Each have a set of forums specifically devoted to modifying the q3 sdk. I've used them both many a times. They are great resources, you will probably find most answers to your problems there.

    Thhis one seems to be of a more trivial problem, having to do with including wrong files too many times. Its unlikely any one here will know what is wrong specificaly. Just look through your code, its probably an obvious mistake you are over looking.
    c++->visualc++->directx->opengl->c++;
    (it should be realized my posts are all in a light hearted manner. And should not be taken offense to.)

  6. #6
    Registered User xconspirisist's Avatar
    Join Date
    Nov 2003
    Posts
    44
    yah, I was building the file twice. I figured this out right after I posed my last post, but forgot to come back. sorry.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  3. Undefined Reference Compiling Error
    By AlakaAlaki in forum C++ Programming
    Replies: 1
    Last Post: 06-27-2008, 11:45 AM
  4. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 02:28 PM
  5. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM