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

Examples of Linux C++ app using DLLexport-ed C# DLL #200

Open
RejectKid opened this issue Jan 20, 2022 · 4 comments
Open

Examples of Linux C++ app using DLLexport-ed C# DLL #200

RejectKid opened this issue Jan 20, 2022 · 4 comments
Labels

Comments

@RejectKid
Copy link

. . .

The question is related to:

  • DllExport -version: 1.7.4
  • Copy-paste from Data tab:
Installed: True; 1.7.4+c1cc52f; invoked: 1.7.4
Project type: Cs
Storage: ProjectFiles
Compiler.Platform: Auto
Compiler.ordinalsBase: 1
Compiler.rSysObj: False
Compiler.ourILAsm: False
Compiler.customILAsm: 
Compiler.genExpLib: False
Compiler.peCheck: PeIl
Compiler.patches: None
PreProc.Type: None
PreProc.Cmd: 
PostProc.Type: None
PostProc.ProcEnv: $(SolutionPath);$(MSBuildThisFileFullPath)
PostProc.Cmd: 
SignAssembly: 
Identifier: 090A6B9F-530D-44C0-8C15-006EAEF5555E
Instance: C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\MSBuild.exe
Project path: C:\Projects\DLLExportTest\DLLExportTest\DLLExportTest.csproj
Action: Configure
PlatformTarget: 
TargetFramework: netstandard2.0
TargetFrameworks: 
TargetFrameworkVersion: 
RootNamespace: 
AssemblyName: 
MgrArgs: 
MetaLib: tools\raw\lib\net20\DllExport.dll
MetaCor: tools\raw\lib\netstd\DllExport.dll
Proxy: 
StoragePath: .net.dllexport.targets
ddNS: DLLExportTest
ddNS max buffer: 500
UseCecil: True
intermediateFiles: False
timeout: 30000
Options: None
RootPath: C:\Projects\DLLExportTest\
PkgPath: C:\Projects\DLLExportTest\packages\\DllExport.1.7.4\
SlnFile: 
SlnDir: C:\Projects\DLLExportTest\
DxpTarget: tools\net.r_eg.DllExport.targets
MsgGuiLevel: -1
LockIfError: 

QUESTION:

I followed your example(s) in creating a C# DLL and using it in a C++ application (all successfully super duper awesome!!) I was wondering would (im not a huge linux guy sorry ahead for dumb questions) a linux C++ application be built the same way? My guess is no since i needed to include a include for Windows.h. but my guess would be there is an analogous header to use in linux land?

Or is this not possible with the current tooling? Or if it is is possible there an example of this?

@3F
Copy link
Owner

3F commented Jan 20, 2022

Linux is not supported yet by this tool including my custom assembler on coreclr which was released only for windows today.
But actually I'm not really want to add this support even in future because of modern unmanaged delegates. Time will tell.

@RejectKid
Copy link
Author

gotcha. Well if you ever have the drive I think it'd be cool. Ive been trying to follow this and its just not as easy as your tool :-)

@Poshjark
Copy link

Poshjark commented Jul 6, 2023

because of modern unmanaged delegates

@3F What did you exactly mean here? Obtaining delegate using nethost lib ?

For context: I'm looking for the way to use functions from dll created from C#-code on Linux OS in C++ code. So i've found two ways - mentioned Obtaining delegate using nethost lib and Native AOT Technology . As i understood your tool (DllExport) can't be used in my case?

@3F
Copy link
Owner

3F commented Sep 20, 2023

@Poshjark
https://devblogs.microsoft.com/dotnet/announcing-net-5-0-preview-5/

This tool/repo provides only windows support at current day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants