Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#828 closed enhancement (complete)

DLL exports

Reported by: fdupont Owned by:
Priority: medium Milestone:
Component: Unclassified Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DNS Feature Depending on Ticket:
Estimated Difficulty: 0.0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


The idea is to build a DLL per library directory.
Classes and functions must be exported, there are several ways but only
__declspec(dllimport/dllexport) works well with C++.
The common way is to add in .h files:

#ifdef _WIN32
#define LIBSPEC __declspec(dllexport)
#define LIBSPEC __declspec(dllimport)
#define LIBSPEC

with a LIBSPEC in all class/function declarations.

and in .cc before the #include of the corresponding


Choices are:

  • _WIN32 or WIN32 or other: the first is declared by default, the second or other must be added in project files
  • add a && !defined(STATICLIB) but will be any library compiled static?
  • the XXX, the name of the library path? Append LIB_? SRC_LIB? BIND10_SRC_LIB?
  • the name LIBSPEC

When the choices will be done, all .h and .cc in src/lib will be updated.


Change History (5)

comment:1 in reply to: ↑ description Changed 9 years ago by fdupont

In fact it is a bad idea: the DLL system was designed for C and doesn't work well with C++, for instance an exception should not escape from a DLL. The constraints seems to be very similar to a C wrapper one so IMHO we should give up until the idea of a C wrapper comes back...
I suggest to close the ticket.

comment:2 Changed 9 years ago by stephen

  • Milestone set to New Tasks

comment:3 Changed 9 years ago by fdupont

Please close the ticket (or allow me to close it).

comment:4 Changed 9 years ago by stephen

  • Defect Severity set to N/A
  • Resolution set to complete
  • Status changed from new to closed
  • Sub-Project set to DNS

comment:5 Changed 9 years ago by shane

  • Milestone New Tasks deleted
Note: See TracTickets for help on using tickets.