Search Issue Tracker
Fixed in 2021.1.X
Fixed in 2019.4.X, 2020.1.X, 2020.2.X
Votes
0
Found in
2019.3
2019.3.0f6
2020.2
Issue ID
1218580
Regression
No
[Lumin] Building for Lumin ignores raw .C or .CPP plugin files
How to reproduce:
1. Open attached project ("NativeCodeTest.zip")
2. Open "NativeCode.cpp" with Code Editor (Assets->Plugins->NativeCode)
3. Uncomment 2nd line ("If this line is uncommented This should not compile")
4. Open Build Settings (File->Build Settings...)
5. Switch to Standalone Platform, Tick Development Build and Build the project
6. Open a Console window and Observe error (Check notes)
7. Switch to Lumin Platform and Build the project
8. Open a Console window and Observe error (Check notes)
Expected result: Errors are the same, raw .C or .CPP files are included
Actual result: Errors differ, raw .C or .CPP files are not included
Reproducible with: 2019.3.6f1, 2020.1.0a4, 2020.2.0a4
Could not test with: 2017.4.38f1, 2018.4.19f1 (No Lumin or IL2CPP support)
Notes:
- Error on Standalone platform:
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: NativeCode.cpp
F:\UnityP\New folder\case_1218580-NativeCodeTest\Temp\StagingArea\Data\il2cppOutput\NativeCode.cpp(2): error C2065: 'If': undeclared identifier
F:\UnityP\New folder\case_1218580-NativeCodeTest\Temp\StagingArea\Data\il2cppOutput\NativeCode.cpp(2): error C2143: syntax error: missing ';' before 'this'
....
- Error on Lumin platform
linker stderr :F:/UnityP/New folder/case_1218580-NativeCodeTest/Library/il2cpp_cache/il2cpp_cache/0792C9C6CA29A3061844315E0D8A454E.o: In function `NativeCodeWrapper_AddTwoNumbers_m9B1F0A7455261CC22A581378A3684571B0AFBA84':
F:\UnityP\New folder\case_1218580-NativeCodeTest\Temp\StagingArea\Data\il2cppOutput\Assembly-CSharp-firstpass.cpp:(.text.NativeCodeWrapper_AddTwoNumbers_m9B1F0A7455261CC22A581378A3684571B0AFBA84+0x6c): undefined reference to `AddTwoNumbers'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Text Settings Inspector sections names have no padding
- UI elements shrinking, misaligned buttons, swapped icons, or incorrect styles when rapidly cycling through Scenes in the Player
- Text field does not disappear if Ctrl+Z is pressed while editing text
- CullingResults.GetShadowCasterBounds Results Remain Unchanged Despite Restricting Affected Objects with Rendering Layers
- Water Surface renders rectangular shape when the Camera is relatively close to the surface
Resolution Note (fix version 2021.1):
Fixed with 2021.1.0a2.727, backported to 2020.2.0b14, 2020.1.16f1, 2019.4.16f1