Skip to content

c_sync wrapper DLL does not export any functions #315

@samkristoff

Description

@samkristoff

When building the C_Sync wrapper on windows using VS2010 a libfreenect_sync.dll is created by one of the build in VS projects, however no functions are exported so the DLL cannot be called from another application.

I was able to export functions by adding the following to libfreenect_sync.h:

/// If Win32, export all functions for DLL usage
#ifndef _WIN32
  #define FREENECTAPI_SYNC /**< DLLExport information for windows, set to nothing on other platforms */
#else
  /**< DLLExport information for windows, set to nothing on other platforms */
  #ifdef __cplusplus
    #define FREENECTAPI_SYNC extern "C" __declspec(dllexport)
  #else
    // this is required when building from a Win32 port of gcc without being
    // forced to compile all of the library files (.c) with g++...
    #define FREENECTAPI_SYNC __declspec(dllexport)
  #endif
#endif

and then adding "FREENECTAPI_SYNC" (without quotes) in front of each function I wanted to export in libfreenect_sync.c

I'm not sure if there is a reason this is not included by default so I'll defer to someone with more knowledge of the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions