Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Unable to access struct static data members

Unable to access struct static data members

Put problems with the Android NDK in this forum.

Unable to access struct static data members

Postby agsalcedo » Thu Sep 22, 2011 6:58 pm

Hello, I'm having the next kind of error when linking the application:

undefined reference to 'MyStructure::K_VARIABLE_A

The structure is defined inside "MyStructure.h" as:

[code]struct MyStructure
{
const static int K_VARIABLE_A=1;
const static int K_VARIABLE_B=2;
...
};
[\code]

So my question is: Why I can't access static members from structures or classes using android NDK?. My source code compiles successfully for Windows platform but I get the error mentioned above when compiling for the android platform.

Thanks in advance.
Last edited by agsalcedo on Fri Sep 23, 2011 12:46 am, edited 1 time in total.
agsalcedo
Freshman
Freshman
 
Posts: 2
Joined: Thu Sep 15, 2011 6:13 pm
Location: Mexicali, Baja California, Mexico

Top

Re: Unable to access struct static data members

Postby jonbonazza » Thu Sep 22, 2011 10:18 pm

You need a ';' after the '}'
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Re: Unable to access struct static data members

Postby agsalcedo » Fri Sep 23, 2011 12:47 am

I found my answer posting my question in stackoverflow.com, http://stackoverflow.com/q/7519404/959741

Thanks anyway.
agsalcedo
Freshman
Freshman
 
Posts: 2
Joined: Thu Sep 15, 2011 6:13 pm
Location: Mexicali, Baja California, Mexico

Re: Unable to access struct static data members

Postby jonbonazza » Fri Sep 23, 2011 4:49 pm

Furthermore, You shouldn't really be using a struct in this case in teh first place. Simply using an enum type would be the best. Wrapping an enum in a struct is unneccessary.
jonbonazza
Master Developer
Master Developer
 
Posts: 665
Joined: Thu Jul 15, 2010 2:58 pm
Location: WV USA

Top

Return to NDK Problems

Who is online

Users browsing this forum: No registered users and 2 guests