Skip to content

Should C# plugin(win) be a single cspomelo.dll instead of two DLLs (cspomelo.dll and libpomelo2.dll) ? #49

@iamchenxin

Description

@iamchenxin

I try to complie the unity plugin,and thought that a single cspomelo.dll maybe the common ways for unity plugins.
And in my vs2015, multiple DLLS way do not work yet
'''
gyp --depth=. pomelo.gyp -Dbuild_cspomelo=true -Dpomelo_library=shared_library
'''
failed with some link errors.

I thought the best command to indicate to generate a DLL for c# plugin should simply like this (and it generate a single dll )
'''
gyp --depth=. pomelo.gyp -Dbuild_cspomelo=true
'''
But there are some problems for me:VS-PRB: Can't Export from Static Libraries
To export functions to DLL from static library in VC .
It must ,either recomplie static library with __declspec(dllexport) for all the functions to be exported ,or write a handy .def files to export.

So how can i make gpy to generate the right sln automatically? i saw the pomelo.gyp file,but cause i did not know gyp before,so i have no clue.
(
Things i want to do is that
define BUILDING_PC_SHARED in project <libpomelo2> automatically
by command gyp --depth=. pomelo.gyp -Dbuild_cspomelo=true,
so the static library libpomelo2.lib will be compiled with __declspec(dllexport)
).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions