.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: 17
Without showing us the offending code, and the specific error(s), all we can give you is a generic response.

Looks like a case of cascading errors. Fix the first error. Try compiling again. Lather, rinse, repeat.
 
Without showing us the offending code, and the specific error(s), all we can give you is a generic response.

Looks like a case of cascading errors. Fix the first error. Try compiling again. Lather, rinse, repeat.
Thanks for the response ,
Have already fixed 35k errors , which cause broken trampoline.g.cs file.Need help to make proper .dll file.
 
If you have already fixed the errors, then tell us what the new problem is that makes you say that the file is broken?
 
If you have already fixed the errors, then tell us what the new problem is that makes you say that the file is broken?
This is what it gives me after solving all error.Please check image.
This errors are shown from the system generated trampoline.g.cs file.I don't know how to solve that.
 

Attachments

  • error.png
    error.png
    118.8 KB · Views: 11
So trampoline.g.cs is still broken. Why did you say that you already fixed the errors?

This brings us back to my post #2: Without seeing the contents of the file, it's really hard for us to help you. Show us the contents of the file and the first few errors. It looks like you have cascading errors. You'll need to fix the first error and then see what the new crop of errors comes out.

(As an aside, a quick Google search reveals that about 4 years ago, people were reporting issues with Xamarin for iOS having issues generating the trampoline file if the calls involved some native code. Perhaps MS still hasn't fixed those issues.)
 
So trampoline.g.cs is still broken. Why did you say that you already fixed the errors?

This brings us back to my post #2: Without seeing the contents of the file, it's really hard for us to help you. Show us the contents of the file and the first few errors. It looks like you have cascading errors. You'll need to fix the first error and then see what the new crop of errors comes out.

(As an aside, a quick Google search reveals that about 4 years ago, people were reporting issues with Xamarin for iOS having issues generating the trampoline file if the calls involved some native code. Perhaps MS still hasn't fixed those issues.)
This are the steps through which I am trying to get .dll file

Will be sharing video of the whole process soon or can we connect through anydesk.Thanks for support
 
You are still not sharing your code. You are just sharing how you are creating your code. Please post the contents of trampoline.g.cs as well as the first few errors you are getting.
 
You are still not sharing your code. You are just sharing how you are creating your code. Please post the contents of trampoline.g.cs as well as the first few errors you are getting.
Please refer this project.Thanks
 

Attachments

  • TestLttsProj.zip
    638.8 KB · Views: 9
*sigh* Just dumping ALL of your code like that is not very helpful. It doesn't really motivate anyone to try to help you.

Anyway, C# syntax is to like C or C++. You can't declare a method with just the parameter types like you do below:
C#:
static extern uint __builtin_bswap32 (uint);

The error that comes back is correct and accurate:
C#:
CS1001    Identifier expected

And the following is not valid C#:
C#:
static extern int __fpclassifyl ([unsupported Builtin: long double]);

Again, the errors that come back is correct and accurate because the compiler doesn't know what to do with that line:
C#:
CS1003    Syntax error, ',' expected
CS1001    Identifier expected
CS1003    Syntax error, ']' expected
CS1001    Identifier expected
CS1003    Syntax error, ',' expected
CS1001    Identifier expected
CS1002    ; expected
CS1026    ) expected
CS1519    Invalid token ']' in class, record, struct, or interface member declaration
 
*sigh* Just dumping ALL of your code like that is not very helpful. It doesn't really motivate anyone to try to help you.

Anyway, C# syntax is to like C or C++. You can't declare a method with just the parameter types like you do below:
C#:
static extern uint __builtin_bswap32 (uint);

The error that comes back is correct and accurate:
C#:
CS1001    Identifier expected

And the following is not valid C#:
C#:
static extern int __fpclassifyl ([unsupported Builtin: long double]);

Again, the errors that come back is correct and accurate because the compiler doesn't know what to do with that line:
C#:
CS1003    Syntax error, ',' expected
CS1001    Identifier expected
CS1003    Syntax error, ']' expected
CS1001    Identifier expected
CS1003    Syntax error, ',' expected
CS1001    Identifier expected
CS1002    ; expected
CS1026    ) expected
CS1519    Invalid token ']' in class, record, struct, or interface member declaration
Thanks for your response, but let me clear one thing I am not C# developer I am an iOS developer and I want to make it clear that I need to generate .dll file hope that is clear to you too. Now lets come to my code and I have told in my one of the post that the generated code is not coded by me and its generated from Objective-C static Library i.e (.a) file generated in Xcode.

This the document which I followed , I need to know why the code generated is giving me this all errors , is anyone there with this answer.
Please note:Code is been generated from Static Library and not manually coded.The project is made in Objective-C.Please go through above link.
 
Last edited:
See:

In some cases these generated files might be all you need, however more often the developer will need to manually modify these generated files to fix any issues that could not be automatically handled by the tool (such as those flagged with a Verify attribute).

In other words, the tool can't do everything for you. You'll need to manually fix the manually generated files.
 
See:



In other words, the tool can't do everything for you. You'll need to manually fix the manually generated files.
Thanks for the suggestion.
I have tried to solve it by myself but that lead me to breaking system files.Can you help me solve this errors manually.If you can that would be a great help to me.
 
I am actually anti-Apple. I don't believe in their closed garden approach. I grudgingly have a MacBook for work, an iPad for my kids school, and an iPhone to manage that iPad (for a child) because apparently you can't do parental controls on an iPad and have it as a standalone device.

Hopefully someone will help you.
 
Last edited:
I think that if you post some of the relevant bits of code bit by bit, as well as documentation about what native APIs those methods are mapping to, we might be able to help you one step at a time, and teach you what C# is expecting to see vs. what the underlying API offers up.
 
Back
Top Bottom