Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xcode compile error when using .Net 4.6 backend in Unity #31

Closed
IDobrinescu opened this issue Dec 20, 2017 · 6 comments
Closed

Xcode compile error when using .Net 4.6 backend in Unity #31

IDobrinescu opened this issue Dec 20, 2017 · 6 comments

Comments

@IDobrinescu
Copy link

After i (successfully) build my Unity project, the demo project fails to compile:

/Users/ionutdobrinescu/Development/UnityIntegration/V2/iOSProject/DemoApp/Unity/Classes/Native/Bulk_System.Configuration_0.cpp:25861:85: error: no member named 'Configuration' in namespace 'il2cpp::icalls::System'
return ((InternalConfigurationHost_get_bundled_app_config_m1191888808_ftn)System::Configuration::System::Configuration::InternalConfigurationHost::get_bundled_app_config) ();

I have some external frameworks that i use and i tried to link them but this doesn't seem to be the problem.

screen shot 2017-12-20 at 18 45 29

Do you have any ideea how to solve this?

@jiulongw
Copy link
Owner

This looks weird: System::Configuration::System::Configuration.

Which Unity / Xcode version do you use?

In Unity, which .net framework version did you use?

When building Unity, did you choose "Append" or "Replace"?

My gut feeling is the il2cpp files are messed around in the Native folder. Try to create a clean unity build. If not, I'd be happy to take a look at your project to repro it (if you don't mind).

@jiulongw
Copy link
Owner

I deleted original comment regarding building unity project directly... It was for another issue. I posted in the wrong thread.

@IDobrinescu
Copy link
Author

IDobrinescu commented Dec 21, 2017

Ok, after some more testing i found out that using .Net 4.6 seems to cause this problem. I tested it using Unity 2017.3.f02 and Unity 2017.3.f03 with the same results. Unfortunately my Unity project uses .Net 4.6 and it would be really hard to go back to 3.5. Is there a way to solve this problem?
Note: I use Xcode 9.2
Also you can reproduce this issue on your demo app too, just change the .Net version to 4.6

@jiulongw
Copy link
Owner

Yes. There is a comment in Unity.xcconfig which reads:

// If using .net 4.0 in Unity, append -DNET_4_0 to OTHER_CFLAGS

@jiulongw
Copy link
Owner

If vanilla Unity project can be built but Swift project throws errors. Usually it is caused by different compiler / linker flags...

@jiulongw jiulongw changed the title error: no member named 'Configuration' in namespace 'il2cpp::icalls::System' Xcode compile error when using .Net 4.6 backend in Unity Dec 22, 2017
@jiulongw
Copy link
Owner

Feel free to re-open this issue if you still have problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants