openframeworks / openframeworks/openFrameworks

Feature request : OF_EXPORTS / OF_EXPORTS_ENABLED

Open
#5,499 15 comments 1 reaction 1 assignee View on GitHub

@elliotwoods is already working on this.

Since May 21, 2017.

core development-strategy
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

I'd like to add the following to ofConstants.h:

#ifdef OF_EXPORTS_ENABLED
	#define OF_EXPORTS __declspec(dllexport)
#else
	#define OF_EXPORTS
#endif

and in front of each class / function definition:

class OF_EXPORTS ofNode {
public:

Then we could more easily use openFrameworks in DLL / shared library contexts,

Alternatively in ofConstants.h we could have:

#ifndef OF_EXPORTS
    #define OF_EXPORTS
#endif

(i.e. it's completely up to the user how they perform the exports)

The main issue is adding OF_EXPORTS everywhere. Since it's not good for the user to do this themselves

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.