Jump to content
  • 0

[obj/status.o] Error 1


Zikoziz

Question


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   16
  • Joined:  12/19/13
  • Last Seen:  

Hi =D
Plissss Help me!!!

my error:

status.c: In function 'status_yaml_readdb_refine_sub':
status.c:14239:3: error: 'for' loop initial declarations are only allowed in C99                                                                                         mode
   for (yamlwrapper* type = yaml_iterator_first(it); yaml_iterator_has_next(it);                                                                                         type = yaml_iterator_next(it)) {
   ^
status.c:14239:3: note: use option -std=c99 or -std=gnu99 to compile your code
status.c:14273:3: error: 'for' loop initial declarations are only allowed in C99                                                                                         mode
   for (yamlwrapper* level = yaml_iterator_first(it); yaml_iterator_has_next(it)                                                                                        ; level = yaml_iterator_next(it)) {
   ^
status.c: In function 'status_yaml_readdb_refine':
status.c:14323:2: error: 'for' loop initial declarations are only allowed in C99                                                                                         mode
  for (int i = 0; i < ARRAYLENGTH(labels); i++) {
  ^
make[1]: *** [obj/status.o] Error 1
make[1]: Leaving directory `/home/LizardRO_xVuiTmL/ragnarok/src/map'
make: *** [map] Error 2

image.thumb.png.3523349ad1dbbafe59699695033d387d.png

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  88
  • Reputation:   23
  • Joined:  01/30/12
  • Last Seen:  

I've made a pull request to fix this error

https://github.com/rathena/rathena/pull/2461

You can check the changes and apply to your repo https://github.com/rathena/rathena/pull/2461/files

Also is recommended to use a  C++11 compiler as it don't raise errors for that syntax

Edited by Digos
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  249
  • Reputation:   72
  • Joined:  10/20/12
  • Last Seen:  

Quote

Install g++ version 5 or later

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   16
  • Joined:  12/19/13
  • Last Seen:  

solved

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.02
  • Content Count:  207
  • Reputation:   16
  • Joined:  12/19/13
  • Last Seen:  

thx!! =)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...