Se corrigió el error tipográfico en el código C, aún no se compilará

I am converting someones Palm Pilot code into an Android application for them. This involves me using the NDK to read from one of their already built libraries. For this, I need to create several new functions.

void __stdcall FreeRelay(void){

void Java_my_MainMenu_FreeRelayJava( JNIEnv * env, jobject this ) {
    RelayAPI_DataValid = 0;
    RelayAPI_SetBaud = 0;
    RelayAPI_get = 0;
    RelayAPI_put = 0;
    RelayAPI_flush = 0;
    RelayAPI_delay = 0;
    RelayAPI_initilized = 0;

Now, my error is in the last line of the second method. I had originall had it spelled RelayAPI_initialized, I know that thats correct, but I'm not going through the trouble of changing all of this C code for the typo. I'll make my function fit with the old code. Anyway, I tried ndk-build and got this.

enter image description here

Now in between those separate ndk-build calls, I fixed the error. But it still is telling me in line 615 there is an error dealing with RelayAPI_initialized but its NOT THERE. I don't know whats going on, and I really know very little about C. I saved my files with the updated information then called ndk-build. WHAT AM I MISSING?

preguntado el 31 de julio de 12 a las 14:07

2 Respuestas

maybe you can grep to find if other var like RelayAPI_* are defined GLOBALLY in some c code or header file. if not, define it, or don't set it.

it will resolve compilation error... but probably it wont work

Respondido 31 Jul 12, 15:07

do a clean of your build. so the party built stuff is deleted and you get a full rebuild.

Respondido 31 Jul 12, 15:07

I've done this to no avail. What order should I do this in to make sure I'm doing it correctly. ndk-build clean, then just ndk-build should work? - Jugo

where is relayapi_initialized declared? i cant see any declarations for those variables. - Markus Mikkolainen

I don't think you understand what I'm asking. RelayAPI_initilized has been declared and is already used in multiple other functions. I wrote my own variable RelayAPI_initialized so it gave me the above error. I went back and fixed the spelling to match the member that is already everywhere throughout the code, and it is literally giving me the EXACT same error. Telling me in the line that I'm looking at its still spelled RelayAPI_initialized even though it is not. - Jugo

I see.did you press save? check with notepad that the file you are compiling has been updated. make a clean and then look through the directories to check that .o files are gone and other non-source files. - Markus Mikkolainen

Well, I closed the program and re-opened the file afterwards and it is updated the way I want it to be. I have looked in the JNI folder but cannot find any .o files. I know nothing of how to work C, are they located somewhere else? - Jugo

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.