Can't build unitsync on mingw gcc 4.2.1

Can't build unitsync on mingw gcc 4.2.1

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Can't build unitsync on mingw gcc 4.2.1

Post by imbaczek »

Code: Select all

Creating library file: game\unitsync.abuild\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x0): multiple definition of `win32_error_file_func'
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x0): first defined here
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x18): multiple definition of `fill_win32_filefunc'
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x18): first defined here
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x58): multiple definition of `win32_close_file_func'
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x58): first defined here
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0xa8): multiple definition of `win32_seek_file_func'
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0xa8): first defined here
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x110): multiple definition of `win32_tell_file_func'
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x110): first defined here
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x150): multiple definition of `win32_write_file_func'
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x150): first defined here
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x1ac): multiple definition of `win32_read_file_func'
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x1ac): first defined here
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x208): multiple definition of `win32_open_file_func'
build\unitsync\rts\lib\minizip\iowin32.o:iowin32.c:(.text+0x208): first defined here

collect2: ld returned 1 exit status
Any idea wtf is going on?
copppro
Posts: 3
Joined: 19 Sep 2007, 01:24

Post by copppro »

I know exactly what the problem is. A number of functions are getting redefined during linking. However, I have no clue what the solution is in Spring.
User avatar
BrainDamage
Lobby Developer
Posts: 1164
Joined: 25 Sep 2006, 13:56

Post by BrainDamage »

for how much stupid it can sound, check that you included the .h file and not the .cpp and check that you closed correctly the class in the header file
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

the problem is this thing works on the buildbots, I didn't touch anything. Oh well.
User avatar
ILMTitan
Spring Developer
Posts: 410
Joined: 13 Nov 2004, 08:35

Post by ILMTitan »

Try a reconfigure.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

didn't help.
User avatar
ILMTitan
Spring Developer
Posts: 410
Joined: 13 Nov 2004, 08:35

Post by ILMTitan »

Right, sorry, I was going to bring this up, then forgot, then forgot how I fixed it.

In SConstruct line 104, remove 'rts/lib/minizip/iowin32.c' from the list being iterated over.
imbaczek
Posts: 3629
Joined: 22 Aug 2006, 16:19

Post by imbaczek »

that worked. thanks :)
Post Reply

Return to “Engine”