.dll file generation issue

Hinal Modi

Member
Joined
Oct 17, 2022
Messages
15
Programming Experience
1-3
Hello,

I have developed an app in iOS and I need to create .dll file to develop app in xamarian.iOS. For that purpose I convert my app to

Objective-C static Library to generate .a FAT file , after generating .a file I have created Xamarian.iOS application that uses binding

which includes all our functions and classes. After including binding when I run the project it gives me thousands of error. Even after solving

all this error my trampoline.g.cs file if shown broken.Can anyone help me with this?

Thanks In Advance
 

Attachments

  • error.png
    error.png
    118.8 KB · Views: 7

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
6,561
Location
Chesapeake, VA
Programming Experience
10+
Why you were expecting that comment out the code that was causing errors would lead to a usable trampoline.g.cs?
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
6,561
Location
Chesapeake, VA
Programming Experience
10+
Show us the contents of this file and the specific errors. Please post those as text in code tags, not as a screen shot.
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
6,561
Location
Chesapeake, VA
Programming Experience
10+
I believe trampoline.c.gs is a system file
In the .NET world, files with the extension of .g.cs or .g.vb are automatically generated files. I believe that I noted earlier in this thread that there were known issues in older versions of the tools.
 

Hinal Modi

Member
Joined
Oct 17, 2022
Messages
15
Programming Experience
1-3
Show us the contents of this file and the specific errors. Please post those as text in code tags, not as a screen shot.
C#:
Error: Trampolines.g.cs(25,25): Error CS1056: Unexpected character '`' (CS1056)
code that causes the error :
C#:
if (del != null)
                    del ((System.Action`1[Foundation.NSArray`1[lttsNavigationSDK.UIMenuElement]]) Marshal.GetDelegateForFunctionPointer (obj, typeof (System.Action`1[Foundation.NSArray`1[lttsNavigationSDK.UIMenuElement]])));
            }
This is a one in a hundred mistake.
 
Last edited by a moderator:

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
6,561
Location
Chesapeake, VA
Programming Experience
10+
Looks like the bugs in generating the trampoline.g.cs are still present. The error is correct that the backtick character is unexpected. In fact, it not valid in C# except within strings.
 

Hinal Modi

Member
Joined
Oct 17, 2022
Messages
15
Programming Experience
1-3
Looks like the bugs in generating the trampoline.g.cs are still present. The error is correct that the backtick character is unexpected. In fact, it not valid in C# except within strings.
How do we handle this? Since I am not an expert in C#, I cannot fix this kind of issue.
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
6,561
Location
Chesapeake, VA
Programming Experience
10+
You don't need to be an expert in C#. You just need enough knowledge to understand what those backtick followed by a number represent. Considering how much more complex Objective C is compared to C#, the learning curve should not be to steep.
 

Hinal Modi

Member
Joined
Oct 17, 2022
Messages
15
Programming Experience
1-3
You don't need to be an expert in C#. You just need enough knowledge to understand what those backtick followed by a number represent. Considering how much more complex Objective C is compared to C#, the learning curve should not be to steep.
How am I able to resolve and escape this problem, please, in the shortest and clearest terms possible? Are you able to assist me with this, or do you know of anyone else who might, it would be very appreciated.
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
6,561
Location
Chesapeake, VA
Programming Experience
10+
As noted you'll need to learn how the C# compiler generates it internal names for generics. Here's a link to that information:

To speed up your search, look for the word "backtick" to focus on generics, but very likely you'll also need to learn about non-generic names as well.
 
Top Bottom