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

Clang++ Linking Error When Compiling MAUI App for Mac #22035

Open
jfversluis opened this issue Jan 23, 2025 · 0 comments
Open

Clang++ Linking Error When Compiling MAUI App for Mac #22035

jfversluis opened this issue Jan 23, 2025 · 0 comments

Comments

@jfversluis
Copy link
Member


Issue moved from dotnet/maui#27320


From @LuisGuerra89 on Thursday, January 23, 2025 8:25:19 PM

When trying to compile my .NET MAUI app for Mac, I get the following error:

1>Xamarin.Shared.Sdk.targets(1641,3): Error  : clang++ exited with code 1:
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Environment
.NET SDK Version: 8.0.405

Installed Workloads:

Installed Workload Id      Installation Source
----------------------------------------------
ios                        SDK 8.0.400
maui                       SDK 8.0.400
android                    SDK 8.0.400

Xcode Version: 15.2
iOS SDK Version: 17

Issue:
From my understanding, this issue seems related to the workloads pointing to iOS SDK 18, which is not an option for me to upgrade to at the moment.

I attempted to force a specific workload version by following the solution suggested in [this issue], but with .NET 8.0.405, I still encountered the same error.

When trying to install a forced version dotnet workload install maui android ios --version 8.0.402.0 with .NET 8.0.402 instead, I received the following warning during installation:

Warning: Workload garbage collection failed with error: Workload version 8.0.402-baseline.24467.1 was not found.
Request

Has anyone encountered this issue before? Any suggestions or workarounds to force the correct workload version or fix the linker issue would be greatly appreciated. @jfversluis

Thanks in advance! 🙏

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

1 participant