• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Legacy GM Android YYC is making me nuts, need some advice

C

Cloudd

Guest
Hello. I have spent a LOT of hours trying to get the Android YYC working but there are always errors while compiling. Seems I have tried it all :( At first I didn't get "too many" errors, then I tried different NDK versions and settings etc and then the whole compile window disappeared every time I compiled. Then after even more trying I now get about 50-150 errors that look like this:

1 error generated.
In file included from C:/Users/Myname/Documents/GameMaker/Cache/TestProject1/Default/Scripts/gml_Object_button_start_Mouse_0.gml.cpp:1:
In file included from C:\Users\Myname\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:5:
C:\Users\Myname\AppData\Roaming\GameMaker-Studio\YYC\include/YYStd.h:26:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>


So at the moment there seems to be som "file not found"-problem. I have read the GMS Android guide very carefully and spent a lot of time googling but nothing seems to do the trick. Anyone who have any idea what's wrong..?

Thanks for any help!
 
Z

zircher

Guest
Just to toss out some ideas... stdlib.h is a common C/C++ file, perhaps you need to do a fresh install of your developer kit. Either that or an essential path is missing and it can't find it.
 
C

Cloudd

Guest
Just to toss out some ideas... stdlib.h is a common C/C++ file, perhaps you need to do a fresh install of your developer kit. Either that or an essential path is missing and it can't find it.
Have not tried to reinstall Game Maker Studio yet, guess that will be what I do next..

I looked at C:\Users\Myname\AppData\Roaming\GameMaker-Studio\YYC\include\ and just as the error message says there is no file named stdlib.h

BUT
The file stdlib.h can be found here
C:\Users\Myname\AndroidSDK\ndk-bundle\sysroot\usr\include\bits\fortify

Could it be that YYC searches in the wrong locaton? Or that this file should be copied to the Roaming folder but it does not copy..

Could try to copy/paste it to the Roaming folder but don't wanna mess anything up (since it's a hidden folder)
 
Last edited by a moderator:
C

Cloudd

Guest
Every time I try a new NDK version there are different error messages. Now with NDK 10e I get ONLY 1 error message:

linking libyoyo.so
C:\Users\Myname\AppData\Roaming\GameMaker-Studio\YYC\include/YYGML.h:982: error: undefined reference to 'REAL_RValue(RValue const*)'
C:\Users\Myname\AppData\Roaming\GameMaker-Studio\YYC\include/YYGML.h:1031: error: undefined reference to 'REAL_RValue(RValue const*)'
C:\Users\Myname\AppData\Roaming\GameMaker-Studio\YYC\include/YYGML.h:1182: error: undefined reference to 'REAL_RValue(RValue const*)'
C:\Users\Myname\AppData\Roaming\GameMaker-Studio\YYC\include/YYGML.h:399: error: undefined reference to 'REAL_RValue(RValue const*)'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
 
N

Nathan Archer

Guest
Also having this issue. Did you ever find a solution? This thread is the only Google search result when I search the error :(
 
N

Nathan Archer

Guest
I tried copy-pasting the files and they kept asking me for more so I pasted the whole include folder into the include folder under the sdk. Getting this error now

C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\string.h:48:42: error: C++ requires a type specifier for all declarations
size_t __strlcat_chk(char*, const char*, size_t, size_t) __INTRODUCED_IN(17);
 
T

The Shatner

Guest
What works for me is using Android Studio for all the Android-related downloads and updates. Once the checks for SDK, NDK and JDK were OK, go to Global Game Settings/Android and set:
Build Tools - 26.0.0
Support Lib - 26.0.0
Target SDK - 26
Min SDK - 14
Compile SDK - 26.
EDIT: Using NDK r15c

Some of the errors you guys mentioned can also be related to how touchy the YYC is regarding strings and reals. For example:
If you make something like
Code:
ini_read_string("something","something",3);
the "normal" compiler understands that it means that "3" is a string. With YYC the game crashes when this line is used, because it reads "3" as a real and is expecting a string.
So, you should correct that as
Code:
ini_read_string("something","something","3");

So, always double-check for these real/string issues, for they are the most common cause for YYC errors. The real() and string() functions work quite well for these situations, too.

I Hope I've helped...
 
Last edited by a moderator:
N

Nathan Archer

Guest
What works for me is using Android Studio for all the Android-related downloads and updates. Once the checks for SDK, NDK and JDK were OK, go to Global Game Settings/Android and set:
Build Tools - 26.0.0
Support Lib - 26.0.0
Target SDK - 26
Min SDK - 14
Compile SDK - 26.
EDIT: Using NDK r15c

Some of the errors you guys mentioned can also be related to how touchy the YYC is regarding strings and reals. For example:
If you make something like
Code:
ini_read_string("something","something",3);
the "normal" compiler understands that it means that "3" is a string. With YYC the game crashes when this line is used, because it reads "3" as a real and is expecting a string.
So, you should correct that as
Code:
ini_read_string("something","something","3");

So, always double-check for these real/string issues, for they are the most common cause for YYC errors. The real() and string() functions work quite well for these situations, too.

I Hope I've helped...
Trying to implement that now and switch to the r15c NDK

What files should be in the AppData\Roaming\GameMaker-Studio\YYC\include folder? I've added so many troubleshooting I think I may have screwed it up. It was three YY-something files and one other file.
 
N

Nathan Archer

Guest
Doesn't seem related to the NDK. Seems to be about the include file directory. The errors I'm getting are like the one in the OP

In file included from C:/Users/Myname/Documents/GameMaker/Cache/TestProject1/Default/Scripts/gml_Object_button_start_Mouse_0.gml.cpp:1:
In file included from C:\Users\Myname\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:5:
C:\Users\Myname\AppData\Roaming\GameMaker-Studio\YYC\include/YYStd.h:26:10: fatal error: 'stdlib.h' file not found
#include <stdlib.h>

When I paste them in there, I get an error saying

"Never include this file directly; instead, include <string.h>" or "Never include this file directly; instead, include <stdlib.h>" on everything

I can't remember if I added
"#include <string.h>
#include <stdlib.h>" to YYGML.h or if they were already there.
 
T

The Shatner

Guest
Hm... Maybe you could try reinstalling GMS. Since you've tampered with the files, GMS could be reading them as corrupted and refusing to use them. After reinstalling GMS, try reconfiguring using the toolset I suggested.
 
N

Nathan Archer

Guest
I removed the files and they're in their previous untampered versions. I've switched to your NDK and I've made the changes to the global settings like you suggested. I'm back to square one with the same error as in the OP.

The errors I was getting:

In file included from C:/Users/Nathan/Documents/GameMaker/Cache/Trolley/Default/Scripts/gml_Script_scr_generate_problem.gml.cpp:1:
In file included from C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:5:
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\string.h:30:2: error: "Never include this file directly; instead, include <string.h>"
#error "Never include this file directly; instead, include <string.h>"
^
In file included from C:/Users/Nathan/Documents/GameMaker/Cache/Trolley/Default/Scripts/gml_Script_scr_generate_problem.gml.cpp:1:
In file included from C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:6:
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\stdlib.h:30:2: error: "Never include this file directly; instead, include <stdlib.h>"
#error "Never include this file directly; instead, include <stdlib.h>"
^
In file included from C:/Users/Nathan/Documents/GameMaker/Cache/Trolley/Default/Scripts/gml_Script_scr_generate_problem.gml.cpp:1:
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:45:1: error: unknown type name 'YYCEXTERN'
YYCEXTERN double yyfabs( double _val);
^
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:45:11: error: expected unqualified-id
YYCEXTERN double yyfabs( double _val);
^
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:46:1: error: unknown type name 'YYCEXTERN'
YYCEXTERN double yyfdiv( int64 _lhs, int64 _rhs );
^
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:46:11: error: expected unqualified-id
YYCEXTERN double yyfdiv( int64 _lhs, int64 _rhs );
^
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:77:1: error: unknown type name 'YYCEXTERN'
YYCEXTERN int YYCompareVal(const RValue& val1, const RValue& val2, double _prec);
^
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:77:11: error: expected unqualified-id
YYCEXTERN int YYCompareVal(const RValue& val1, const RValue& val2, double _prec);
^
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:78:1: error: unknown type name 'YYCEXTERN'
YYCEXTERN bool Variable_GetValue_Direct(YYObjectBase* inst, int var_ind, int array_ind, RValue *val);
^
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:78:11: error: expected unqualified-id
YYCEXTERN bool Variable_GetValue_Direct(YYObjectBase* inst, int var_ind, int array_ind, RValue *val);
^
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:79:1: error: unknown type name 'YYCEXTERN'
YYCEXTERN bool Variable_SetValue_Direct(YYObjectBase* inst, int var_ind, int array_ind, RValue *val);
^
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:79:11: error: expected unqualified-id
YYCEXTERN bool Variable_SetValue_Direct(YYObjectBase* inst, int var_ind, int array_ind, RValue *val);
^
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:80:1: error: unknown type name 'YYCEXTERN'
YYCEXTERN void Variable_Global_SetVar(int var_ind, int arr_ind, RValue * val);
^
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:80:11: error: expected unqualified-id
YYCEXTERN void Variable_Global_SetVar(int var_ind, int arr_ind, RValue * val);
^
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:81:1: error: unknown type name 'YYCEXTERN'
YYCEXTERN bool Variable_Global_GetVar(int var_ind, int arr_ind, RValue * val);

Errors I am getting now:

In file included from C:/Users/Nathan/Documents/GameMaker/Cache/Trolley/Default/Scripts/gml_Script_scr_generate_problem.gml.cpp:1:
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:5:10: fatal error: 'string.h' file not found
#include <string.h>
^
1 error generated.
In file included from C:/Users/Nathan/Documents/GameMaker/Cache/Trolley/Default/Scripts/gml_Script_scr_generate_problem_funny.gml.cpp:1:
C:\Users\Nathan\AppData\Roaming\GameMaker-Studio\YYC\include\YYGML.h:5:10: fatal error: 'string.h' file not found
#include <string.h>
^
 
N

Nathan Archer

Guest
Can you tell me what files are in your AppData\Roaming\GameMaker-Studio\YYC\include directory? It seems weird that it's referencing strings without having any access to it.
 
N

Nathan Archer

Guest
AHA. I switched the target from "Android/Fire (YYC)" to "Android/Fire" and it looks like it's going to work if I can Start the YoYo Runner application, whatever that is.
 
N

Nathan Archer

Guest
Apparently the YoYo runner isn't a thing anymore. Tried to create an executable.

* What went wrong:
A problem occurred configuring project ':com.companyname.Trolley'.
> failed to find target with hash string 'android-26' in: C:\Users\Nathan\AppData\Local\Android\Sdk

I can't remember what I had the preferences set to before I changed it to 26.
 
N

Nathan Archer

Guest
Hallelujah apparently you can press CTRL+Z on the global game settings and it will put what you previously had there before. Getting this error now:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':com.companyname.Trolley'.
> failed to find target with hash string 'android-23' in: C:\Users\Nathan\AppData\Local\Android\Sdk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 10.141 secs
cmd /c "subst /d Z:"

How do I run with --stacktrace or --info?

EDIT: Tried with old settings and new ones similar error
 
Last edited by a moderator:
T

The Shatner

Guest
Can you tell me what files are in your AppData\Roaming\GameMaker-Studio\YYC\include directory? It seems weird that it's referencing strings without having any access to it.
The files are Ref.h, YYGML.h, YYSlot.h and YYStd.h.

I remembered now that another thing that helped was running GMS as an administrator. I used to have a lot of bugs before trying this out, but now I only open GMS with the good ol' right-click and "Run as administrator". Maybe that's one more thing to try, who knows.

If you want to execute the game directly using either "Android/Fire" or "Android/Fire YYC", you'd have to download the drivers from your phone/tablet manufacturer. Then it should run directly through USB (provided you have enabled Developer Mode, USB Debugging and whatnot). But this should be another issue.
 
N

Nathan Archer

Guest
The files are Ref.h, YYGML.h, YYSlot.h and YYStd.h.

I remembered now that another thing that helped was running GMS as an administrator. I used to have a lot of bugs before trying this out, but now I only open GMS with the good ol' right-click and "Run as administrator". Maybe that's one more thing to try, who knows.

If you want to execute the game directly using either "Android/Fire" or "Android/Fire YYC", you'd have to download the drivers from your phone/tablet manufacturer. Then it should run directly through USB (provided you have enabled Developer Mode, USB Debugging and whatnot). But this should be another issue.
(I apologize in advance for multiple-posting, but seeing as this was the only Google result for the problem, I'm hoping to walk anyone else having this problem through the problem solving process as I go through it. Currently installing the Google Play and Google API components in my Android environment)

Ill try running as administrator after the install is done.
 
N

Nathan Archer

Guest
The files are Ref.h, YYGML.h, YYSlot.h and YYStd.h.

I remembered now that another thing that helped was running GMS as an administrator. I used to have a lot of bugs before trying this out, but now I only open GMS with the good ol' right-click and "Run as administrator". Maybe that's one more thing to try, who knows.

If you want to execute the game directly using either "Android/Fire" or "Android/Fire YYC", you'd have to download the drivers from your phone/tablet manufacturer. Then it should run directly through USB (provided you have enabled Developer Mode, USB Debugging and whatnot). But this should be another issue.
I developed for Android in a class at University on this phone. Would I have all the drivers required or is that something different?

Tried running as administrator after the install. Still getting the same error.
 
N

Nathan Archer

Guest
OKAY. So I found out that if i change the global game settings to compile at 28, instead of 26. I get a "Failed to find Build Tools revision X.X.X" error. So far no numbers have worked.
 
T

The Shatner

Guest
I developed for Android in a class at University on this phone. Would I have all the drivers required or is that something different?
Considering the unusual nature of your problem, it can't hurt to try and download the drivers. However, it appears unlikely that it would solve the problems.
Another thing that could be interfering are your SDK libs. Since YYC uses some C++ resources, it could come in handy to have those installed in your PC.
I've downloaded them all from the Wampserver homepage (http://wampserver.aviatechno.net/). In the bottom of the page there's a link with all VC++ packages ready to install.
It's a shot in the dark, but who knows?
 

rIKmAN

Member
> failed to find target with hash string 'android-23' in: C:\Users\Nathan\AppData\Local\Android\Sdk
> failed to find target with hash string 'android-26' in: C:\Users\Nathan\AppData\Local\Android\Sdk
These errors are saying that you don't have API23 or API26 installed in the SDK Manager, open it up and install them and try compiling an empty room project.

However it seems like you have been copying and fiddling with the installation files so it might be best to uninstall everything and start again from scratch with fresh installs, taking note of the error messages and understanding what they mean before attempting to fix them.
 
N

Nathan Archer

Guest
Alright, so I found out that you need to go into your SDK manager and (this can be confusing), look at the "Android SDK Build-Tools" tab by clicking "Show package details" at the bottom right. The version installed at the bottom is the one you want. There are other things named "SDK Tools" and "SDK Build" so be careful.

Current problem is this, I think I'm close.

A problem occurred configuring project ':com.companyname.Trolley'.
> Could not resolve all dependencies for configuration ':com.companyname.Trolley:_debugCompile'.
> Could not find com.android.support:support-v4:28.0.1.
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-v4/28.0.1/support-v4-28.0.1.pom
https://jcenter.bintray.com/com/android/support/support-v4/28.0.1/support-v4-28.0.1.jar
file:/C:/Users/Nathan/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/28.0.1/support-v4-28.0.1.pom
file:/C:/Users/Nathan/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/support/support-v4/28.0.1/support-v4-28.0.1.jar
file:/C:/Users/Nathan/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/support-v4/28.0.1/support-v4-28.0.1.pom
file:/C:/Users/Nathan/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/support/support-v4/28.0.1/support-v4-28.0.1.jar
Required by:
:com.companyname.Trolley:unspecifie
 
N

Nathan Archer

Guest
Headed to work now, but pretty sure the next step is to install a bunch of crap in the SDK manager.
 

rIKmAN

Member
Headed to work now, but pretty sure the next step is to install a bunch of crap in the SDK manager.
I know you apologised for multi-posting, but there is no need to bump the thread just to tell us you are going to work.

If you have extra information to add and nobody has replied since your last post then just edit your post and add the information.
No need to keep making new posts within minutes of each other, or 5 in a row without anyone else responding.

Your current error is saying that either support library 28.0.1 isn't installed or that you have the number wrong (in case that version doesn't exist).
 
N

Nathan Archer

Guest
Okay. I'll make sure to avoid bumping and just edit previous posts from now on.

I think I'm close. Last error:

Z:\com.companyname.Trolley\src\main\AndroidManifest.xml:26:3-74:17 Warning:
application@android:label was tagged at AndroidManifest.xml:26 to replace other declarations but no other declaration present
Z:\com.companyname.Trolley\src\main\AndroidManifest.xml:27:5-34:16 Warning:
activity#com.companyname.Trolley.RunnerActivity@android:label was tagged at AndroidManifest.xml:27 to replace other declarations but no other declaration present
:com.companyname.Trolley:processArmeabi-v7aDebugResources
:com.companyname.Trolley:processArmeabiDebugManifest
Z:\com.companyname.Trolley\src\main\AndroidManifest.xml:26:3-74:17 Warning:
application@android:label was tagged at AndroidManifest.xml:26 to replace other declarations but no other declaration present
Z:\com.companyname.Trolley\src\main\AndroidManifest.xml:27:5-34:16 Warning:
activity#com.companyname.Trolley.RunnerActivity@android:label was tagged at AndroidManifest.xml:27 to replace other declarations but no other declaration present
:com.companyname.Trolley:processArmeabiDebugResources
:com.companyname.Trolley:processMipsDebugManifest
Z:\com.companyname.Trolley\src\main\AndroidManifest.xml:26:3-74:17 Warning:
application@android:label was tagged at AndroidManifest.xml:26 to replace other declarations but no other declaration present
Z:\com.companyname.Trolley\src\main\AndroidManifest.xml:27:5-34:16 Warning:
activity#com.companyname.Trolley.RunnerActivity@android:label was tagged at AndroidManifest.xml:27 to replace other declarations but no other declaration present
:com.companyname.Trolley:processMipsDebugResources
:com.companyname.Trolley:processUniversalDebugManifest
Z:\com.companyname.Trolley\src\main\AndroidManifest.xml:26:3-74:17 Warning:
application@android:label was tagged at AndroidManifest.xml:26 to replace other declarations but no other declaration present
Z:\com.companyname.Trolley\src\main\AndroidManifest.xml:27:5-34:16 Warning:
activity#com.companyname.Trolley.RunnerActivity@android:label was tagged at AndroidManifest.xml:27 to replace other declarations but no other declaration present
:com.companyname.Trolley:processUniversalDebugResources
:com.companyname.Trolley:processX86DebugManifest
Z:\com.companyname.Trolley\src\main\AndroidManifest.xml:26:3-74:17 Warning:
application@android:label was tagged at AndroidManifest.xml:26 to replace other declarations but no other declaration present
Z:\com.companyname.Trolley\src\main\AndroidManifest.xml:27:5-34:16 Warning:
activity#com.companyname.Trolley.RunnerActivity@android:label was tagged at AndroidManifest.xml:27 to replace other declarations but no other declaration present
:com.companyname.Trolley:processX86DebugResources
:com.companyname.Trolley:generateDebugSources
:com.companyname.Trolley:incrementalDebugJavaCompilationSafeguard
:com.companyname.Trolley:compileDebugJavaWithJavac
:com.companyname.Trolley:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Z:\com.companyname.Trolley\src\main\java\com\companyname\Trolley\Gamepad\Gamepad.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
:com.companyname.Trolley:compileLint
:com.companyname.Trolley:lint
Ran lint on variant debug: 55 issues found
Ran lint on variant release: 55 issues found
Wrote HTML report to file:///Z:/com.companyname.Trolley/build/outputs/lint-results-debug.html
Wrote XML report to file:///Z:/com.companyname.Trolley/build/outputs/lint-results-debug.xml
:com.companyname.Trolley:lint FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':com.companyname.Trolley:lint'.
> Lint found errors in the project; aborting build.

Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
lintOptions {
abortOnError false
}
}
...

Error log is in the "Z" directory which doesn't exist so I'm stuck.

EDIT: Turning off Lint debug fixes this. Was the last thing I needed to fix. Works now :^)
 
Last edited by a moderator:
Top