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

Link Error When Building Native Static Libraries with NativeAOT #6468

Closed
1 task done
floydchenv opened this issue Dec 12, 2023 · 1 comment
Closed
1 task done

Link Error When Building Native Static Libraries with NativeAOT #6468

floydchenv opened this issue Dec 12, 2023 · 1 comment

Comments

@floydchenv
Copy link

floydchenv commented Dec 12, 2023

Target framework

  • .NET Standard 8.0
    Error during linking when building native lib with dotnet publish
    dotnet publish -c Release -r win-x64 -p:PublishAot=true -p:NativeLib=Static

When I attempt to build my native library using dotnet publish /p:NativeLib=Static, I encounter an error during the C++ linking process. Could you please help me identify the issue? The specific error message is as follows:
LoadLibrary.cpp linker generated manifest res * : fatal error LNK1241: resource file ETWCaptureLib.lib(ETWCaptureLib.obj) already specified
289910464-54fbc2a1-eac9-40c4-8c7f-36e9ac93f1a4
289910524-0925a2c2-6f51-4e9d-92ac-d868309b2eae
289910816-f7693a0b-684b-4961-831f-65b581976f57
This is my project file
STATIC_LIB_LINK_ERROR.zip

@hzgotb
Copy link

hzgotb commented Dec 27, 2023

在csproj里加<IlcGenerateWin32Resources>false</IlcGenerateWin32Resources>

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