Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Undefined reference
10-14-2017, 03:54 AM,
Post: #1
Undefined reference
Upon building AA I get the following:

Code:
client/alienarena-cl_stats.o: In function `getPlayerRanking':
/home/nic/src/alienarena/source/client/cl_stats.c:147: undefined reference to `stricmp'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:1076: alienarena] Error 1
make[1]: Leaving directory '/home/nic/src/alienarena/source'
make: *** [Makefile:548: all-recursive] Error 1



Reply
10-14-2017, 04:27 AM,
Post: #2
RE: Undefined reference
I think we need to wait for strat to do his thing since Irr added some files.
[Image: animalt.png]

Chaingun Server Browser
http://hal.nanoid.net/arena/tools/browser
Save a tree or two. Use both sides of toilet paper.
Reply
10-14-2017, 05:53 AM, (This post was last modified: 10-14-2017, 05:56 AM by jarhead.)
Post: #3
RE: Undefined reference
I have the same error (linux).
On stackoverflow I found that stricmp is windows-specific.
https://stackoverflow.com/questions/5918...to-stricmp
They suggest to use strcasecmp().
In the Alien Arena code I found that there is a specific function that probably does the same: Q_strcasecmp().

So I think this line in cl_stats.c, line 147

Code:
if(!stricmp(player.playername, name)) {

should be modified into:
Code:
if(!Q_strcasecmp(player.playername, name)) {

Then I can build it without issues. It should still be tested whether it still works like intended.
Reply
10-14-2017, 06:00 AM,
Post: #4
RE: Undefined reference
Thanks Jar, it is at least building for me now.



Reply
10-14-2017, 06:23 AM, (This post was last modified: 10-14-2017, 07:39 AM by stratokaztr.)
Post: #5
RE: Undefined reference
What jarhead said (stricmp is not portable) and his fix should work ok.  I will fix in SVN in a bit.

A bit later: done.
Cool  Pie fixes everything. So does BACON!
Reply
10-14-2017, 09:50 AM,
Post: #6
RE: Undefined reference
Thank you sir, how's life and health treating you?



Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)