Skip to content

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

Open

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)
).

Activity

  1. changed the title [-]Should C# plugin be a single cspomelo.dll instead of two DLLs (cspomelo.dll and libpomelo2.dll) ?[/-] [+]Should C# plugin(win) be a single cspomelo.dll instead of two DLLs (cspomelo.dll and libpomelo2.dll) ?[/+] on Oct 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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