언어 설정

Menu
Sites
Language
undecelared identifiers ? what is missing ?

The below code is not compiling. I get - use of undeclared identifier 'APP_CONTROL_OPERATION_SETTING'.

Now where the hell is this deceleration in ? Which include am missing ?


#include <app_control.h>

 

static int
launch_setting(void)//might no be required
{
   int ret = 0;
   app_control_h service = NULL;
   app_control_create(&service);

   if (service == NULL)
   {
      dlog_print(DLOG_INFO, LOG_TAG, "Failed to create app control handler");

      return -1;
   }

   app_control_set_operation(service, APP_CONTROL_OPERATION_SETTING);

   ret = app_control_send_launch_request(service, NULL, NULL);
   app_control_destroy(service);

   if (ret == APP_CONTROL_ERROR_NONE)
   {
      dlog_print(DLOG_INFO, LOG_TAG, "Succeeded to launch settings!\n");

      return 0;
   }
   else
   {
      dlog_print(DLOG_INFO, LOG_TAG, "Failed to launch settings!\n");

      return -1;
   }

   return 0;
}

 

Aashish

Responses

2 댓글
Anirban Dutta

APP_CONTROL_OPERATION_SETTING is defined at app_contro.h header file which can be found at following location:

tizen-studio/platforms/tizen-2.4/mobile/rootstraps/mobile-2.4-device.core/usr/include/appfw/app_control.h

Please check if app_control.h is declared correctly.

And, why does function return type is static int ? It may scope the identifier only within that function which may cause the MACRO as undeclared. ( http://stackoverflow.com/a/5025409/3921440 , see comment ).

Ashish Patil

Anirban - The header file is declared.

Also thansk for pointing to the 'static int'. Actually its picked upcode. So i dint pay more heed to it. Just wanted to getit to work.

 

Aashish