[Q] Issues compiling WP8 Native Access project - Windows Phone 8 Q&A, Help & Troubleshooting

Hi
I'm trying to compile WP8 Native Access project. FileSystem compiles without worries, but Registry is giving me a hard time.
I've used the winreg.h file from windows 8 sdk and extracted the libs from KERNELBASE and ADVAPI32LEGACY. However the linker still complains about it. Any ideas on why?
These are the errors:
Error 1 error LNK2019: unresolved external symbol [email protected] referenced in function "public: static bool __cdecl Registry::NativeRegistry::CanWrite(enum Registry::RegistryHive,class Platform::String ^,class Platform::String ^)" ([email protected]@[email protected]@[email protected]@[email protected]@@[email protected]) \Downloads\wp8nativeaccess-6c91b17645a467f1921df52f29e2504c09573b71\Registry\Registry.obj Registry
Error 2 error LNK2019: unresolved external symbol [email protected] referenced in function "public: static bool __cdecl Registry::NativeRegistry::CreateKey(enum Registry::RegistryHive,class Platform::String ^)" ([email protected]@[email protected]@[email protected]@[email protected]@@@Z) \Downloads\wp8nativeaccess-6c91b17645a467f1921df52f29e2504c09573b71\Registry\Registry.obj Registry
Error 3 error LNK2019: unresolved external symbol [email protected] referenced in function "public: static bool __cdecl Registry::NativeRegistry:eleteKey(enum Registry::RegistryHive,class Platform::String ^,bool)" ([email protected]@[email protected]@[email protected]@[email protected]@@[email protected]) \Downloads\wp8nativeaccess-6c91b17645a467f1921df52f29e2504c09573b71\Registry\Registry.obj Registry
Error 10 error LNK2019: unresolved external symbol [email protected] referenced in function "public: static bool __cdecl Registry::NativeRegistry:eleteKey(enum Registry::RegistryHive,class Platform::String ^,bool)" ([email protected]@[email protected]@[email protected]@[email protected]@@[email protected]) \Downloads\wp8nativeaccess-6c91b17645a467f1921df52f29e2504c09573b71\Registry\Registry.obj Registry
Error 4 error LNK2019: unresolved external symbol [email protected] referenced in function "public: static bool __cdecl Registry::NativeRegistry:eleteValue(enum Registry::RegistryHive,class Platform::String ^,class Platform::String ^)" ([email protected]@[email protected]@[email protected]@[email protected]@@[email protected]) \Downloads\wp8nativeaccess-6c91b17645a467f1921df52f29e2504c09573b71\Registry\Registry.obj Registry
Error 5 error LNK2019: unresolved external symbol [email protected] referenced in function "bool __cdecl Registry::EnumSubKeys(struct HKEY__ *,wchar_t * *,unsigned long,unsigned long)" ([email protected]@@[email protected]@[email protected]) \Downloads\wp8nativeaccess-6c91b17645a467f1921df52f29e2504c09573b71\Registry\Registry.obj Registry
Error 6 error LNK2019: unresolved external symbol [email protected] referenced in function "[email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@@Z" ([email protected]@[email protected]@[email protected]@[email protected]@@[email protected]@[email protected]@[email protected]@@Z) \Downloads\wp8nativeaccess-6c91b17645a467f1921df52f29e2504c09573b71\Registry\Registry.obj Registry
Error 11 error LNK2019: unresolved external symbol [email protected] referenced in function "[email protected]@[email protected]@[email protected]@[email protected]@@[email protected][email protected]@@Z" ([email protected]@[email protected]@[email protected]@[email protected]@@[email protected][email protected]@@Z) \Downloads\wp8nativeaccess-6c91b17645a467f1921df52f29e2504c09573b71\Registry\Registry.obj Registry
Error 7 error LNK2019: unresolved external symbol [email protected] referenced in function "public: static bool __cdecl Registry::NativeRegistry::CanWrite(enum Registry::RegistryHive,class Platform::String ^,class Platform::String ^)" ([email protected]@[email protected]@[email protected]@[email protected]@@[email protected]) \Downloads\wp8nativeaccess-6c91b17645a467f1921df52f29e2504c09573b71\Registry\Registry.obj Registry
Error 8 error LNK2019: unresolved external symbol [email protected] referenced in function "[email protected]@[email protected]@[email protected]@[email protected]@@[email protected][email protected]@@[email protected]@@Z" ([email protected]@[email protected]@[email protected]@[email protected]@@[email protected][email protected]@@[email protected]@@Z) \Downloads\wp8nativeaccess-6c91b17645a467f1921df52f29e2504c09573b71\Registry\Registry.obj Registry
Error 9 error LNK2019: unresolved external symbol [email protected] referenced in function "[email protected]@[email protected]@[email protected]@[email protected]@@[email protected][email protected]@@Z" ([email protected]@[email protected]@[email protected]@[email protected]@@[email protected][email protected]@@Z) \Downloads\wp8nativeaccess-6c91b17645a467f1921df52f29e2504c09573b71\Registry\Registry.obj Registry

Did you add those LIBs to the project configuration, under Linker inputs? They should be there already, though, at least for ARM. If you're compiling for x86 (using the libraries from the emulator) you may need to add them as inputs. I probably should have used #pragmas, but I tend to avoid those.
It's possible there's some problem of ordering. Unfortunately, I'm at the wrong computer to check right (business trip, no access to my home dev machine).

Related

Error 41 while building CyanogenMod

I've had no issues building cm7 in the past but now I keep getting the same error. I've spent the last two day googling and haven't had any luck I've checked java points the the right place, set ANDROID_JAVA_HOME=$JAVA_HOME and even deleted the entire repo and re-synced still nothing. Any ideas
Code:
Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest.
target Java: CMParts (out/target/common/obj/APPS/CMParts_intermediates/classes)
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/SoundActivity.java:99: cannot find symbol
symbol : variable VIBRATE_IN_CALL
location: class android.provider.Settings.System
Settings.System.VIBRATE_IN_CALL, 1) != 0);
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/SoundActivity.java:150: cannot find symbol
symbol : variable VIBRATE_IN_CALL
location: class android.provider.Settings.System
Settings.System.putInt(getContentResolver(), Settings.System.VIBRATE_IN_CALL,
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/UIPowerWidgetActivity.java:80: cannot find symbol
symbol : variable EXPANDED_HIDE_SCROLLBAR
location: class android.provider.Settings.System
Settings.System.EXPANDED_HIDE_SCROLLBAR, 0) == 1));
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/UIPowerWidgetActivity.java:109: cannot find symbol
symbol : variable EXPANDED_HIDE_SCROLLBAR
location: class android.provider.Settings.System
Settings.System.putInt(getContentResolver(), Settings.System.EXPANDED_HIDE_SCROLLBAR,
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/UIStatusBarActivity.java:62: cannot find symbol
symbol : variable STATUS_BAR_COMPACT_CARRIER
location: class android.provider.Settings.System
Settings.System.STATUS_BAR_COMPACT_CARRIER, 0) == 1));
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/UIStatusBarActivity.java:82: cannot find symbol
symbol : variable STATUS_BAR_COMPACT_CARRIER
location: class android.provider.Settings.System
Settings.System.putInt(getContentResolver(), Settings.System.STATUS_BAR_COMPACT_CARRIER,
^
packages/apps/CMParts/src/com/cyanogenmod/cmparts/activities/WidgetActivity.java:120: cannot find symbol
symbol : variable widget_max_buttons
location: class com.cyanogenmod.cmparts.R.string
Toast.makeText(this, R.string.widget_max_buttons, Toast.LENGTH_LONG).show();
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
7 errors
make: *** [out/target/common/obj/APPS/CMParts_intermediates/classes-full-debug.jar] Error 41
Try "make clean" before building. I had different errors while building CM7 earlier and i read this somewhere. It worked for me.
Thank you but that did not solve still got the same errors
Sent from my Droid using Tapatalk
jbirdvegas said:
Thank you but that did not solve still got the same errors
Sent from my Droid using Tapatalk
Click to expand...
Click to collapse
Hey Bro, try sending a PM to Kadalban... he'll sort it very fast.
SOLUTION
wisefreakz said:
Hey Bro, try sending a PM to Kadalban... he'll sort it very fast.
Click to expand...
Click to collapse
First thanks, but I tried and was returned invalid username?
Anyway I found the problem. The recent bump to 2.3.4 caused lots of symbol not found errors during the build. You can hack those out by slowly removing .java files but that causes instability. I noticed a comment cyanogen had posted on one of the frameworks_base_core commits. Long story short had to merge, up to date, frameworks and my vendor tree. New features = New code. I'm smacking myself now for not realizing this sooner.
Cool... hope to see your rom out soon.
Good luck
Sent from my Milestone using XDA Premium App
I keep getting the following error
When trying to build the ROM.
The sync went smoothly and now I am trying to build and get this error:
"
...
SecuritySettings.java:421: cannot find symbol
symbol : variable AuthentecHelper
location: class com.android.settings.SecuritySettings
case AuthentecHelper.eAM_STATUS_USER_CANCELED:
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
42 errors
make: *** [out/target/common/obj/APPS/Settings_intermediates/classes-full-debug.jar] Error 41
"
Been searching for a couple of hours for the solution but no luck.
Any1 has an idea?

error compiling latest cm 7 source

Hello.
I'm tryng to compile latest cm 7 source for g1/dream but i get these errors:
Code:
packages/apps/Settings/src/com/android/settings/widget/buttons/WimaxButton.java:118: cannot find symbol
symbol : variable ic_appwidget_settings_wimax_off
location: class com.android.settings.R.drawable
currentIcon = R.drawable.ic_appwidget_settings_wimax_off;
^
packages/apps/Settings/src/com/android/settings/widget/buttons/WimaxButton.java:121: cannot find symbol
symbol : variable ic_appwidget_settings_wimax_on
location: class com.android.settings.R.drawable
currentIcon = R.drawable.ic_appwidget_settings_wimax_on;
^
packages/apps/Settings/src/com/android/settings/widget/buttons/WimaxButton.java:130: cannot find symbol
symbol : variable ic_appwidget_settings_wimax_on
location: class com.android.settings.R.drawable
currentIcon = R.drawable.ic_appwidget_settings_wimax_on;
^
packages/apps/Settings/src/com/android/settings/widget/buttons/WimaxButton.java:132: cannot find symbol
symbol : variable ic_appwidget_settings_wimax_off
location: class com.android.settings.R.drawable
currentIcon = R.drawable.ic_appwidget_settings_wimax_off;
^
packages/apps/Settings/src/com/android/settings/widget/WidgetSettings.java:600: cannot find symbol
symbol : variable ic_appwidget_settings_wimax_on
location: class com.android.settings.R.drawable
return R.drawable.ic_appwidget_settings_wimax_on;
^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
5 errors
make: *** [out/target/common/obj/APPS/Settings_intermediates/classes-full-debug.jar] Errore 41
make: *** Attesa per i processi non terminati....
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Can someine help me? Thanks.

Class File for SupportParentable in android.support.v4.app not found

So I just upgraded an ADT project to Android Studios, I've spent the day learning about Gradle and converting all the old imported libraries to compile lines, however I seem to be stuck on one final issue. The class:
public abstract class MainActivity extends ActionBarActivity
Is resulting in 21 Errors. The first 4 are
Error: (14, 17) error: cannot access SupportParentable class file for android.support.v4.app.TaskStackBuilder$SupportParentable not found
Error: (31, 3) error: cannot find symbol variable super
Error: (42, 3) error: cannot find symbol variable super
Error: (47, 2) error: method does not override or implement a method from a supertype
(Rest available if anyone thinks they're relevant)
I have support-v4 and appcompat-v7 compiled:
compile "com.android.support:support-v4:22.2.1"
compile "com.android.support:appcompat-v7:22.2.1"
I've synced, cleaned and ran in all combinations. I'm not sure what step I'm missing here.
Yes I do know that ActionBarActivity has been depricated in place of AppCompatActivity, however switching to AppCompatActivity results in no noticeable changes. My focus right now is to get the project running as is and I'll look into modernizing after that.
bump

Android Studios, Update on time

Hey, I'm fairly new to using android studios and I am trying to make an app that updates its display every few seconds.
The method I am currently using is to update when a button is pressed using the following:
public void Refreshing(View view) {
// do stuff here...
}
Where Refreshing is the onClick of a button I placed.
How can I use a similar format but instead of doing things on a button press just have it done automatically after a few seconds?
You can use a android.os.Handler for that. It allows you to interact with the event loop and post a Runnable that will be executed after a given delay
In your Activity's onCreate() method:
Code:
final int delayMs = 1000;
final Handler handler = new Handler(this);
final Runnable runnable = new Runnable() {
@Override public void run() {
// Call your refresh method
Refreshing();
// Restart the timer
handler.postDelayed(runnable, delayMs);
};
}
handler.postDelayed(runnable, delayMs);
Thanks, this is exactly what I'm looking for. I add the code to the onCreate but I had an semicolon error. So I added another semicolon but its having trouble with a few other parts. Here is what I have.
Code:
final int delayMs = 1000;
final Handler handler = new Handler([B]this[/B]);
final Runnable runnable = new Runnable() {
@Override public void run() {
// Call your refresh method
Refreshing();
// Restart the timer
handler.postDelayed([B]runnable[/B], delayMs);
};
};
handler.postDelayed(runnable, delayMs);
The error listed is:
Error : (134, 33) error: no suitable constructor found for Handler(MainActivity)
constructor Handler.Handler(Looper,Callback) is not applicable
(actual and formal argument lists differ in length)
constructor Handler.Handler(Looper) is not applicable
(actual argument MainActivity cannot be converted to Looper by method invocation conversion)
constructor Handler.Handler(Callback) is not applicable
(actual argument MainActivity cannot be converted to Callback by method invocation conversion)
constructor Handler.Handler() is not applicable
(actual and formal argument lists differ in length)
The words I bolded are underlined in red in Android Studios.
this ----------------has a constructor error
runnable ----------has a initialization error
I tried troubleshooting for a little bit and took out the this and the only error left is with runnable. It says: Error: (141, 37) error: variable runnable might not have been initialized
Yep, I wrote the code without testing it. It might need some adaptation.
Here is a version that should work:
Code:
final int delayMs = 1000;
final Handler handler = new Handler([B]this[/B]);
final Runnable runnable = new Runnable() {
@Override public void run() {
// Call your refresh method
Refreshing();
// Restart the timer
handler.postDelayed([B]this[/B], delayMs);
};
};
handler.postDelayed([B]runnable[/B], delayMs);
Thank you so much, it worked. I just had to change
Code:
final Handler handler = new Handler(this);
to
Code:
final Handler handler = new Handler();

MySQL -- Problems running table script

Running Raspian jessie. Working on getting a MySQL database setup to create a time clock solution for a school project. I've got users set up and database created but i'm having trouble using the source command to run a .sql script to create 3 tables.
I'm following a tutorial on instructables, and this sql script file was provided. I can't post the link because I'm new to the forum.
I'm trying to use themysql> \. /attendance/mysql.sql and it says error
This is the contents of the mysql.sql
CREATE TABLE IF NOT EXISTS `cards` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`userId` int(10) unsigned NOT NULL,
`tagId` bigint(18) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
CREATE TABLE IF NOT EXISTS `readings` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
`tagId` bigint(18) unsigned NOT NULL,
`time` bigint(14) unsigned NOT NULL,
`action` int(2) unsigned NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
CREATE TABLE IF NOT EXISTS `users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_czech_ci NOT NULL,
`surname` varchar(255) COLLATE utf8_czech_ci NOT NULL,
`active` enum('0','1') COLLATE utf8_czech_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
Any input is much appreciated.

Categories

Resources