Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/110.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何直接运行objcgen在MacOS上进行.NET嵌入_Ios_.net_Visual Studio_Xamarin_Xamarin.ios - Fatal编程技术网

Ios 如何直接运行objcgen在MacOS上进行.NET嵌入

Ios 如何直接运行objcgen在MacOS上进行.NET嵌入,ios,.net,visual-studio,xamarin,xamarin.ios,Ios,.net,Visual Studio,Xamarin,Xamarin.ios,我按照指示在和 我在Mac 10.14.6上安装了Visual Studio 2019 我创建了一个Xamarin.ios类库项目 我安装了Nuget Embeddedinator-4000 我添加了一个helloworld函数:void main(){Console.WriteLine(“helloworld”);} 我建造得没有问题 下一个指令是 …但是没有./packages/directory啊,哈!首先需要构建objcgen工具。我在Github>Embeddedinator-4000

我按照指示在和

  • 我在Mac 10.14.6上安装了Visual Studio 2019
  • 我创建了一个Xamarin.ios类库项目
  • 我安装了Nuget Embeddedinator-4000
  • 我添加了一个helloworld函数:void main(){Console.WriteLine(“helloworld”);}
  • 我建造得没有问题

  • 下一个指令是


  • …但是没有./packages/directory啊,哈!首先需要构建objcgen工具。我在Github>Embeddedinator-4000>README.md>“Building”上找到了如何操作的说明

    摘要--安装.NET到Objective-C转换器

    1.  Clone github > Embeddinator-4000
    git clone https://github.com/mono/Embeddinator-4000.git
    2.  cd into the cloned dir
    3.  Install other stuff:
    git submodule update --recursive --init
    4.  Build the .NET to Objective-C converter:
    cd objcgen
    make
    5.  Build the 'wrapper' (ie. command access) to objcgen (took 10-15 minutes for me):
    make nuget
    6.  Generate Objective-C from your .NET C# class lib
    7.  <somewhere in the bowels of your Mac>/Embeddinator-4000/objcgen/_build/objcgen     <elsewhere in the bowels of your Mac>/hello-from-csharp/hello-from-csharp/bin/Debug/hello_from_csharp.dll --target=framework --platform=iOS --outdir=output -c --debug
    
    1。克隆github>Embeddedinator-4000
    git克隆https://github.com/mono/Embeddinator-4000.git
    2.将cd放入克隆的目录中
    3.安装其他东西:
    git子模块更新--递归--初始化
    4.构建.NET到Objective-C转换器:
    cd objcgen
    制作
    5.构建objcgen的“包装器”(即命令访问权限)(我花了10-15分钟):
    使裸体
    6.从.NET C#类库生成Objective-C
    7.  /embeddedinator-4000/objcgen/_build/objcgen/hello from csharp/hello from csharp/bin/Debug/hello_from_csharp.dll--target=framework--platform=iOS--outdir=output-c--Debug
    

    注意:来自csharp的hello来自

    签入您的bin或obj文件夹
    > Last login: Fri Mar  6 10:05:48 on ttys002
    > DOUGs-MacBook-Pro:Embedding_2020-03-06 dbell$ ls -l total 24
    > -rw-r--r--  1 dbell  staff  2193 Mar  6 09:02 Embedding_2020-03-06.csproj
    > -rw-r--r--  1 dbell  staff   827 Mar  6 08:58 Embedding_2020-03-06.sln
    > -rw-r--r--  1 dbell  staff   249 Mar  6 09:03 HelloWorld.cs drwxr-xr-x  3 dbell  staff    96 Mar  6 08:58 Properties drwxr-xr-x  3 dbell 
    > staff    96 Mar  6 08:58 bin drwxr-xr-x  8 dbell  staff   256 Mar  6
    > 09:03 obj DOUGs-MacBook-Pro:Embedding_2020-03-06 dbell$ ls ./packages
    > ls: ./packages: No such file or directory    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
    > DOUGs-MacBook-Pro:Embedding_2020-03-06 dbell$
    
    1.  Clone github > Embeddinator-4000
    git clone https://github.com/mono/Embeddinator-4000.git
    2.  cd into the cloned dir
    3.  Install other stuff:
    git submodule update --recursive --init
    4.  Build the .NET to Objective-C converter:
    cd objcgen
    make
    5.  Build the 'wrapper' (ie. command access) to objcgen (took 10-15 minutes for me):
    make nuget
    6.  Generate Objective-C from your .NET C# class lib
    7.  <somewhere in the bowels of your Mac>/Embeddinator-4000/objcgen/_build/objcgen     <elsewhere in the bowels of your Mac>/hello-from-csharp/hello-from-csharp/bin/Debug/hello_from_csharp.dll --target=framework --platform=iOS --outdir=output -c --debug