Skip to content

Added a libfreenect2_api export macro - to apply __declspec(dllexport) i... #69

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include <stddef.h>
#include <stdint.h>

#include <libfreenect2/libfreenect2_export.h>
#include <libfreenect2/frame_listener.hpp>
#include <libfreenect2/packet_processor.h>

Expand All @@ -45,10 +46,10 @@ struct DepthPacket

typedef PacketProcessor<DepthPacket> BaseDepthPacketProcessor;

class DepthPacketProcessor : public BaseDepthPacketProcessor
class LIBFREENECT2_API DepthPacketProcessor : public BaseDepthPacketProcessor
{
public:
struct Config
struct LIBFREENECT2_API Config
{
float MinDepth;
float MaxDepth;
Expand Down Expand Up @@ -109,7 +110,7 @@ class DepthPacketProcessor : public BaseDepthPacketProcessor

class OpenGLDepthPacketProcessorImpl;

class OpenGLDepthPacketProcessor : public DepthPacketProcessor
class LIBFREENECT2_API OpenGLDepthPacketProcessor : public DepthPacketProcessor
{
public:
OpenGLDepthPacketProcessor(void *parent_opengl_context_ptr);
Expand Down Expand Up @@ -139,7 +140,7 @@ class OpenGLDepthPacketProcessor : public DepthPacketProcessor
// use pimpl to hide opencv dependency
class CpuDepthPacketProcessorImpl;

class CpuDepthPacketProcessor : public DepthPacketProcessor
class LIBFREENECT2_API CpuDepthPacketProcessor : public DepthPacketProcessor
{
public:
CpuDepthPacketProcessor();
Expand Down
5 changes: 3 additions & 2 deletions examples/protonect/include/libfreenect2/frame_listener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
#define FRAME_LISTENER_HPP_

#include <cstddef>
#include <libfreenect2/libfreenect2_export.h>

namespace libfreenect2
{

struct Frame
struct LIBFREENECT2_API Frame
{
enum Type
{
Expand All @@ -58,7 +59,7 @@ struct Frame
}
};

class FrameListener
class LIBFREENECT2_API FrameListener
{
public:
virtual ~FrameListener();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ typedef std::map<Frame::Type, Frame*> FrameMap;

class SyncMultiFrameListenerImpl;

class SyncMultiFrameListener : public FrameListener
class LIBFREENECT2_API SyncMultiFrameListener : public FrameListener
{
public:
SyncMultiFrameListener(unsigned int frame_types);
Expand Down
5 changes: 3 additions & 2 deletions examples/protonect/include/libfreenect2/libfreenect2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,15 @@
#ifndef LIBFREENECT2_HPP_
#define LIBFREENECT2_HPP_

#include <libfreenect2/libfreenect2_export.h>
#include <libfreenect2/frame_listener.hpp>

namespace libfreenect2
{

class PacketPipeline;

class Freenect2Device
class LIBFREENECT2_API Freenect2Device
{
public:
static const unsigned int VendorId = 0x045E;
Expand Down Expand Up @@ -70,7 +71,7 @@ class Freenect2Device

class Freenect2Impl;

class Freenect2
class LIBFREENECT2_API Freenect2
{
public:
Freenect2(void *usb_context = 0);
Expand Down
36 changes: 36 additions & 0 deletions examples/protonect/include/libfreenect2/libfreenect2_export.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* This file is part of the OpenKinect Project. http://www.openkinect.org
*
* Copyright (c) 2014 individual OpenKinect contributors. See the CONTRIB file
* for details.
*
* This code is licensed to you under the terms of the Apache License, version
* 2.0, or, at your option, the terms of the GNU General Public License,
* version 2.0. See the APACHE20 and GPL2 files for the text of the licenses,
* or the following URLs:
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.gnu.org/licenses/gpl-2.0.txt
*
* If you redistribute this file in source form, modified or unmodified, you
* may:
* 1) Leave this header intact and distribute it under the same terms,
* accompanying it with the APACHE20 and GPL20 files, or
* 2) Delete the Apache 2.0 clause and accompany it with the GPL2 file, or
* 3) Delete the GPL v2 clause and accompany it with the APACHE20 file
* In all cases you must keep the copyright notice intact and include a copy
* of the CONTRIB file.
*
* Binary distributions must follow the binary distribution requirements of
* either License.
*/

#ifndef LIBFREENECT2EXPORT_H
#define LIBFREENECT2EXPORT_H

#ifdef _WIN32
# define LIBFREENECT2_API __declspec(dllexport)
#else
# define LIBFREENECT2_API
#endif

#endif // LIBFREENECT2EXPORT_H
3 changes: 2 additions & 1 deletion examples/protonect/include/libfreenect2/opengl.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@
#ifndef OPENGL_H_
#define OPENGL_H_

#include <libfreenect2/libfreenect2_export.h>
#include <GL/glew.h>
#include <GLFW/glfw3.h>

namespace libfreenect2
{

struct OpenGLContext
struct LIBFREENECT2_API OpenGLContext
{
GLFWwindow *glfw_ctx;
GLEWContext *glew_ctx;
Expand Down
5 changes: 3 additions & 2 deletions examples/protonect/src/tinythread/tinythread.h
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ freely, subject to the following restrictions:
#endif
#endif

#include <libfreenect2/libfreenect2_export.h>

/// Main name space for TinyThread++.
/// This namespace is more or less equivalent to the @c std namespace for the
Expand Down Expand Up @@ -389,7 +390,7 @@ class lock_guard {
/// cond.notify_all();
/// }
/// @endcode
class condition_variable {
class LIBFREENECT2_API condition_variable {
public:
/// Constructor.
#if defined(_TTHREAD_WIN32_)
Expand Down Expand Up @@ -478,7 +479,7 @@ class condition_variable {


/// Thread class.
class thread {
class LIBFREENECT2_API thread {
public:
#if defined(_TTHREAD_WIN32_)
typedef HANDLE native_handle_type;
Expand Down