Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You're starting from a good place, you've just hit your first compile error.</p> <p>Here it is:</p> <pre><code>In file included from settings.c:23: input/input_common.h:73: error: redefinition of typedef ‘rarch_joypad_driver_t’ driver.h:327: note: previous declaration of ‘rarch_joypad_driver_t’ was here </code></pre> <p>Here is an excerpt from input_common.h:</p> <pre><code>typedef struct rarch_joypad_driver { ... } rarch_joypad_driver_t; </code></pre> <p>Here is an excerpt from driver.h:</p> <pre><code>typedef struct rarch_joypad_driver rarch_joypad_driver_t; </code></pre> <p>Just as the error says, the typedef is being redefined. I ran a test using gcc 4.6.3 from Ubuntu 12.04:</p> <pre><code>typedef struct foo { int bar; } foo_t; typedef struct foo foo_t; int main() { return 0; } </code></pre> <p>This compiles and links fine. The same code compiled with x86_64-nacl-gcc (which is using gcc 4.4.3), gives the following error:</p> <pre><code>typedef.c:2: error: redefinition of typedef ‘foo_t’ typedef.c:1: note: previous declaration of ‘foo_t’ was here </code></pre> <p>It seems that this error has been relaxed in more recent versions of gcc. I did some searching and found this stackoverflow link: <a href="https://stackoverflow.com/questions/6526322/why-redefinition-of-typedef-error-with-gcc-4-3-but-not-gcc-4-6">Why &quot;Redefinition of typedef&quot; error with GCC 4.3 but not GCC 4.6?</a>.</p> <p>It's worth noting that x86_64-nacl-g++ will compile this code unmodified. Here are two things to try:</p> <ol> <li>Compile with CC using x86_64-nacl-g++ instead of x86_64-nacl-gcc</li> <li><h1>ifdef out the definition in driver.h, and replace the other use in that file with <code>struct rarch_joypad_driver</code>.</h1></li> </ol> <p>For #2, you can use the following:</p> <pre><code>#ifndef __native_client__ ... #endif </code></pre> <p>Good luck, there likely will be more compile failures to fix. :)</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload