So, working on a SWFotE base, implementing advanced space(spaceV2 snippet). Getting some very odd errors from the GNU linker about multiple definitions. The problem is, they're not defined multiple times. Here's the output from the build log:
build.log said:
o/ships.o: In function `load_market_list()': /home/sunburst/NewGame/src/ships.c:46: multiple definition of `first_market_ship' o/ships.o:/home/sunburst/NewGame/src/ships.c:46: first defined here o/ships.o: In function `load_market_list()': /home/sunburst/NewGame/src/ships.c:46: multiple definition of `last_market_ship' o/ships.o:/home/sunburst/NewGame/src/ships.c:46: first defined here o/ships.o: In function `load_market_list()': /home/sunburst/NewGame/src/ships.c:46: multiple definition of `first_ship' o/ships.o:/home/sunburst/NewGame/src/ships.c:46: first defined here o/ships.o: In function `load_market_list()': /home/sunburst/NewGame/src/ships.c:46: multiple definition of `last_ship' o/ships.o:/home/sunburst/NewGame/src/ships.c:46: first defined here o/ships.o: In function `load_market_list()': /home/sunburst/NewGame/src/ships.c:46: multiple definition of `load_market_list()' o/ships.o:/home/sunburst/NewGame/src/ships.c:46: first defined here o/ships.o: In function `save_market_list()': /home/sunburst/NewGame/src/ships.c:82: multiple definition of `save_market_list()' o/ships.o:/home/sunburst/NewGame/src/ships.c:82: first defined here o/ships.o: In function `add_market_ship(ship_data*)': /home/sunburst/NewGame/src/ships.c:105: multiple definition of `add_market_ship(ship_data*)' o/ships.o:/home/sunburst/NewGame/src/ships.c:105: first defined here o/ships.o: In function `remove_market_ship(blackmarket_data*)': /home/sunburst/NewGame/src/ships.c:130: multiple definition of `remove_market_ship(blackmarket_data*)' o/ships.o:/home/sunburst/NewGame/src/ships.c:130: first defined here o/ships.o: In function `make_random_marketlist()': /home/sunburst/NewGame/src/ships.c:145: multiple definition of `make_random_marketlist()' o/ships.o:/home/sunburst/NewGame/src/ships.c:145: first defined here o/ships.o: In function `do_generate_market': /home/sunburst/NewGame/src/ships.c:280: multiple definition of `do_generate_market' o/ships.o:/home/sunburst/NewGame/src/ships.c:280: first defined here o/ships.o: In function `do_installmodule': /home/sunburst/NewGame/src/ships.c:314: multiple definition of `do_installmodule' o/ships.o:/home/sunburst/NewGame/src/ships.c:314: first defined here o/ships.o: In function `do_shiplist': /home/sunburst/NewGame/src/ships.c:594: multiple definition of `do_shiplist' o/ships.o:/home/sunburst/NewGame/src/ships.c:594: first defined here o/ships.o: In function `do_buymobship': /home/sunburst/NewGame/src/ships.c:626: multiple definition of `do_buymobship' o/ships.o:/home/sunburst/NewGame/src/ships.c:626: first defined here o/ships.o: In function `do_orderclanship': /home/sunburst/NewGame/src/ships.c:872: multiple definition of `do_orderclanship' o/ships.o:/home/sunburst/NewGame/src/ships.c:872: first defined here o/ships.o: In function `do_ordership': /home/sunburst/NewGame/src/ships.c:1049: multiple definition of `do_ordership' o/ships.o:/home/sunburst/NewGame/src/ships.c:1049: first defined here o/ships.o: In function `do_shipstat': /home/sunburst/NewGame/src/ships.c:1333: multiple definition of `do_shipstat' o/ships.o:/home/sunburst/NewGame/src/ships.c:1333: first defined here collect2: ld returned 1 exit status
As you can see, the first place each item is defined is on the line that ld is saying is a multiple definition. I've never seen this before and have no idea what to do about it. I've double, triple and quadruple checked and those are the only places each one is defined. It's even reporting the wrong line numbers for things.
So, does anyone have any idea what's going on and how I can fix it?
I should probably specify that it's compiling with g++… And this is probably the wrong place for it, so if someone wants to move it to an appropriate location, please do.
Here's the output from the build log:
/home/sunburst/NewGame/src/ships.c:46: multiple definition of `first_market_ship'
o/ships.o:/home/sunburst/NewGame/src/ships.c:46: first defined here
o/ships.o: In function `load_market_list()':
/home/sunburst/NewGame/src/ships.c:46: multiple definition of `last_market_ship'
o/ships.o:/home/sunburst/NewGame/src/ships.c:46: first defined here
o/ships.o: In function `load_market_list()':
/home/sunburst/NewGame/src/ships.c:46: multiple definition of `first_ship'
o/ships.o:/home/sunburst/NewGame/src/ships.c:46: first defined here
o/ships.o: In function `load_market_list()':
/home/sunburst/NewGame/src/ships.c:46: multiple definition of `last_ship'
o/ships.o:/home/sunburst/NewGame/src/ships.c:46: first defined here
o/ships.o: In function `load_market_list()':
/home/sunburst/NewGame/src/ships.c:46: multiple definition of `load_market_list()'
o/ships.o:/home/sunburst/NewGame/src/ships.c:46: first defined here
o/ships.o: In function `save_market_list()':
/home/sunburst/NewGame/src/ships.c:82: multiple definition of `save_market_list()'
o/ships.o:/home/sunburst/NewGame/src/ships.c:82: first defined here
o/ships.o: In function `add_market_ship(ship_data*)':
/home/sunburst/NewGame/src/ships.c:105: multiple definition of `add_market_ship(ship_data*)'
o/ships.o:/home/sunburst/NewGame/src/ships.c:105: first defined here
o/ships.o: In function `remove_market_ship(blackmarket_data*)':
/home/sunburst/NewGame/src/ships.c:130: multiple definition of `remove_market_ship(blackmarket_data*)'
o/ships.o:/home/sunburst/NewGame/src/ships.c:130: first defined here
o/ships.o: In function `make_random_marketlist()':
/home/sunburst/NewGame/src/ships.c:145: multiple definition of `make_random_marketlist()'
o/ships.o:/home/sunburst/NewGame/src/ships.c:145: first defined here
o/ships.o: In function `do_generate_market':
/home/sunburst/NewGame/src/ships.c:280: multiple definition of `do_generate_market'
o/ships.o:/home/sunburst/NewGame/src/ships.c:280: first defined here
o/ships.o: In function `do_installmodule':
/home/sunburst/NewGame/src/ships.c:314: multiple definition of `do_installmodule'
o/ships.o:/home/sunburst/NewGame/src/ships.c:314: first defined here
o/ships.o: In function `do_shiplist':
/home/sunburst/NewGame/src/ships.c:594: multiple definition of `do_shiplist'
o/ships.o:/home/sunburst/NewGame/src/ships.c:594: first defined here
o/ships.o: In function `do_buymobship':
/home/sunburst/NewGame/src/ships.c:626: multiple definition of `do_buymobship'
o/ships.o:/home/sunburst/NewGame/src/ships.c:626: first defined here
o/ships.o: In function `do_orderclanship':
/home/sunburst/NewGame/src/ships.c:872: multiple definition of `do_orderclanship'
o/ships.o:/home/sunburst/NewGame/src/ships.c:872: first defined here
o/ships.o: In function `do_ordership':
/home/sunburst/NewGame/src/ships.c:1049: multiple definition of `do_ordership'
o/ships.o:/home/sunburst/NewGame/src/ships.c:1049: first defined here
o/ships.o: In function `do_shipstat':
/home/sunburst/NewGame/src/ships.c:1333: multiple definition of `do_shipstat'
o/ships.o:/home/sunburst/NewGame/src/ships.c:1333: first defined here
collect2: ld returned 1 exit status
As you can see, the first place each item is defined is on the line that ld is saying is a multiple definition. I've never seen this before and have no idea what to do about it. I've double, triple and quadruple checked and those are the only places each one is defined. It's even reporting the wrong line numbers for things.
So, does anyone have any idea what's going on and how I can fix it?
I should probably specify that it's compiling with g++…
And this is probably the wrong place for it, so if someone wants to move it to an appropriate location, please do.