diff --git a/CMakeLists.txt b/CMakeLists.txt index 90564bae0..0a3518b48 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ include(GNUInstallDirs) set(SRC_SHARED "support-lib/djinni_common.hpp" + "support-lib/project_export.hpp" "support-lib/proxy_cache_interface.hpp" "support-lib/proxy_cache_impl.hpp" ) diff --git a/README.md b/README.md index 31e32f978..b35b171e8 100644 --- a/README.md +++ b/README.md @@ -515,6 +515,23 @@ In order to do that, there are two steps needed: - deriving the records that should be parcelable with the keyword parcelable: `deriving(parcelable)` - run Djinni with the following flag `--java-implement-android-os-parcelable true` +## Support for `-fvisibility=hidden` and `-fvisibility=default` + +You can pass `-fvisibility=hidden` or the `-fvisibility=default` flags to your compiler, Djinni handles both cases well. + +The symbols that are belonging to the public interfaces that are generated by Djinni are automatically defined to be visible symbols. +To achieve this Djinni is marking the generated code with `PROJECT_EXPORT`. +`PROJECT_EXPORT` is defined in `support-lib/project_export.hpp`. +This macro is using the correct attribute specifier for the actual compiler. For more details, please check the macro definition in the `support-lib/project_export.hpp` header. + +Since the generated headers are including this `support-lib/project_export.hpp` header, you must distribute this header together with your library that is using Djinni. + +### Windows + +For Windows builds, you must define `BUILDING_DLL` based on your needs. +You can define it as a compiler option like `-DBUILDING_DLL`. +For more details, please check the macro definition in the `support-lib/project_export.hpp` header. + ## Community Links * Join the discussion with other developers at the [Mobile C++ Slack Community](https://mobilecpp.herokuapp.com/) diff --git a/src/source/CppGenerator.scala b/src/source/CppGenerator.scala index d253dda3a..2b3b8521f 100644 --- a/src/source/CppGenerator.scala +++ b/src/source/CppGenerator.scala @@ -59,6 +59,7 @@ class CppGenerator(spec: Spec) extends Generator(spec) { val refs = new CppRefs(ident.name) val self = marshal.typename(ident, e) + refs.hpp.add("#include \"project_export.hpp\"") if (spec.cppEnumHashWorkaround) { refs.hpp.add("#include ") // needed for std::hash } @@ -101,7 +102,7 @@ class CppGenerator(spec: Spec) extends Generator(spec) { wrapNamespace(w, "std", (w: IndentWriter) => { w.wl("template <>") - w.w(s"struct hash<$fqSelf>").bracedSemi { + w.w(s"struct PROJECT_EXPORT hash<$fqSelf>").bracedSemi { w.w(s"size_t operator()($fqSelf type) const").braced { w.wl(s"return std::hash<$underlyingType>()(static_cast<$underlyingType>(type));") } @@ -177,7 +178,7 @@ class CppGenerator(spec: Spec) extends Generator(spec) { if (shouldConstexpr(c)){ w.w(s"${marshal.fieldType(c.ty)} constexpr $selfName::${idCpp.const(c.ident)}") } else { - w.w(s"${marshal.fieldType(c.ty)} const $selfName::${idCpp.const(c.ident)} = ") + w.w(s"PROJECT_EXPORT ${marshal.fieldType(c.ty)} const $selfName::${idCpp.const(c.ident)} = ") writeCppConst(w, c.ty, c.value) } w.wl(";") @@ -188,6 +189,7 @@ class CppGenerator(spec: Spec) extends Generator(spec) { val refs = new CppRefs(ident.name) r.fields.foreach(f => refs.find(f.ty, false)) r.consts.foreach(c => refs.find(c.ty, false)) + refs.hpp.add("#include \"project_export.hpp\"") refs.hpp.add("#include ") // Add for std::move val self = marshal.typename(ident, r) @@ -202,13 +204,13 @@ class CppGenerator(spec: Spec) extends Generator(spec) { // C++ Header def writeCppPrototype(w: IndentWriter) { if (r.ext.cpp) { - w.w(s"struct $self; // Requiring extended class") + w.w(s"struct PROJECT_EXPORT $self; // Requiring extended class") w.wl w.wl } writeDoc(w, doc) writeCppTypeParams(w, params) - w.w("struct " + actualSelf + cppFinal).bracedSemi { + w.w("struct PROJECT_EXPORT " + actualSelf + cppFinal).bracedSemi { generateHppConstants(w, r.consts) // Field definitions. for (f <- r.fields) { @@ -218,18 +220,18 @@ class CppGenerator(spec: Spec) extends Generator(spec) { if (r.derivingTypes.contains(DerivingType.Eq)) { w.wl - w.wl(s"friend bool operator==(const $actualSelf& lhs, const $actualSelf& rhs);") - w.wl(s"friend bool operator!=(const $actualSelf& lhs, const $actualSelf& rhs);") + w.wl(s"PROJECT_EXPORT friend bool operator==(const $actualSelf& lhs, const $actualSelf& rhs);") + w.wl(s"PROJECT_EXPORT friend bool operator!=(const $actualSelf& lhs, const $actualSelf& rhs);") } if (r.derivingTypes.contains(DerivingType.Ord)) { w.wl - w.wl(s"friend bool operator<(const $actualSelf& lhs, const $actualSelf& rhs);") - w.wl(s"friend bool operator>(const $actualSelf& lhs, const $actualSelf& rhs);") + w.wl(s"PROJECT_EXPORT friend bool operator<(const $actualSelf& lhs, const $actualSelf& rhs);") + w.wl(s"PROJECT_EXPORT friend bool operator>(const $actualSelf& lhs, const $actualSelf& rhs);") } if (r.derivingTypes.contains(DerivingType.Eq) && r.derivingTypes.contains(DerivingType.Ord)) { w.wl - w.wl(s"friend bool operator<=(const $actualSelf& lhs, const $actualSelf& rhs);") - w.wl(s"friend bool operator>=(const $actualSelf& lhs, const $actualSelf& rhs);") + w.wl(s"PROJECT_EXPORT friend bool operator<=(const $actualSelf& lhs, const $actualSelf& rhs);") + w.wl(s"PROJECT_EXPORT friend bool operator>=(const $actualSelf& lhs, const $actualSelf& rhs);") } // Constructor. @@ -322,13 +324,15 @@ class CppGenerator(spec: Spec) extends Generator(spec) { refs.find(c.ty, true) }) + refs.hpp.add("#include \"project_export.hpp\"") + val self = marshal.typename(ident, i) val methodNamesInScope = i.methods.map(m => idCpp.method(m.ident)) writeHppFile(ident, origin, refs.hpp, refs.hppFwds, w => { writeDoc(w, doc) writeCppTypeParams(w, typeParams) - w.w(s"class $self").bracedSemi { + w.w(s"class PROJECT_EXPORT $self").bracedSemi { w.wlOutdent("public:") // Destructor w.wl(s"virtual ~$self() {}") diff --git a/src/source/ObjcGenerator.scala b/src/source/ObjcGenerator.scala index 420c6cd1d..b040ec5c6 100644 --- a/src/source/ObjcGenerator.scala +++ b/src/source/ObjcGenerator.scala @@ -98,12 +98,14 @@ class ObjcGenerator(spec: Spec) extends BaseObjcGenerator(spec) { writeObjcFile(marshal.headerName(ident), origin, refs.header, w => { for (c <- i.consts if marshal.canBeConstVariable(c)) { writeDoc(w, c.doc) + w.wl("__attribute__((visibility (\"default\")))") w.w(s"extern ") writeObjcConstVariableDecl(w, c, self) w.wl(s";") } w.wl writeDoc(w, doc) + w.wl("__attribute__((visibility (\"default\")))") if (i.ext.objc) w.wl(s"@protocol $self") else w.wl(s"@interface $self : NSObject") for (m <- i.methods) { w.wl @@ -164,6 +166,7 @@ class ObjcGenerator(spec: Spec) extends BaseObjcGenerator(spec) { // Generate the header file for record writeObjcFile(marshal.headerName(objcName), origin, refs.header, w => { writeDoc(w, doc) + w.wl("__attribute__((visibility (\"default\")))") w.wl(s"@interface $self : NSObject") def writeInitializer(sign: String, prefix: String) { @@ -198,6 +201,7 @@ class ObjcGenerator(spec: Spec) extends BaseObjcGenerator(spec) { w.wl for (c <- r.consts if marshal.canBeConstVariable(c)) { writeDoc(w, c.doc) + w.wl("__attribute__((visibility (\"default\")))") w.w(s"extern ") writeObjcConstVariableDecl(w, c, noBaseSelf); w.wl(s";") diff --git a/src/source/ObjcppGenerator.scala b/src/source/ObjcppGenerator.scala index 6b6d67c3a..5e8a57014 100644 --- a/src/source/ObjcppGenerator.scala +++ b/src/source/ObjcppGenerator.scala @@ -149,6 +149,7 @@ class ObjcppGenerator(spec: Spec) extends BaseObjcGenerator(spec) { if (i.ext.cpp) { w.wl + w.wl("__attribute__((visibility (\"default\")))") if (i.ext.objc) w.wl(s"@interface $objcSelf : NSObject<$self>") else diff --git a/src/source/generator.scala b/src/source/generator.scala index 0151d89a7..6bd2b6c83 100644 --- a/src/source/generator.scala +++ b/src/source/generator.scala @@ -336,6 +336,7 @@ abstract class Generator(spec: Spec) w.wl("// This file generated by Djinni from " + origin) w.wl val myHeader = q(includePrefix + fileIdentStyle(name) + "." + spec.cppHeaderExt) + w.wl("#include \"project_export.hpp\"") w.wl(s"#include $myHeader // my header") val myHeaderInclude = s"#include $myHeader" for (include <- includes if include != myHeaderInclude) diff --git a/support-lib/project_export.hpp b/support-lib/project_export.hpp new file mode 100644 index 000000000..933e6a579 --- /dev/null +++ b/support-lib/project_export.hpp @@ -0,0 +1,42 @@ +// +// Copyright 2015 Dropbox, Inc. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +#ifndef PROJECT_EXPORT +# if defined _WIN32 || defined __CYGWIN__ +# ifdef BUILDING_DLL +# ifdef __GNUC__ +# define PROJECT_EXPORT __attribute__((dllexport)) +# else +# define PROJECT_EXPORT __declspec(dllexport) +# endif +# else +# ifdef __GNUC__ +# define PROJECT_EXPORT __attribute__((dllimport)) +# else +# define PROJECT_EXPORT __declspec(dllimport) +# endif +# endif +# define PROJECT_LOCAL +# else +# if __GNUC__ >= 4 +# define PROJECT_EXPORT __attribute__((visibility("default"))) +# define PROJECT_LOCAL__attribute__ ((visibility("hidden"))) +# else +# define PROJECT_EXPORT +# define PROJECT_LOCAL +# endif +# endif +#endif diff --git a/support-lib/support_lib.gyp b/support-lib/support_lib.gyp index 71a890e94..ceec9c787 100644 --- a/support-lib/support_lib.gyp +++ b/support-lib/support_lib.gyp @@ -5,6 +5,7 @@ "type": "static_library", "sources": [ "djinni_common.hpp", + "project_export.hpp", "jni/djinni_support.cpp", "jni/djinni_support.hpp", "jni/Marshal.hpp", diff --git a/test-suite/generated-src/cpp/Conflict.hpp b/test-suite/generated-src/cpp/Conflict.hpp index 1c5e2430b..d915ff8ff 100644 --- a/test-suite/generated-src/cpp/Conflict.hpp +++ b/test-suite/generated-src/cpp/Conflict.hpp @@ -3,13 +3,15 @@ #pragma once +#include "project_export.hpp" + namespace testsuite { /** * Test for conflict of method name with an interface name. * See the comments about scopeSymbols in CppMarshal.scala for more info. */ -class Conflict { +class PROJECT_EXPORT Conflict { public: virtual ~Conflict() {} }; diff --git a/test-suite/generated-src/cpp/_varname_interface_.hpp b/test-suite/generated-src/cpp/_varname_interface_.hpp index 5b66e949e..5d67c247b 100644 --- a/test-suite/generated-src/cpp/_varname_interface_.hpp +++ b/test-suite/generated-src/cpp/_varname_interface_.hpp @@ -3,13 +3,14 @@ #pragma once +#include "project_export.hpp" #include namespace testsuite { struct VarnameRecord; -class VarnameInterface { +class PROJECT_EXPORT VarnameInterface { public: virtual ~VarnameInterface() {} diff --git a/test-suite/generated-src/cpp/_varname_record_.hpp b/test-suite/generated-src/cpp/_varname_record_.hpp index 83d01393c..d56a52d15 100644 --- a/test-suite/generated-src/cpp/_varname_record_.hpp +++ b/test-suite/generated-src/cpp/_varname_record_.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include #include @@ -13,7 +14,7 @@ namespace testsuite { * anticipate it to be used as a prefix/suffix. Some name styles behave * badly when it is. However this test case ensures we at least don't crash. */ -struct VarnameRecord final { +struct PROJECT_EXPORT VarnameRecord final { int8_t _field_; VarnameRecord(int8_t _field__) diff --git a/test-suite/generated-src/cpp/access_flags.hpp b/test-suite/generated-src/cpp/access_flags.hpp index ccf4b83e5..b5acfbfe2 100644 --- a/test-suite/generated-src/cpp/access_flags.hpp +++ b/test-suite/generated-src/cpp/access_flags.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include namespace testsuite { @@ -47,7 +48,7 @@ constexpr access_flags operator~(access_flags x) noexcept { namespace std { template <> -struct hash<::testsuite::access_flags> { +struct PROJECT_EXPORT hash<::testsuite::access_flags> { size_t operator()(::testsuite::access_flags type) const { return std::hash()(static_cast(type)); } diff --git a/test-suite/generated-src/cpp/assorted_primitives.cpp b/test-suite/generated-src/cpp/assorted_primitives.cpp index 064bcf33a..2433122fa 100644 --- a/test-suite/generated-src/cpp/assorted_primitives.cpp +++ b/test-suite/generated-src/cpp/assorted_primitives.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from primtypes.djinni +#include "project_export.hpp" #include "assorted_primitives.hpp" // my header namespace testsuite { diff --git a/test-suite/generated-src/cpp/assorted_primitives.hpp b/test-suite/generated-src/cpp/assorted_primitives.hpp index 9db7274e5..c15638188 100644 --- a/test-suite/generated-src/cpp/assorted_primitives.hpp +++ b/test-suite/generated-src/cpp/assorted_primitives.hpp @@ -4,12 +4,13 @@ #pragma once #include "../../handwritten-src/cpp/optional.hpp" +#include "project_export.hpp" #include #include namespace testsuite { -struct AssortedPrimitives final { +struct PROJECT_EXPORT AssortedPrimitives final { bool b; int8_t eight; int16_t sixteen; @@ -25,8 +26,8 @@ struct AssortedPrimitives final { std::experimental::optional o_fthirtytwo; std::experimental::optional o_fsixtyfour; - friend bool operator==(const AssortedPrimitives& lhs, const AssortedPrimitives& rhs); - friend bool operator!=(const AssortedPrimitives& lhs, const AssortedPrimitives& rhs); + PROJECT_EXPORT friend bool operator==(const AssortedPrimitives& lhs, const AssortedPrimitives& rhs); + PROJECT_EXPORT friend bool operator!=(const AssortedPrimitives& lhs, const AssortedPrimitives& rhs); AssortedPrimitives(bool b_, int8_t eight_, diff --git a/test-suite/generated-src/cpp/client_interface.hpp b/test-suite/generated-src/cpp/client_interface.hpp index 0b35234cd..c50687106 100644 --- a/test-suite/generated-src/cpp/client_interface.hpp +++ b/test-suite/generated-src/cpp/client_interface.hpp @@ -4,6 +4,7 @@ #pragma once #include "../../handwritten-src/cpp/optional.hpp" +#include "project_export.hpp" #include #include #include @@ -14,7 +15,7 @@ namespace testsuite { struct ClientReturnedRecord; /** Client interface */ -class ClientInterface { +class PROJECT_EXPORT ClientInterface { public: virtual ~ClientInterface() {} diff --git a/test-suite/generated-src/cpp/client_returned_record.hpp b/test-suite/generated-src/cpp/client_returned_record.hpp index 4252095e5..fe8f5be2e 100644 --- a/test-suite/generated-src/cpp/client_returned_record.hpp +++ b/test-suite/generated-src/cpp/client_returned_record.hpp @@ -4,6 +4,7 @@ #pragma once #include "../../handwritten-src/cpp/optional.hpp" +#include "project_export.hpp" #include #include #include @@ -11,7 +12,7 @@ namespace testsuite { /** Record returned by a client */ -struct ClientReturnedRecord final { +struct PROJECT_EXPORT ClientReturnedRecord final { int64_t record_id; std::string content; std::experimental::optional misc; diff --git a/test-suite/generated-src/cpp/color.hpp b/test-suite/generated-src/cpp/color.hpp index b0d2d7397..30815b3bc 100644 --- a/test-suite/generated-src/cpp/color.hpp +++ b/test-suite/generated-src/cpp/color.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include namespace testsuite { @@ -27,7 +28,7 @@ enum class color : int { namespace std { template <> -struct hash<::testsuite::color> { +struct PROJECT_EXPORT hash<::testsuite::color> { size_t operator()(::testsuite::color type) const { return std::hash()(static_cast(type)); } diff --git a/test-suite/generated-src/cpp/conflict_user.hpp b/test-suite/generated-src/cpp/conflict_user.hpp index f3eb04432..16157bea8 100644 --- a/test-suite/generated-src/cpp/conflict_user.hpp +++ b/test-suite/generated-src/cpp/conflict_user.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include #include @@ -10,7 +11,7 @@ namespace testsuite { class Conflict; -class ConflictUser { +class PROJECT_EXPORT ConflictUser { public: virtual ~ConflictUser() {} diff --git a/test-suite/generated-src/cpp/constant_enum.hpp b/test-suite/generated-src/cpp/constant_enum.hpp index 580415248..fa054ac99 100644 --- a/test-suite/generated-src/cpp/constant_enum.hpp +++ b/test-suite/generated-src/cpp/constant_enum.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include namespace testsuite { @@ -17,7 +18,7 @@ enum class constant_enum : int { namespace std { template <> -struct hash<::testsuite::constant_enum> { +struct PROJECT_EXPORT hash<::testsuite::constant_enum> { size_t operator()(::testsuite::constant_enum type) const { return std::hash()(static_cast(type)); } diff --git a/test-suite/generated-src/cpp/constant_interface_with_enum.cpp b/test-suite/generated-src/cpp/constant_interface_with_enum.cpp index e3bb9b739..6fa180181 100644 --- a/test-suite/generated-src/cpp/constant_interface_with_enum.cpp +++ b/test-suite/generated-src/cpp/constant_interface_with_enum.cpp @@ -1,11 +1,12 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from constant_enum.djinni +#include "project_export.hpp" #include "constant_interface_with_enum.hpp" // my header #include "constant_enum.hpp" namespace testsuite { -constant_enum const ConstantInterfaceWithEnum::CONST_ENUM = constant_enum::SOME_VALUE; +PROJECT_EXPORT constant_enum const ConstantInterfaceWithEnum::CONST_ENUM = constant_enum::SOME_VALUE; } // namespace testsuite diff --git a/test-suite/generated-src/cpp/constant_interface_with_enum.hpp b/test-suite/generated-src/cpp/constant_interface_with_enum.hpp index 5bfde8c2a..617ee1b89 100644 --- a/test-suite/generated-src/cpp/constant_interface_with_enum.hpp +++ b/test-suite/generated-src/cpp/constant_interface_with_enum.hpp @@ -3,12 +3,14 @@ #pragma once +#include "project_export.hpp" + namespace testsuite { enum class constant_enum; /** Interface containing enum constant */ -class ConstantInterfaceWithEnum { +class PROJECT_EXPORT ConstantInterfaceWithEnum { public: virtual ~ConstantInterfaceWithEnum() {} diff --git a/test-suite/generated-src/cpp/constant_record.hpp b/test-suite/generated-src/cpp/constant_record.hpp index 4c8c4dd79..d92ae80da 100644 --- a/test-suite/generated-src/cpp/constant_record.hpp +++ b/test-suite/generated-src/cpp/constant_record.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include #include #include @@ -10,7 +11,7 @@ namespace testsuite { /** Record for use in constants */ -struct ConstantRecord final { +struct PROJECT_EXPORT ConstantRecord final { int32_t some_integer; std::string some_string; diff --git a/test-suite/generated-src/cpp/constant_with_enum.cpp b/test-suite/generated-src/cpp/constant_with_enum.cpp index 1b5d9b0c7..059a26525 100644 --- a/test-suite/generated-src/cpp/constant_with_enum.cpp +++ b/test-suite/generated-src/cpp/constant_with_enum.cpp @@ -1,10 +1,11 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from constant_enum.djinni +#include "project_export.hpp" #include "constant_with_enum.hpp" // my header namespace testsuite { -constant_enum const ConstantWithEnum::CONST_ENUM = constant_enum::SOME_VALUE; +PROJECT_EXPORT constant_enum const ConstantWithEnum::CONST_ENUM = constant_enum::SOME_VALUE; } // namespace testsuite diff --git a/test-suite/generated-src/cpp/constant_with_enum.hpp b/test-suite/generated-src/cpp/constant_with_enum.hpp index 15091b69e..9654f94a1 100644 --- a/test-suite/generated-src/cpp/constant_with_enum.hpp +++ b/test-suite/generated-src/cpp/constant_with_enum.hpp @@ -4,12 +4,13 @@ #pragma once #include "constant_enum.hpp" +#include "project_export.hpp" #include namespace testsuite { /** Record containing enum constant */ -struct ConstantWithEnum final { +struct PROJECT_EXPORT ConstantWithEnum final { static constant_enum const CONST_ENUM; }; diff --git a/test-suite/generated-src/cpp/constants.cpp b/test-suite/generated-src/cpp/constants.cpp index d21ba16c2..92dcb51cb 100644 --- a/test-suite/generated-src/cpp/constants.cpp +++ b/test-suite/generated-src/cpp/constants.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from constants.djinni +#include "project_export.hpp" #include "constants.hpp" // my header namespace testsuite { @@ -19,25 +20,25 @@ float constexpr Constants::F32_CONSTANT; double constexpr Constants::F64_CONSTANT; -std::experimental::optional const Constants::OPT_BOOL_CONSTANT = true; +PROJECT_EXPORT std::experimental::optional const Constants::OPT_BOOL_CONSTANT = true; -std::experimental::optional const Constants::OPT_I8_CONSTANT = 1; +PROJECT_EXPORT std::experimental::optional const Constants::OPT_I8_CONSTANT = 1; -std::experimental::optional const Constants::OPT_I16_CONSTANT = 2; +PROJECT_EXPORT std::experimental::optional const Constants::OPT_I16_CONSTANT = 2; -std::experimental::optional const Constants::OPT_I32_CONSTANT = 3; +PROJECT_EXPORT std::experimental::optional const Constants::OPT_I32_CONSTANT = 3; -std::experimental::optional const Constants::OPT_I64_CONSTANT = 4; +PROJECT_EXPORT std::experimental::optional const Constants::OPT_I64_CONSTANT = 4; -std::experimental::optional const Constants::OPT_F32_CONSTANT = 5.0; +PROJECT_EXPORT std::experimental::optional const Constants::OPT_F32_CONSTANT = 5.0; -std::experimental::optional const Constants::OPT_F64_CONSTANT = 5.0; +PROJECT_EXPORT std::experimental::optional const Constants::OPT_F64_CONSTANT = 5.0; -std::string const Constants::STRING_CONSTANT = {"string-constant"}; +PROJECT_EXPORT std::string const Constants::STRING_CONSTANT = {"string-constant"}; -std::experimental::optional const Constants::OPT_STRING_CONSTANT = {"string-constant"}; +PROJECT_EXPORT std::experimental::optional const Constants::OPT_STRING_CONSTANT = {"string-constant"}; -ConstantRecord const Constants::OBJECT_CONSTANT = ConstantRecord( +PROJECT_EXPORT ConstantRecord const Constants::OBJECT_CONSTANT = ConstantRecord( Constants::I32_CONSTANT /* some_integer */ , Constants::STRING_CONSTANT /* some_string */ ); diff --git a/test-suite/generated-src/cpp/constants.hpp b/test-suite/generated-src/cpp/constants.hpp index eac9e97f6..a0f77310f 100644 --- a/test-suite/generated-src/cpp/constants.hpp +++ b/test-suite/generated-src/cpp/constants.hpp @@ -5,6 +5,7 @@ #include "../../handwritten-src/cpp/optional.hpp" #include "constant_record.hpp" +#include "project_export.hpp" #include #include #include @@ -12,7 +13,7 @@ namespace testsuite { /** Record containing constants */ -struct Constants final { +struct PROJECT_EXPORT Constants final { /** bool_constant has documentation. */ static constexpr bool BOOL_CONSTANT = true; diff --git a/test-suite/generated-src/cpp/constants_interface.cpp b/test-suite/generated-src/cpp/constants_interface.cpp index 3633110f7..d96b5a715 100644 --- a/test-suite/generated-src/cpp/constants_interface.cpp +++ b/test-suite/generated-src/cpp/constants_interface.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from constants.djinni +#include "project_export.hpp" #include "constants_interface.hpp" // my header #include "constant_record.hpp" @@ -20,25 +21,25 @@ float constexpr ConstantsInterface::F32_CONSTANT; double constexpr ConstantsInterface::F64_CONSTANT; -std::experimental::optional const ConstantsInterface::OPT_BOOL_CONSTANT = true; +PROJECT_EXPORT std::experimental::optional const ConstantsInterface::OPT_BOOL_CONSTANT = true; -std::experimental::optional const ConstantsInterface::OPT_I8_CONSTANT = 1; +PROJECT_EXPORT std::experimental::optional const ConstantsInterface::OPT_I8_CONSTANT = 1; -std::experimental::optional const ConstantsInterface::OPT_I16_CONSTANT = 2; +PROJECT_EXPORT std::experimental::optional const ConstantsInterface::OPT_I16_CONSTANT = 2; -std::experimental::optional const ConstantsInterface::OPT_I32_CONSTANT = 3; +PROJECT_EXPORT std::experimental::optional const ConstantsInterface::OPT_I32_CONSTANT = 3; -std::experimental::optional const ConstantsInterface::OPT_I64_CONSTANT = 4; +PROJECT_EXPORT std::experimental::optional const ConstantsInterface::OPT_I64_CONSTANT = 4; -std::experimental::optional const ConstantsInterface::OPT_F32_CONSTANT = 5.0; +PROJECT_EXPORT std::experimental::optional const ConstantsInterface::OPT_F32_CONSTANT = 5.0; -std::experimental::optional const ConstantsInterface::OPT_F64_CONSTANT = 5.0; +PROJECT_EXPORT std::experimental::optional const ConstantsInterface::OPT_F64_CONSTANT = 5.0; -std::string const ConstantsInterface::STRING_CONSTANT = {"string-constant"}; +PROJECT_EXPORT std::string const ConstantsInterface::STRING_CONSTANT = {"string-constant"}; -std::experimental::optional const ConstantsInterface::OPT_STRING_CONSTANT = {"string-constant"}; +PROJECT_EXPORT std::experimental::optional const ConstantsInterface::OPT_STRING_CONSTANT = {"string-constant"}; -ConstantRecord const ConstantsInterface::OBJECT_CONSTANT = ConstantRecord( +PROJECT_EXPORT ConstantRecord const ConstantsInterface::OBJECT_CONSTANT = ConstantRecord( ConstantsInterface::I32_CONSTANT /* some_integer */ , ConstantsInterface::STRING_CONSTANT /* some_string */ ); diff --git a/test-suite/generated-src/cpp/constants_interface.hpp b/test-suite/generated-src/cpp/constants_interface.hpp index c73189728..1bee6a6f5 100644 --- a/test-suite/generated-src/cpp/constants_interface.hpp +++ b/test-suite/generated-src/cpp/constants_interface.hpp @@ -4,6 +4,7 @@ #pragma once #include "../../handwritten-src/cpp/optional.hpp" +#include "project_export.hpp" #include #include @@ -12,7 +13,7 @@ namespace testsuite { struct ConstantRecord; /** Interface containing constants */ -class ConstantsInterface { +class PROJECT_EXPORT ConstantsInterface { public: virtual ~ConstantsInterface() {} diff --git a/test-suite/generated-src/cpp/cpp_exception.hpp b/test-suite/generated-src/cpp/cpp_exception.hpp index a8e7e13c4..33b919fd5 100644 --- a/test-suite/generated-src/cpp/cpp_exception.hpp +++ b/test-suite/generated-src/cpp/cpp_exception.hpp @@ -3,12 +3,13 @@ #pragma once +#include "project_export.hpp" #include #include namespace testsuite { -class CppException { +class PROJECT_EXPORT CppException { public: virtual ~CppException() {} diff --git a/test-suite/generated-src/cpp/date_record.cpp b/test-suite/generated-src/cpp/date_record.cpp index 1c31d4cfd..6e2daea99 100644 --- a/test-suite/generated-src/cpp/date_record.cpp +++ b/test-suite/generated-src/cpp/date_record.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from date.djinni +#include "project_export.hpp" #include "date_record.hpp" // my header namespace testsuite { diff --git a/test-suite/generated-src/cpp/date_record.hpp b/test-suite/generated-src/cpp/date_record.hpp index 14e7699db..5624def78 100644 --- a/test-suite/generated-src/cpp/date_record.hpp +++ b/test-suite/generated-src/cpp/date_record.hpp @@ -3,22 +3,23 @@ #pragma once +#include "project_export.hpp" #include #include namespace testsuite { -struct DateRecord final { +struct PROJECT_EXPORT DateRecord final { std::chrono::system_clock::time_point created_at; - friend bool operator==(const DateRecord& lhs, const DateRecord& rhs); - friend bool operator!=(const DateRecord& lhs, const DateRecord& rhs); + PROJECT_EXPORT friend bool operator==(const DateRecord& lhs, const DateRecord& rhs); + PROJECT_EXPORT friend bool operator!=(const DateRecord& lhs, const DateRecord& rhs); - friend bool operator<(const DateRecord& lhs, const DateRecord& rhs); - friend bool operator>(const DateRecord& lhs, const DateRecord& rhs); + PROJECT_EXPORT friend bool operator<(const DateRecord& lhs, const DateRecord& rhs); + PROJECT_EXPORT friend bool operator>(const DateRecord& lhs, const DateRecord& rhs); - friend bool operator<=(const DateRecord& lhs, const DateRecord& rhs); - friend bool operator>=(const DateRecord& lhs, const DateRecord& rhs); + PROJECT_EXPORT friend bool operator<=(const DateRecord& lhs, const DateRecord& rhs); + PROJECT_EXPORT friend bool operator>=(const DateRecord& lhs, const DateRecord& rhs); DateRecord(std::chrono::system_clock::time_point created_at_) : created_at(std::move(created_at_)) diff --git a/test-suite/generated-src/cpp/empty_flags.hpp b/test-suite/generated-src/cpp/empty_flags.hpp index 60bc916e8..98344df51 100644 --- a/test-suite/generated-src/cpp/empty_flags.hpp +++ b/test-suite/generated-src/cpp/empty_flags.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include namespace testsuite { @@ -38,7 +39,7 @@ constexpr empty_flags operator~(empty_flags x) noexcept { namespace std { template <> -struct hash<::testsuite::empty_flags> { +struct PROJECT_EXPORT hash<::testsuite::empty_flags> { size_t operator()(::testsuite::empty_flags type) const { return std::hash()(static_cast(type)); } diff --git a/test-suite/generated-src/cpp/empty_record.hpp b/test-suite/generated-src/cpp/empty_record.hpp index 135fd8dc5..15f6dff7d 100644 --- a/test-suite/generated-src/cpp/empty_record.hpp +++ b/test-suite/generated-src/cpp/empty_record.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include namespace testsuite { @@ -12,7 +13,7 @@ namespace testsuite { * (Second line of multi-line documentation. * Indented third line of multi-line documentation.) */ -struct EmptyRecord final { +struct PROJECT_EXPORT EmptyRecord final { }; } // namespace testsuite diff --git a/test-suite/generated-src/cpp/enum_usage_interface.hpp b/test-suite/generated-src/cpp/enum_usage_interface.hpp index a55e095f1..6019127ab 100644 --- a/test-suite/generated-src/cpp/enum_usage_interface.hpp +++ b/test-suite/generated-src/cpp/enum_usage_interface.hpp @@ -4,6 +4,7 @@ #pragma once #include "../../handwritten-src/cpp/optional.hpp" +#include "project_export.hpp" #include #include #include @@ -12,7 +13,7 @@ namespace testsuite { enum class color; -class EnumUsageInterface { +class PROJECT_EXPORT EnumUsageInterface { public: virtual ~EnumUsageInterface() {} diff --git a/test-suite/generated-src/cpp/enum_usage_record.hpp b/test-suite/generated-src/cpp/enum_usage_record.hpp index 10d86ebe8..9e1882ae7 100644 --- a/test-suite/generated-src/cpp/enum_usage_record.hpp +++ b/test-suite/generated-src/cpp/enum_usage_record.hpp @@ -5,6 +5,7 @@ #include "../../handwritten-src/cpp/optional.hpp" #include "color.hpp" +#include "project_export.hpp" #include #include #include @@ -12,7 +13,7 @@ namespace testsuite { -struct EnumUsageRecord final { +struct PROJECT_EXPORT EnumUsageRecord final { color e; std::experimental::optional o; std::vector l; diff --git a/test-suite/generated-src/cpp/extended_record_base.cpp b/test-suite/generated-src/cpp/extended_record_base.cpp index 2e7b45f1c..6107446d9 100644 --- a/test-suite/generated-src/cpp/extended_record_base.cpp +++ b/test-suite/generated-src/cpp/extended_record_base.cpp @@ -1,12 +1,13 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from extended_record.djinni +#include "project_export.hpp" #include "extended_record_base.hpp" // my header #include "../../handwritten-src/cpp/extended_record.hpp" namespace testsuite { -ExtendedRecord const ExtendedRecordBase::EXTENDED_RECORD_CONST = ExtendedRecord( +PROJECT_EXPORT ExtendedRecord const ExtendedRecordBase::EXTENDED_RECORD_CONST = ExtendedRecord( true /* foo */ ); } // namespace testsuite diff --git a/test-suite/generated-src/cpp/extended_record_base.hpp b/test-suite/generated-src/cpp/extended_record_base.hpp index 88659bac2..b8f6fa0e1 100644 --- a/test-suite/generated-src/cpp/extended_record_base.hpp +++ b/test-suite/generated-src/cpp/extended_record_base.hpp @@ -3,14 +3,15 @@ #pragma once +#include "project_export.hpp" #include namespace testsuite { -struct ExtendedRecord; // Requiring extended class +struct PROJECT_EXPORT ExtendedRecord; // Requiring extended class /** Extended record */ -struct ExtendedRecordBase { +struct PROJECT_EXPORT ExtendedRecordBase { static ExtendedRecord const EXTENDED_RECORD_CONST; bool foo; diff --git a/test-suite/generated-src/cpp/extern_interface_1.hpp b/test-suite/generated-src/cpp/extern_interface_1.hpp index 5c207ff3e..809db2056 100644 --- a/test-suite/generated-src/cpp/extern_interface_1.hpp +++ b/test-suite/generated-src/cpp/extern_interface_1.hpp @@ -5,9 +5,10 @@ #include "client_interface.hpp" #include "client_returned_record.hpp" +#include "project_export.hpp" #include -class ExternInterface1 { +class PROJECT_EXPORT ExternInterface1 { public: virtual ~ExternInterface1() {} diff --git a/test-suite/generated-src/cpp/extern_interface_2.hpp b/test-suite/generated-src/cpp/extern_interface_2.hpp index ef055e165..5e419375b 100644 --- a/test-suite/generated-src/cpp/extern_interface_2.hpp +++ b/test-suite/generated-src/cpp/extern_interface_2.hpp @@ -3,12 +3,13 @@ #pragma once +#include "project_export.hpp" #include "test_helpers.hpp" #include struct ExternRecordWithDerivings; -class ExternInterface2 { +class PROJECT_EXPORT ExternInterface2 { public: virtual ~ExternInterface2() {} diff --git a/test-suite/generated-src/cpp/extern_record_with_derivings.cpp b/test-suite/generated-src/cpp/extern_record_with_derivings.cpp index 9f1e3d6c8..4cdfb80df 100644 --- a/test-suite/generated-src/cpp/extern_record_with_derivings.cpp +++ b/test-suite/generated-src/cpp/extern_record_with_derivings.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from yaml-test.djinni +#include "project_export.hpp" #include "extern_record_with_derivings.hpp" // my header diff --git a/test-suite/generated-src/cpp/extern_record_with_derivings.hpp b/test-suite/generated-src/cpp/extern_record_with_derivings.hpp index e440b6a78..ff92d3420 100644 --- a/test-suite/generated-src/cpp/extern_record_with_derivings.hpp +++ b/test-suite/generated-src/cpp/extern_record_with_derivings.hpp @@ -4,22 +4,23 @@ #pragma once #include "color.hpp" +#include "project_export.hpp" #include "record_with_derivings.hpp" #include /** This file tests YAML dumped by Djinni can be parsed back in */ -struct ExternRecordWithDerivings final { +struct PROJECT_EXPORT ExternRecordWithDerivings final { ::testsuite::RecordWithDerivings member; ::testsuite::color e; - friend bool operator==(const ExternRecordWithDerivings& lhs, const ExternRecordWithDerivings& rhs); - friend bool operator!=(const ExternRecordWithDerivings& lhs, const ExternRecordWithDerivings& rhs); + PROJECT_EXPORT friend bool operator==(const ExternRecordWithDerivings& lhs, const ExternRecordWithDerivings& rhs); + PROJECT_EXPORT friend bool operator!=(const ExternRecordWithDerivings& lhs, const ExternRecordWithDerivings& rhs); - friend bool operator<(const ExternRecordWithDerivings& lhs, const ExternRecordWithDerivings& rhs); - friend bool operator>(const ExternRecordWithDerivings& lhs, const ExternRecordWithDerivings& rhs); + PROJECT_EXPORT friend bool operator<(const ExternRecordWithDerivings& lhs, const ExternRecordWithDerivings& rhs); + PROJECT_EXPORT friend bool operator>(const ExternRecordWithDerivings& lhs, const ExternRecordWithDerivings& rhs); - friend bool operator<=(const ExternRecordWithDerivings& lhs, const ExternRecordWithDerivings& rhs); - friend bool operator>=(const ExternRecordWithDerivings& lhs, const ExternRecordWithDerivings& rhs); + PROJECT_EXPORT friend bool operator<=(const ExternRecordWithDerivings& lhs, const ExternRecordWithDerivings& rhs); + PROJECT_EXPORT friend bool operator>=(const ExternRecordWithDerivings& lhs, const ExternRecordWithDerivings& rhs); ExternRecordWithDerivings(::testsuite::RecordWithDerivings member_, ::testsuite::color e_) diff --git a/test-suite/generated-src/cpp/first_listener.hpp b/test-suite/generated-src/cpp/first_listener.hpp index 5597c7a3b..04b35fe56 100644 --- a/test-suite/generated-src/cpp/first_listener.hpp +++ b/test-suite/generated-src/cpp/first_listener.hpp @@ -3,10 +3,12 @@ #pragma once +#include "project_export.hpp" + namespace testsuite { /** Used for ObjC multiple inheritance tests */ -class FirstListener { +class PROJECT_EXPORT FirstListener { public: virtual ~FirstListener() {} diff --git a/test-suite/generated-src/cpp/flag_roundtrip.hpp b/test-suite/generated-src/cpp/flag_roundtrip.hpp index 3899ef69c..9fb167559 100644 --- a/test-suite/generated-src/cpp/flag_roundtrip.hpp +++ b/test-suite/generated-src/cpp/flag_roundtrip.hpp @@ -4,13 +4,14 @@ #pragma once #include "../../handwritten-src/cpp/optional.hpp" +#include "project_export.hpp" namespace testsuite { enum class access_flags : unsigned; enum class empty_flags : unsigned; -class FlagRoundtrip { +class PROJECT_EXPORT FlagRoundtrip { public: virtual ~FlagRoundtrip() {} diff --git a/test-suite/generated-src/cpp/interface_using_extended_record.cpp b/test-suite/generated-src/cpp/interface_using_extended_record.cpp index 56d8bee71..c3de134f9 100644 --- a/test-suite/generated-src/cpp/interface_using_extended_record.cpp +++ b/test-suite/generated-src/cpp/interface_using_extended_record.cpp @@ -1,13 +1,14 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from extended_record.djinni +#include "project_export.hpp" #include "interface_using_extended_record.hpp" // my header #include "../../handwritten-src/cpp/extended_record.hpp" #include "record_using_extended_record.hpp" namespace testsuite { -RecordUsingExtendedRecord const InterfaceUsingExtendedRecord::CR = RecordUsingExtendedRecord( +PROJECT_EXPORT RecordUsingExtendedRecord const InterfaceUsingExtendedRecord::CR = RecordUsingExtendedRecord( ExtendedRecord( false /* foo */ ) /* er */ ); diff --git a/test-suite/generated-src/cpp/interface_using_extended_record.hpp b/test-suite/generated-src/cpp/interface_using_extended_record.hpp index 043d23ef2..c1446c775 100644 --- a/test-suite/generated-src/cpp/interface_using_extended_record.hpp +++ b/test-suite/generated-src/cpp/interface_using_extended_record.hpp @@ -3,12 +3,14 @@ #pragma once +#include "project_export.hpp" + namespace testsuite { struct ExtendedRecord; struct RecordUsingExtendedRecord; -class InterfaceUsingExtendedRecord { +class PROJECT_EXPORT InterfaceUsingExtendedRecord { public: virtual ~InterfaceUsingExtendedRecord() {} diff --git a/test-suite/generated-src/cpp/java_only_listener.hpp b/test-suite/generated-src/cpp/java_only_listener.hpp index 4d36febb9..b666944d9 100644 --- a/test-suite/generated-src/cpp/java_only_listener.hpp +++ b/test-suite/generated-src/cpp/java_only_listener.hpp @@ -3,9 +3,11 @@ #pragma once +#include "project_export.hpp" + namespace testsuite { -class JavaOnlyListener { +class PROJECT_EXPORT JavaOnlyListener { public: virtual ~JavaOnlyListener() {} }; diff --git a/test-suite/generated-src/cpp/listener_caller.hpp b/test-suite/generated-src/cpp/listener_caller.hpp index dd403b7a7..0397db5cb 100644 --- a/test-suite/generated-src/cpp/listener_caller.hpp +++ b/test-suite/generated-src/cpp/listener_caller.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include namespace testsuite { @@ -16,7 +17,7 @@ class SecondListener; * languages, due to the details of multiple inheritance and object * comparison. */ -class ListenerCaller { +class PROJECT_EXPORT ListenerCaller { public: virtual ~ListenerCaller() {} diff --git a/test-suite/generated-src/cpp/map_date_record.hpp b/test-suite/generated-src/cpp/map_date_record.hpp index 77d227c25..83ce0a079 100644 --- a/test-suite/generated-src/cpp/map_date_record.hpp +++ b/test-suite/generated-src/cpp/map_date_record.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include #include #include @@ -10,7 +11,7 @@ namespace testsuite { -struct MapDateRecord final { +struct PROJECT_EXPORT MapDateRecord final { std::unordered_map dates_by_id; MapDateRecord(std::unordered_map dates_by_id_) diff --git a/test-suite/generated-src/cpp/map_list_record.hpp b/test-suite/generated-src/cpp/map_list_record.hpp index 486fa1923..02d7ac5f4 100644 --- a/test-suite/generated-src/cpp/map_list_record.hpp +++ b/test-suite/generated-src/cpp/map_list_record.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include #include #include @@ -11,7 +12,7 @@ namespace testsuite { -struct MapListRecord final { +struct PROJECT_EXPORT MapListRecord final { std::vector> map_list; MapListRecord(std::vector> map_list_) diff --git a/test-suite/generated-src/cpp/map_record.hpp b/test-suite/generated-src/cpp/map_record.hpp index 92122dca6..54accbfc4 100644 --- a/test-suite/generated-src/cpp/map_record.hpp +++ b/test-suite/generated-src/cpp/map_record.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include #include #include @@ -10,7 +11,7 @@ namespace testsuite { -struct MapRecord final { +struct PROJECT_EXPORT MapRecord final { std::unordered_map map; std::unordered_map imap; diff --git a/test-suite/generated-src/cpp/nested_collection.hpp b/test-suite/generated-src/cpp/nested_collection.hpp index aee3911fe..c9768e0d1 100644 --- a/test-suite/generated-src/cpp/nested_collection.hpp +++ b/test-suite/generated-src/cpp/nested_collection.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include #include #include @@ -10,7 +11,7 @@ namespace testsuite { -struct NestedCollection final { +struct PROJECT_EXPORT NestedCollection final { std::vector> set_list; NestedCollection(std::vector> set_list_) diff --git a/test-suite/generated-src/cpp/objc_only_listener.hpp b/test-suite/generated-src/cpp/objc_only_listener.hpp index 428e4db9e..eda77cac1 100644 --- a/test-suite/generated-src/cpp/objc_only_listener.hpp +++ b/test-suite/generated-src/cpp/objc_only_listener.hpp @@ -3,9 +3,11 @@ #pragma once +#include "project_export.hpp" + namespace testsuite { -class ObjcOnlyListener { +class PROJECT_EXPORT ObjcOnlyListener { public: virtual ~ObjcOnlyListener() {} }; diff --git a/test-suite/generated-src/cpp/primitive_list.hpp b/test-suite/generated-src/cpp/primitive_list.hpp index fcfdb2051..78dbf26ec 100644 --- a/test-suite/generated-src/cpp/primitive_list.hpp +++ b/test-suite/generated-src/cpp/primitive_list.hpp @@ -3,13 +3,14 @@ #pragma once +#include "project_export.hpp" #include #include #include namespace testsuite { -struct PrimitiveList final { +struct PROJECT_EXPORT PrimitiveList final { std::vector list; PrimitiveList(std::vector list_) diff --git a/test-suite/generated-src/cpp/record_using_extended_record.cpp b/test-suite/generated-src/cpp/record_using_extended_record.cpp index a1e8ea524..3a9d6473e 100644 --- a/test-suite/generated-src/cpp/record_using_extended_record.cpp +++ b/test-suite/generated-src/cpp/record_using_extended_record.cpp @@ -1,11 +1,12 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from extended_record.djinni +#include "project_export.hpp" #include "record_using_extended_record.hpp" // my header namespace testsuite { -RecordUsingExtendedRecord const RecordUsingExtendedRecord::CR = RecordUsingExtendedRecord( +PROJECT_EXPORT RecordUsingExtendedRecord const RecordUsingExtendedRecord::CR = RecordUsingExtendedRecord( ExtendedRecord( false /* foo */ ) /* er */ ); diff --git a/test-suite/generated-src/cpp/record_using_extended_record.hpp b/test-suite/generated-src/cpp/record_using_extended_record.hpp index fb9b35ff4..87f816e37 100644 --- a/test-suite/generated-src/cpp/record_using_extended_record.hpp +++ b/test-suite/generated-src/cpp/record_using_extended_record.hpp @@ -4,11 +4,12 @@ #pragma once #include "../../handwritten-src/cpp/extended_record.hpp" +#include "project_export.hpp" #include namespace testsuite { -struct RecordUsingExtendedRecord final { +struct PROJECT_EXPORT RecordUsingExtendedRecord final { static RecordUsingExtendedRecord const CR; ExtendedRecord er; diff --git a/test-suite/generated-src/cpp/record_with_derivings.cpp b/test-suite/generated-src/cpp/record_with_derivings.cpp index bc7fd78e2..7aaa83035 100644 --- a/test-suite/generated-src/cpp/record_with_derivings.cpp +++ b/test-suite/generated-src/cpp/record_with_derivings.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from derivings.djinni +#include "project_export.hpp" #include "record_with_derivings.hpp" // my header namespace testsuite { diff --git a/test-suite/generated-src/cpp/record_with_derivings.hpp b/test-suite/generated-src/cpp/record_with_derivings.hpp index 25ac0e018..0291d0671 100644 --- a/test-suite/generated-src/cpp/record_with_derivings.hpp +++ b/test-suite/generated-src/cpp/record_with_derivings.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include #include #include @@ -10,7 +11,7 @@ namespace testsuite { -struct RecordWithDerivings final { +struct PROJECT_EXPORT RecordWithDerivings final { int8_t eight; int16_t sixteen; int32_t thirtytwo; @@ -20,14 +21,14 @@ struct RecordWithDerivings final { std::chrono::system_clock::time_point d; std::string s; - friend bool operator==(const RecordWithDerivings& lhs, const RecordWithDerivings& rhs); - friend bool operator!=(const RecordWithDerivings& lhs, const RecordWithDerivings& rhs); + PROJECT_EXPORT friend bool operator==(const RecordWithDerivings& lhs, const RecordWithDerivings& rhs); + PROJECT_EXPORT friend bool operator!=(const RecordWithDerivings& lhs, const RecordWithDerivings& rhs); - friend bool operator<(const RecordWithDerivings& lhs, const RecordWithDerivings& rhs); - friend bool operator>(const RecordWithDerivings& lhs, const RecordWithDerivings& rhs); + PROJECT_EXPORT friend bool operator<(const RecordWithDerivings& lhs, const RecordWithDerivings& rhs); + PROJECT_EXPORT friend bool operator>(const RecordWithDerivings& lhs, const RecordWithDerivings& rhs); - friend bool operator<=(const RecordWithDerivings& lhs, const RecordWithDerivings& rhs); - friend bool operator>=(const RecordWithDerivings& lhs, const RecordWithDerivings& rhs); + PROJECT_EXPORT friend bool operator<=(const RecordWithDerivings& lhs, const RecordWithDerivings& rhs); + PROJECT_EXPORT friend bool operator>=(const RecordWithDerivings& lhs, const RecordWithDerivings& rhs); RecordWithDerivings(int8_t eight_, int16_t sixteen_, diff --git a/test-suite/generated-src/cpp/record_with_duration_and_derivings.cpp b/test-suite/generated-src/cpp/record_with_duration_and_derivings.cpp index 851d6abf6..52de27407 100644 --- a/test-suite/generated-src/cpp/record_with_duration_and_derivings.cpp +++ b/test-suite/generated-src/cpp/record_with_duration_and_derivings.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from duration.djinni +#include "project_export.hpp" #include "record_with_duration_and_derivings.hpp" // my header namespace testsuite { diff --git a/test-suite/generated-src/cpp/record_with_duration_and_derivings.hpp b/test-suite/generated-src/cpp/record_with_duration_and_derivings.hpp index dc3ad84cc..520de6e72 100644 --- a/test-suite/generated-src/cpp/record_with_duration_and_derivings.hpp +++ b/test-suite/generated-src/cpp/record_with_duration_and_derivings.hpp @@ -3,22 +3,23 @@ #pragma once +#include "project_export.hpp" #include #include namespace testsuite { -struct RecordWithDurationAndDerivings final { +struct PROJECT_EXPORT RecordWithDurationAndDerivings final { std::chrono::duration dt; - friend bool operator==(const RecordWithDurationAndDerivings& lhs, const RecordWithDurationAndDerivings& rhs); - friend bool operator!=(const RecordWithDurationAndDerivings& lhs, const RecordWithDurationAndDerivings& rhs); + PROJECT_EXPORT friend bool operator==(const RecordWithDurationAndDerivings& lhs, const RecordWithDurationAndDerivings& rhs); + PROJECT_EXPORT friend bool operator!=(const RecordWithDurationAndDerivings& lhs, const RecordWithDurationAndDerivings& rhs); - friend bool operator<(const RecordWithDurationAndDerivings& lhs, const RecordWithDurationAndDerivings& rhs); - friend bool operator>(const RecordWithDurationAndDerivings& lhs, const RecordWithDurationAndDerivings& rhs); + PROJECT_EXPORT friend bool operator<(const RecordWithDurationAndDerivings& lhs, const RecordWithDurationAndDerivings& rhs); + PROJECT_EXPORT friend bool operator>(const RecordWithDurationAndDerivings& lhs, const RecordWithDurationAndDerivings& rhs); - friend bool operator<=(const RecordWithDurationAndDerivings& lhs, const RecordWithDurationAndDerivings& rhs); - friend bool operator>=(const RecordWithDurationAndDerivings& lhs, const RecordWithDurationAndDerivings& rhs); + PROJECT_EXPORT friend bool operator<=(const RecordWithDurationAndDerivings& lhs, const RecordWithDurationAndDerivings& rhs); + PROJECT_EXPORT friend bool operator>=(const RecordWithDurationAndDerivings& lhs, const RecordWithDurationAndDerivings& rhs); RecordWithDurationAndDerivings(std::chrono::duration dt_) : dt(std::move(dt_)) diff --git a/test-suite/generated-src/cpp/record_with_flags.hpp b/test-suite/generated-src/cpp/record_with_flags.hpp index 608cd3818..f4d8ce1b0 100644 --- a/test-suite/generated-src/cpp/record_with_flags.hpp +++ b/test-suite/generated-src/cpp/record_with_flags.hpp @@ -4,11 +4,12 @@ #pragma once #include "access_flags.hpp" +#include "project_export.hpp" #include namespace testsuite { -struct RecordWithFlags final { +struct PROJECT_EXPORT RecordWithFlags final { access_flags access; RecordWithFlags(access_flags access_) diff --git a/test-suite/generated-src/cpp/record_with_nested_derivings.cpp b/test-suite/generated-src/cpp/record_with_nested_derivings.cpp index 7696e36af..e514bb1cf 100644 --- a/test-suite/generated-src/cpp/record_with_nested_derivings.cpp +++ b/test-suite/generated-src/cpp/record_with_nested_derivings.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from derivings.djinni +#include "project_export.hpp" #include "record_with_nested_derivings.hpp" // my header namespace testsuite { diff --git a/test-suite/generated-src/cpp/record_with_nested_derivings.hpp b/test-suite/generated-src/cpp/record_with_nested_derivings.hpp index 35f19a1b4..a87ec32d4 100644 --- a/test-suite/generated-src/cpp/record_with_nested_derivings.hpp +++ b/test-suite/generated-src/cpp/record_with_nested_derivings.hpp @@ -3,24 +3,25 @@ #pragma once +#include "project_export.hpp" #include "record_with_derivings.hpp" #include #include namespace testsuite { -struct RecordWithNestedDerivings final { +struct PROJECT_EXPORT RecordWithNestedDerivings final { int32_t key; RecordWithDerivings rec; - friend bool operator==(const RecordWithNestedDerivings& lhs, const RecordWithNestedDerivings& rhs); - friend bool operator!=(const RecordWithNestedDerivings& lhs, const RecordWithNestedDerivings& rhs); + PROJECT_EXPORT friend bool operator==(const RecordWithNestedDerivings& lhs, const RecordWithNestedDerivings& rhs); + PROJECT_EXPORT friend bool operator!=(const RecordWithNestedDerivings& lhs, const RecordWithNestedDerivings& rhs); - friend bool operator<(const RecordWithNestedDerivings& lhs, const RecordWithNestedDerivings& rhs); - friend bool operator>(const RecordWithNestedDerivings& lhs, const RecordWithNestedDerivings& rhs); + PROJECT_EXPORT friend bool operator<(const RecordWithNestedDerivings& lhs, const RecordWithNestedDerivings& rhs); + PROJECT_EXPORT friend bool operator>(const RecordWithNestedDerivings& lhs, const RecordWithNestedDerivings& rhs); - friend bool operator<=(const RecordWithNestedDerivings& lhs, const RecordWithNestedDerivings& rhs); - friend bool operator>=(const RecordWithNestedDerivings& lhs, const RecordWithNestedDerivings& rhs); + PROJECT_EXPORT friend bool operator<=(const RecordWithNestedDerivings& lhs, const RecordWithNestedDerivings& rhs); + PROJECT_EXPORT friend bool operator>=(const RecordWithNestedDerivings& lhs, const RecordWithNestedDerivings& rhs); RecordWithNestedDerivings(int32_t key_, RecordWithDerivings rec_) diff --git a/test-suite/generated-src/cpp/return_one.hpp b/test-suite/generated-src/cpp/return_one.hpp index 728071135..d05b180a8 100644 --- a/test-suite/generated-src/cpp/return_one.hpp +++ b/test-suite/generated-src/cpp/return_one.hpp @@ -3,13 +3,14 @@ #pragma once +#include "project_export.hpp" #include #include namespace testsuite { /** Used for C++ multiple inheritance tests */ -class ReturnOne { +class PROJECT_EXPORT ReturnOne { public: virtual ~ReturnOne() {} diff --git a/test-suite/generated-src/cpp/return_two.hpp b/test-suite/generated-src/cpp/return_two.hpp index abb41f9f0..a426c93b9 100644 --- a/test-suite/generated-src/cpp/return_two.hpp +++ b/test-suite/generated-src/cpp/return_two.hpp @@ -3,13 +3,14 @@ #pragma once +#include "project_export.hpp" #include #include namespace testsuite { /** Used for C++ multiple inheritance tests */ -class ReturnTwo { +class PROJECT_EXPORT ReturnTwo { public: virtual ~ReturnTwo() {} diff --git a/test-suite/generated-src/cpp/reverse_client_interface.hpp b/test-suite/generated-src/cpp/reverse_client_interface.hpp index 955b912a5..d56a31b75 100644 --- a/test-suite/generated-src/cpp/reverse_client_interface.hpp +++ b/test-suite/generated-src/cpp/reverse_client_interface.hpp @@ -4,12 +4,13 @@ #pragma once #include "../../handwritten-src/cpp/optional.hpp" +#include "project_export.hpp" #include #include namespace testsuite { -class ReverseClientInterface { +class PROJECT_EXPORT ReverseClientInterface { public: virtual ~ReverseClientInterface() {} diff --git a/test-suite/generated-src/cpp/second_listener.hpp b/test-suite/generated-src/cpp/second_listener.hpp index 10ed57b81..4ba341a95 100644 --- a/test-suite/generated-src/cpp/second_listener.hpp +++ b/test-suite/generated-src/cpp/second_listener.hpp @@ -3,10 +3,12 @@ #pragma once +#include "project_export.hpp" + namespace testsuite { /** Used for ObjC multiple inheritance tests */ -class SecondListener { +class PROJECT_EXPORT SecondListener { public: virtual ~SecondListener() {} diff --git a/test-suite/generated-src/cpp/set_record.hpp b/test-suite/generated-src/cpp/set_record.hpp index 2378d79c4..f68da9374 100644 --- a/test-suite/generated-src/cpp/set_record.hpp +++ b/test-suite/generated-src/cpp/set_record.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include #include #include @@ -10,7 +11,7 @@ namespace testsuite { -struct SetRecord final { +struct PROJECT_EXPORT SetRecord final { std::unordered_set set; std::unordered_set iset; diff --git a/test-suite/generated-src/cpp/test_duration.hpp b/test-suite/generated-src/cpp/test_duration.hpp index 028fc5d06..7b7383e70 100644 --- a/test-suite/generated-src/cpp/test_duration.hpp +++ b/test-suite/generated-src/cpp/test_duration.hpp @@ -4,13 +4,14 @@ #pragma once #include "../../handwritten-src/cpp/optional.hpp" +#include "project_export.hpp" #include #include #include namespace testsuite { -class TestDuration { +class PROJECT_EXPORT TestDuration { public: virtual ~TestDuration() {} diff --git a/test-suite/generated-src/cpp/test_helpers.hpp b/test-suite/generated-src/cpp/test_helpers.hpp index df09e2439..ef2e94998 100644 --- a/test-suite/generated-src/cpp/test_helpers.hpp +++ b/test-suite/generated-src/cpp/test_helpers.hpp @@ -4,6 +4,7 @@ #pragma once #include "../../handwritten-src/cpp/optional.hpp" +#include "project_export.hpp" #include #include #include @@ -26,7 +27,7 @@ struct SetRecord; * (Second line of multi-line documentation. * Indented third line of multi-line documentation.) */ -class TestHelpers { +class PROJECT_EXPORT TestHelpers { public: virtual ~TestHelpers() {} diff --git a/test-suite/generated-src/cpp/user_token.hpp b/test-suite/generated-src/cpp/user_token.hpp index 2bbfa57f9..c5051eda5 100644 --- a/test-suite/generated-src/cpp/user_token.hpp +++ b/test-suite/generated-src/cpp/user_token.hpp @@ -3,11 +3,12 @@ #pragma once +#include "project_export.hpp" #include namespace testsuite { -class UserToken { +class PROJECT_EXPORT UserToken { public: virtual ~UserToken() {} diff --git a/test-suite/generated-src/cpp/uses_single_language_listeners.hpp b/test-suite/generated-src/cpp/uses_single_language_listeners.hpp index fd20afee2..90784667a 100644 --- a/test-suite/generated-src/cpp/uses_single_language_listeners.hpp +++ b/test-suite/generated-src/cpp/uses_single_language_listeners.hpp @@ -3,6 +3,7 @@ #pragma once +#include "project_export.hpp" #include namespace testsuite { @@ -14,7 +15,7 @@ class ObjcOnlyListener; * Generating and compiling this makes sure other languages don't break * on references to interfaces they don't need. */ -class UsesSingleLanguageListeners { +class PROJECT_EXPORT UsesSingleLanguageListeners { public: virtual ~UsesSingleLanguageListeners() {} diff --git a/test-suite/generated-src/cpp/wchar_test_helpers.hpp b/test-suite/generated-src/cpp/wchar_test_helpers.hpp index bb585677a..12942d3f5 100644 --- a/test-suite/generated-src/cpp/wchar_test_helpers.hpp +++ b/test-suite/generated-src/cpp/wchar_test_helpers.hpp @@ -3,13 +3,14 @@ #pragma once +#include "project_export.hpp" #include namespace testsuite { struct WcharTestRec; -class WcharTestHelpers { +class PROJECT_EXPORT WcharTestHelpers { public: virtual ~WcharTestHelpers() {} diff --git a/test-suite/generated-src/cpp/wchar_test_rec.hpp b/test-suite/generated-src/cpp/wchar_test_rec.hpp index 23a732dd6..37dd1cbe8 100644 --- a/test-suite/generated-src/cpp/wchar_test_rec.hpp +++ b/test-suite/generated-src/cpp/wchar_test_rec.hpp @@ -3,12 +3,13 @@ #pragma once +#include "project_export.hpp" #include #include namespace testsuite { -struct WcharTestRec final { +struct PROJECT_EXPORT WcharTestRec final { std::wstring s; WcharTestRec(std::wstring s_) diff --git a/test-suite/generated-src/jni/NativeAssortedPrimitives.cpp b/test-suite/generated-src/jni/NativeAssortedPrimitives.cpp index 098a8a2fc..e03298807 100644 --- a/test-suite/generated-src/jni/NativeAssortedPrimitives.cpp +++ b/test-suite/generated-src/jni/NativeAssortedPrimitives.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from primtypes.djinni +#include "project_export.hpp" #include "NativeAssortedPrimitives.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeClientInterface.cpp b/test-suite/generated-src/jni/NativeClientInterface.cpp index 16f9c9b5f..fd1cd9809 100644 --- a/test-suite/generated-src/jni/NativeClientInterface.cpp +++ b/test-suite/generated-src/jni/NativeClientInterface.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from client_interface.djinni +#include "project_export.hpp" #include "NativeClientInterface.hpp" // my header #include "Marshal.hpp" #include "NativeClientReturnedRecord.hpp" diff --git a/test-suite/generated-src/jni/NativeClientReturnedRecord.cpp b/test-suite/generated-src/jni/NativeClientReturnedRecord.cpp index da59503ed..1e55eaa10 100644 --- a/test-suite/generated-src/jni/NativeClientReturnedRecord.cpp +++ b/test-suite/generated-src/jni/NativeClientReturnedRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from client_interface.djinni +#include "project_export.hpp" #include "NativeClientReturnedRecord.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeConflict.cpp b/test-suite/generated-src/jni/NativeConflict.cpp index 67fd8dad1..d73bb2877 100644 --- a/test-suite/generated-src/jni/NativeConflict.cpp +++ b/test-suite/generated-src/jni/NativeConflict.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from test.djinni +#include "project_export.hpp" #include "NativeConflict.hpp" // my header namespace djinni_generated { diff --git a/test-suite/generated-src/jni/NativeConflictUser.cpp b/test-suite/generated-src/jni/NativeConflictUser.cpp index 271c1a54e..3fcb00011 100644 --- a/test-suite/generated-src/jni/NativeConflictUser.cpp +++ b/test-suite/generated-src/jni/NativeConflictUser.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from test.djinni +#include "project_export.hpp" #include "NativeConflictUser.hpp" // my header #include "Marshal.hpp" #include "NativeConflict.hpp" diff --git a/test-suite/generated-src/jni/NativeConstantInterfaceWithEnum.cpp b/test-suite/generated-src/jni/NativeConstantInterfaceWithEnum.cpp index 9ba160838..70a945c71 100644 --- a/test-suite/generated-src/jni/NativeConstantInterfaceWithEnum.cpp +++ b/test-suite/generated-src/jni/NativeConstantInterfaceWithEnum.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from constant_enum.djinni +#include "project_export.hpp" #include "NativeConstantInterfaceWithEnum.hpp" // my header #include "NativeConstantEnum.hpp" diff --git a/test-suite/generated-src/jni/NativeConstantRecord.cpp b/test-suite/generated-src/jni/NativeConstantRecord.cpp index 209246b71..d155b5255 100644 --- a/test-suite/generated-src/jni/NativeConstantRecord.cpp +++ b/test-suite/generated-src/jni/NativeConstantRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from constants.djinni +#include "project_export.hpp" #include "NativeConstantRecord.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeConstantWithEnum.cpp b/test-suite/generated-src/jni/NativeConstantWithEnum.cpp index 9b8b6f72f..d8067d54e 100644 --- a/test-suite/generated-src/jni/NativeConstantWithEnum.cpp +++ b/test-suite/generated-src/jni/NativeConstantWithEnum.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from constant_enum.djinni +#include "project_export.hpp" #include "NativeConstantWithEnum.hpp" // my header namespace djinni_generated { diff --git a/test-suite/generated-src/jni/NativeConstants.cpp b/test-suite/generated-src/jni/NativeConstants.cpp index be6d81047..c79066c67 100644 --- a/test-suite/generated-src/jni/NativeConstants.cpp +++ b/test-suite/generated-src/jni/NativeConstants.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from constants.djinni +#include "project_export.hpp" #include "NativeConstants.hpp" // my header namespace djinni_generated { diff --git a/test-suite/generated-src/jni/NativeConstantsInterface.cpp b/test-suite/generated-src/jni/NativeConstantsInterface.cpp index 9928944c1..89f060cab 100644 --- a/test-suite/generated-src/jni/NativeConstantsInterface.cpp +++ b/test-suite/generated-src/jni/NativeConstantsInterface.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from constants.djinni +#include "project_export.hpp" #include "NativeConstantsInterface.hpp" // my header #include "Marshal.hpp" #include "NativeConstantRecord.hpp" diff --git a/test-suite/generated-src/jni/NativeCppException.cpp b/test-suite/generated-src/jni/NativeCppException.cpp index 06da84963..e6b0e5d4e 100644 --- a/test-suite/generated-src/jni/NativeCppException.cpp +++ b/test-suite/generated-src/jni/NativeCppException.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from exception.djinni +#include "project_export.hpp" #include "NativeCppException.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeDateRecord.cpp b/test-suite/generated-src/jni/NativeDateRecord.cpp index b2580e16c..09d63bfd9 100644 --- a/test-suite/generated-src/jni/NativeDateRecord.cpp +++ b/test-suite/generated-src/jni/NativeDateRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from date.djinni +#include "project_export.hpp" #include "NativeDateRecord.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeEmptyRecord.cpp b/test-suite/generated-src/jni/NativeEmptyRecord.cpp index 64ecc3179..e13693b0c 100644 --- a/test-suite/generated-src/jni/NativeEmptyRecord.cpp +++ b/test-suite/generated-src/jni/NativeEmptyRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from test.djinni +#include "project_export.hpp" #include "NativeEmptyRecord.hpp" // my header namespace djinni_generated { diff --git a/test-suite/generated-src/jni/NativeEnumUsageInterface.cpp b/test-suite/generated-src/jni/NativeEnumUsageInterface.cpp index 4e84735d3..f1258a21b 100644 --- a/test-suite/generated-src/jni/NativeEnumUsageInterface.cpp +++ b/test-suite/generated-src/jni/NativeEnumUsageInterface.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from enum.djinni +#include "project_export.hpp" #include "NativeEnumUsageInterface.hpp" // my header #include "Marshal.hpp" #include "NativeColor.hpp" diff --git a/test-suite/generated-src/jni/NativeEnumUsageRecord.cpp b/test-suite/generated-src/jni/NativeEnumUsageRecord.cpp index 0460969ac..4b3eeb352 100644 --- a/test-suite/generated-src/jni/NativeEnumUsageRecord.cpp +++ b/test-suite/generated-src/jni/NativeEnumUsageRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from enum.djinni +#include "project_export.hpp" #include "NativeEnumUsageRecord.hpp" // my header #include "Marshal.hpp" #include "NativeColor.hpp" diff --git a/test-suite/generated-src/jni/NativeExtendedRecord.cpp b/test-suite/generated-src/jni/NativeExtendedRecord.cpp index 57ebe529b..ecbb24b3c 100644 --- a/test-suite/generated-src/jni/NativeExtendedRecord.cpp +++ b/test-suite/generated-src/jni/NativeExtendedRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from extended_record.djinni +#include "project_export.hpp" #include "NativeExtendedRecord.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeExternInterface1.cpp b/test-suite/generated-src/jni/NativeExternInterface1.cpp index d215f20b9..51228bf46 100644 --- a/test-suite/generated-src/jni/NativeExternInterface1.cpp +++ b/test-suite/generated-src/jni/NativeExternInterface1.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from yaml-test.djinni +#include "project_export.hpp" #include "NativeExternInterface1.hpp" // my header #include "NativeClientInterface.hpp" #include "NativeClientReturnedRecord.hpp" diff --git a/test-suite/generated-src/jni/NativeExternInterface2.cpp b/test-suite/generated-src/jni/NativeExternInterface2.cpp index a61b1d101..6a1183dd0 100644 --- a/test-suite/generated-src/jni/NativeExternInterface2.cpp +++ b/test-suite/generated-src/jni/NativeExternInterface2.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from yaml-test.djinni +#include "project_export.hpp" #include "NativeExternInterface2.hpp" // my header #include "NativeExternRecordWithDerivings.hpp" #include "NativeTestHelpers.hpp" diff --git a/test-suite/generated-src/jni/NativeExternRecordWithDerivings.cpp b/test-suite/generated-src/jni/NativeExternRecordWithDerivings.cpp index 994cc64f2..3db0411a2 100644 --- a/test-suite/generated-src/jni/NativeExternRecordWithDerivings.cpp +++ b/test-suite/generated-src/jni/NativeExternRecordWithDerivings.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from yaml-test.djinni +#include "project_export.hpp" #include "NativeExternRecordWithDerivings.hpp" // my header #include "NativeColor.hpp" #include "NativeRecordWithDerivings.hpp" diff --git a/test-suite/generated-src/jni/NativeFirstListener.cpp b/test-suite/generated-src/jni/NativeFirstListener.cpp index e65bd39d1..e4b0dd5b0 100644 --- a/test-suite/generated-src/jni/NativeFirstListener.cpp +++ b/test-suite/generated-src/jni/NativeFirstListener.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from multiple_inheritance.djinni +#include "project_export.hpp" #include "NativeFirstListener.hpp" // my header namespace djinni_generated { diff --git a/test-suite/generated-src/jni/NativeFlagRoundtrip.cpp b/test-suite/generated-src/jni/NativeFlagRoundtrip.cpp index 502bd5af2..e50b84cf1 100644 --- a/test-suite/generated-src/jni/NativeFlagRoundtrip.cpp +++ b/test-suite/generated-src/jni/NativeFlagRoundtrip.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from enum_flags.djinni +#include "project_export.hpp" #include "NativeFlagRoundtrip.hpp" // my header #include "Marshal.hpp" #include "NativeAccessFlags.hpp" diff --git a/test-suite/generated-src/jni/NativeInterfaceUsingExtendedRecord.cpp b/test-suite/generated-src/jni/NativeInterfaceUsingExtendedRecord.cpp index 2a3620f08..f8cee1414 100644 --- a/test-suite/generated-src/jni/NativeInterfaceUsingExtendedRecord.cpp +++ b/test-suite/generated-src/jni/NativeInterfaceUsingExtendedRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from extended_record.djinni +#include "project_export.hpp" #include "NativeInterfaceUsingExtendedRecord.hpp" // my header #include "NativeExtendedRecord.hpp" #include "NativeRecordUsingExtendedRecord.hpp" diff --git a/test-suite/generated-src/jni/NativeJavaOnlyListener.cpp b/test-suite/generated-src/jni/NativeJavaOnlyListener.cpp index 9bcb940cf..17c7393d7 100644 --- a/test-suite/generated-src/jni/NativeJavaOnlyListener.cpp +++ b/test-suite/generated-src/jni/NativeJavaOnlyListener.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from single_language_interfaces.djinni +#include "project_export.hpp" #include "NativeJavaOnlyListener.hpp" // my header namespace djinni_generated { diff --git a/test-suite/generated-src/jni/NativeListenerCaller.cpp b/test-suite/generated-src/jni/NativeListenerCaller.cpp index dc2a1eee6..3ead8912c 100644 --- a/test-suite/generated-src/jni/NativeListenerCaller.cpp +++ b/test-suite/generated-src/jni/NativeListenerCaller.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from multiple_inheritance.djinni +#include "project_export.hpp" #include "NativeListenerCaller.hpp" // my header #include "NativeFirstListener.hpp" #include "NativeSecondListener.hpp" diff --git a/test-suite/generated-src/jni/NativeMapDateRecord.cpp b/test-suite/generated-src/jni/NativeMapDateRecord.cpp index eb359d1ee..8b70253d7 100644 --- a/test-suite/generated-src/jni/NativeMapDateRecord.cpp +++ b/test-suite/generated-src/jni/NativeMapDateRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from date.djinni +#include "project_export.hpp" #include "NativeMapDateRecord.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeMapListRecord.cpp b/test-suite/generated-src/jni/NativeMapListRecord.cpp index a29ae6fdd..168c4c3f3 100644 --- a/test-suite/generated-src/jni/NativeMapListRecord.cpp +++ b/test-suite/generated-src/jni/NativeMapListRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from map.djinni +#include "project_export.hpp" #include "NativeMapListRecord.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeMapRecord.cpp b/test-suite/generated-src/jni/NativeMapRecord.cpp index 21dd19245..a2a5138b5 100644 --- a/test-suite/generated-src/jni/NativeMapRecord.cpp +++ b/test-suite/generated-src/jni/NativeMapRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from map.djinni +#include "project_export.hpp" #include "NativeMapRecord.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeNestedCollection.cpp b/test-suite/generated-src/jni/NativeNestedCollection.cpp index 2d4333095..3a070054f 100644 --- a/test-suite/generated-src/jni/NativeNestedCollection.cpp +++ b/test-suite/generated-src/jni/NativeNestedCollection.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from nested_collection.djinni +#include "project_export.hpp" #include "NativeNestedCollection.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeObjcOnlyListener.cpp b/test-suite/generated-src/jni/NativeObjcOnlyListener.cpp index 5153ad37a..6da2a1d74 100644 --- a/test-suite/generated-src/jni/NativeObjcOnlyListener.cpp +++ b/test-suite/generated-src/jni/NativeObjcOnlyListener.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from single_language_interfaces.djinni +#include "project_export.hpp" #include "NativeObjcOnlyListener.hpp" // my header namespace djinni_generated { diff --git a/test-suite/generated-src/jni/NativePrimitiveList.cpp b/test-suite/generated-src/jni/NativePrimitiveList.cpp index f054e195f..218485c07 100644 --- a/test-suite/generated-src/jni/NativePrimitiveList.cpp +++ b/test-suite/generated-src/jni/NativePrimitiveList.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from primitive_list.djinni +#include "project_export.hpp" #include "NativePrimitiveList.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeRecordUsingExtendedRecord.cpp b/test-suite/generated-src/jni/NativeRecordUsingExtendedRecord.cpp index 05713778b..8a552745f 100644 --- a/test-suite/generated-src/jni/NativeRecordUsingExtendedRecord.cpp +++ b/test-suite/generated-src/jni/NativeRecordUsingExtendedRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from extended_record.djinni +#include "project_export.hpp" #include "NativeRecordUsingExtendedRecord.hpp" // my header #include "NativeExtendedRecord.hpp" diff --git a/test-suite/generated-src/jni/NativeRecordWithDerivings.cpp b/test-suite/generated-src/jni/NativeRecordWithDerivings.cpp index 707e7e364..4e6b62fc6 100644 --- a/test-suite/generated-src/jni/NativeRecordWithDerivings.cpp +++ b/test-suite/generated-src/jni/NativeRecordWithDerivings.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from derivings.djinni +#include "project_export.hpp" #include "NativeRecordWithDerivings.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeRecordWithDurationAndDerivings.cpp b/test-suite/generated-src/jni/NativeRecordWithDurationAndDerivings.cpp index de3d59023..7962a2645 100644 --- a/test-suite/generated-src/jni/NativeRecordWithDurationAndDerivings.cpp +++ b/test-suite/generated-src/jni/NativeRecordWithDurationAndDerivings.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from duration.djinni +#include "project_export.hpp" #include "NativeRecordWithDurationAndDerivings.hpp" // my header #include "Duration-jni.hpp" #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeRecordWithFlags.cpp b/test-suite/generated-src/jni/NativeRecordWithFlags.cpp index 840ddde03..ff9444e8c 100644 --- a/test-suite/generated-src/jni/NativeRecordWithFlags.cpp +++ b/test-suite/generated-src/jni/NativeRecordWithFlags.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from enum_flags.djinni +#include "project_export.hpp" #include "NativeRecordWithFlags.hpp" // my header #include "NativeAccessFlags.hpp" diff --git a/test-suite/generated-src/jni/NativeRecordWithNestedDerivings.cpp b/test-suite/generated-src/jni/NativeRecordWithNestedDerivings.cpp index 79bcae165..57e3107fe 100644 --- a/test-suite/generated-src/jni/NativeRecordWithNestedDerivings.cpp +++ b/test-suite/generated-src/jni/NativeRecordWithNestedDerivings.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from derivings.djinni +#include "project_export.hpp" #include "NativeRecordWithNestedDerivings.hpp" // my header #include "Marshal.hpp" #include "NativeRecordWithDerivings.hpp" diff --git a/test-suite/generated-src/jni/NativeReturnOne.cpp b/test-suite/generated-src/jni/NativeReturnOne.cpp index 76ac84e24..7d94d922e 100644 --- a/test-suite/generated-src/jni/NativeReturnOne.cpp +++ b/test-suite/generated-src/jni/NativeReturnOne.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from multiple_inheritance.djinni +#include "project_export.hpp" #include "NativeReturnOne.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeReturnTwo.cpp b/test-suite/generated-src/jni/NativeReturnTwo.cpp index dffef3c97..bab545ee2 100644 --- a/test-suite/generated-src/jni/NativeReturnTwo.cpp +++ b/test-suite/generated-src/jni/NativeReturnTwo.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from multiple_inheritance.djinni +#include "project_export.hpp" #include "NativeReturnTwo.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeReverseClientInterface.cpp b/test-suite/generated-src/jni/NativeReverseClientInterface.cpp index b46930d69..7710fd24f 100644 --- a/test-suite/generated-src/jni/NativeReverseClientInterface.cpp +++ b/test-suite/generated-src/jni/NativeReverseClientInterface.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from client_interface.djinni +#include "project_export.hpp" #include "NativeReverseClientInterface.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeSecondListener.cpp b/test-suite/generated-src/jni/NativeSecondListener.cpp index b21b0eb2c..8588697e3 100644 --- a/test-suite/generated-src/jni/NativeSecondListener.cpp +++ b/test-suite/generated-src/jni/NativeSecondListener.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from multiple_inheritance.djinni +#include "project_export.hpp" #include "NativeSecondListener.hpp" // my header namespace djinni_generated { diff --git a/test-suite/generated-src/jni/NativeSetRecord.cpp b/test-suite/generated-src/jni/NativeSetRecord.cpp index 4ead65146..f8a1e16bf 100644 --- a/test-suite/generated-src/jni/NativeSetRecord.cpp +++ b/test-suite/generated-src/jni/NativeSetRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from set.djinni +#include "project_export.hpp" #include "NativeSetRecord.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeTestDuration.cpp b/test-suite/generated-src/jni/NativeTestDuration.cpp index 21ab32b7a..829f3f7d7 100644 --- a/test-suite/generated-src/jni/NativeTestDuration.cpp +++ b/test-suite/generated-src/jni/NativeTestDuration.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from duration.djinni +#include "project_export.hpp" #include "NativeTestDuration.hpp" // my header #include "Duration-jni.hpp" #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeTestHelpers.cpp b/test-suite/generated-src/jni/NativeTestHelpers.cpp index 359b07da5..b009293c3 100644 --- a/test-suite/generated-src/jni/NativeTestHelpers.cpp +++ b/test-suite/generated-src/jni/NativeTestHelpers.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from test.djinni +#include "project_export.hpp" #include "NativeTestHelpers.hpp" // my header #include "Marshal.hpp" #include "NativeAssortedPrimitives.hpp" diff --git a/test-suite/generated-src/jni/NativeUserToken.cpp b/test-suite/generated-src/jni/NativeUserToken.cpp index a1bc87eb5..e18400d36 100644 --- a/test-suite/generated-src/jni/NativeUserToken.cpp +++ b/test-suite/generated-src/jni/NativeUserToken.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from user_token.djinni +#include "project_export.hpp" #include "NativeUserToken.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeUsesSingleLanguageListeners.cpp b/test-suite/generated-src/jni/NativeUsesSingleLanguageListeners.cpp index dd909ac1b..5a66776f2 100644 --- a/test-suite/generated-src/jni/NativeUsesSingleLanguageListeners.cpp +++ b/test-suite/generated-src/jni/NativeUsesSingleLanguageListeners.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from single_language_interfaces.djinni +#include "project_export.hpp" #include "NativeUsesSingleLanguageListeners.hpp" // my header #include "NativeJavaOnlyListener.hpp" #include "NativeObjcOnlyListener.hpp" diff --git a/test-suite/generated-src/jni/NativeVarnameInterface.cpp b/test-suite/generated-src/jni/NativeVarnameInterface.cpp index ff5eb5038..a7d593c36 100644 --- a/test-suite/generated-src/jni/NativeVarnameInterface.cpp +++ b/test-suite/generated-src/jni/NativeVarnameInterface.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from varnames.djinni +#include "project_export.hpp" #include "NativeVarnameInterface.hpp" // my header #include "NativeVarnameRecord.hpp" diff --git a/test-suite/generated-src/jni/NativeVarnameRecord.cpp b/test-suite/generated-src/jni/NativeVarnameRecord.cpp index 4d3e34293..eaa4ed0dd 100644 --- a/test-suite/generated-src/jni/NativeVarnameRecord.cpp +++ b/test-suite/generated-src/jni/NativeVarnameRecord.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from varnames.djinni +#include "project_export.hpp" #include "NativeVarnameRecord.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/jni/NativeWcharTestHelpers.cpp b/test-suite/generated-src/jni/NativeWcharTestHelpers.cpp index 8ea8c9c94..c739f96e7 100644 --- a/test-suite/generated-src/jni/NativeWcharTestHelpers.cpp +++ b/test-suite/generated-src/jni/NativeWcharTestHelpers.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from wchar_test.djinni +#include "project_export.hpp" #include "NativeWcharTestHelpers.hpp" // my header #include "Marshal.hpp" #include "NativeWcharTestRec.hpp" diff --git a/test-suite/generated-src/jni/NativeWcharTestRec.cpp b/test-suite/generated-src/jni/NativeWcharTestRec.cpp index ee981e5b2..503c34c39 100644 --- a/test-suite/generated-src/jni/NativeWcharTestRec.cpp +++ b/test-suite/generated-src/jni/NativeWcharTestRec.cpp @@ -1,6 +1,7 @@ // AUTOGENERATED FILE - DO NOT MODIFY! // This file generated by Djinni from wchar_test.djinni +#include "project_export.hpp" #include "NativeWcharTestRec.hpp" // my header #include "Marshal.hpp" diff --git a/test-suite/generated-src/objc/DBAssortedPrimitives.h b/test-suite/generated-src/objc/DBAssortedPrimitives.h index 500a10ee8..a75cb8af6 100644 --- a/test-suite/generated-src/objc/DBAssortedPrimitives.h +++ b/test-suite/generated-src/objc/DBAssortedPrimitives.h @@ -3,6 +3,7 @@ #import +__attribute__((visibility ("default"))) @interface DBAssortedPrimitives : NSObject - (nonnull instancetype)initWithB:(BOOL)b eight:(int8_t)eight diff --git a/test-suite/generated-src/objc/DBClientInterface.h b/test-suite/generated-src/objc/DBClientInterface.h index 73c7a883f..a83f28d25 100644 --- a/test-suite/generated-src/objc/DBClientInterface.h +++ b/test-suite/generated-src/objc/DBClientInterface.h @@ -7,6 +7,7 @@ /** Client interface */ +__attribute__((visibility ("default"))) @protocol DBClientInterface /** Returns record of given string */ diff --git a/test-suite/generated-src/objc/DBClientReturnedRecord.h b/test-suite/generated-src/objc/DBClientReturnedRecord.h index cbadd28d9..43b6914c2 100644 --- a/test-suite/generated-src/objc/DBClientReturnedRecord.h +++ b/test-suite/generated-src/objc/DBClientReturnedRecord.h @@ -4,6 +4,7 @@ #import /** Record returned by a client */ +__attribute__((visibility ("default"))) @interface DBClientReturnedRecord : NSObject - (nonnull instancetype)initWithRecordId:(int64_t)recordId content:(nonnull NSString *)content diff --git a/test-suite/generated-src/objc/DBConflict+Private.mm b/test-suite/generated-src/objc/DBConflict+Private.mm index 4f4d7dae5..5f44d00c1 100644 --- a/test-suite/generated-src/objc/DBConflict+Private.mm +++ b/test-suite/generated-src/objc/DBConflict+Private.mm @@ -11,6 +11,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBConflict () - (id)initWithCpp:(const std::shared_ptr<::testsuite::Conflict>&)cppRef; diff --git a/test-suite/generated-src/objc/DBConflict.h b/test-suite/generated-src/objc/DBConflict.h index 1dfaedc37..ebe6d3479 100644 --- a/test-suite/generated-src/objc/DBConflict.h +++ b/test-suite/generated-src/objc/DBConflict.h @@ -8,6 +8,7 @@ * Test for conflict of method name with an interface name. * See the comments about scopeSymbols in CppMarshal.scala for more info. */ +__attribute__((visibility ("default"))) @interface DBConflict : NSObject @end diff --git a/test-suite/generated-src/objc/DBConflictUser+Private.mm b/test-suite/generated-src/objc/DBConflictUser+Private.mm index 937934de1..a0af8c118 100644 --- a/test-suite/generated-src/objc/DBConflictUser+Private.mm +++ b/test-suite/generated-src/objc/DBConflictUser+Private.mm @@ -13,6 +13,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBConflictUser () - (id)initWithCpp:(const std::shared_ptr<::testsuite::ConflictUser>&)cppRef; diff --git a/test-suite/generated-src/objc/DBConflictUser.h b/test-suite/generated-src/objc/DBConflictUser.h index 369018495..fc486d45e 100644 --- a/test-suite/generated-src/objc/DBConflictUser.h +++ b/test-suite/generated-src/objc/DBConflictUser.h @@ -5,6 +5,7 @@ @class DBConflict; +__attribute__((visibility ("default"))) @interface DBConflictUser : NSObject - (nullable DBConflict *)Conflict; diff --git a/test-suite/generated-src/objc/DBConstantInterfaceWithEnum+Private.mm b/test-suite/generated-src/objc/DBConstantInterfaceWithEnum+Private.mm index ae5719e2c..9822f4031 100644 --- a/test-suite/generated-src/objc/DBConstantInterfaceWithEnum+Private.mm +++ b/test-suite/generated-src/objc/DBConstantInterfaceWithEnum+Private.mm @@ -12,6 +12,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBConstantInterfaceWithEnum () - (id)initWithCpp:(const std::shared_ptr<::testsuite::ConstantInterfaceWithEnum>&)cppRef; diff --git a/test-suite/generated-src/objc/DBConstantInterfaceWithEnum.h b/test-suite/generated-src/objc/DBConstantInterfaceWithEnum.h index 4bce1df46..a8bd5fe37 100644 --- a/test-suite/generated-src/objc/DBConstantInterfaceWithEnum.h +++ b/test-suite/generated-src/objc/DBConstantInterfaceWithEnum.h @@ -6,6 +6,7 @@ /** Interface containing enum constant */ +__attribute__((visibility ("default"))) @interface DBConstantInterfaceWithEnum : NSObject + (DBConstantEnum)constEnum; diff --git a/test-suite/generated-src/objc/DBConstantRecord.h b/test-suite/generated-src/objc/DBConstantRecord.h index d16389736..2c3a286d3 100644 --- a/test-suite/generated-src/objc/DBConstantRecord.h +++ b/test-suite/generated-src/objc/DBConstantRecord.h @@ -4,6 +4,7 @@ #import /** Record for use in constants */ +__attribute__((visibility ("default"))) @interface DBConstantRecord : NSObject - (nonnull instancetype)initWithSomeInteger:(int32_t)someInteger someString:(nonnull NSString *)someString; diff --git a/test-suite/generated-src/objc/DBConstantWithEnum.h b/test-suite/generated-src/objc/DBConstantWithEnum.h index 56f464ec3..e1e494d94 100644 --- a/test-suite/generated-src/objc/DBConstantWithEnum.h +++ b/test-suite/generated-src/objc/DBConstantWithEnum.h @@ -5,6 +5,7 @@ #import /** Record containing enum constant */ +__attribute__((visibility ("default"))) @interface DBConstantWithEnum : NSObject - (nonnull instancetype)init; + (nonnull instancetype)constantWithEnum; diff --git a/test-suite/generated-src/objc/DBConstants.h b/test-suite/generated-src/objc/DBConstants.h index f29696d84..1bf7f4e44 100644 --- a/test-suite/generated-src/objc/DBConstants.h +++ b/test-suite/generated-src/objc/DBConstants.h @@ -5,6 +5,7 @@ #import /** Record containing constants */ +__attribute__((visibility ("default"))) @interface DBConstants : NSObject - (nonnull instancetype)init; + (nonnull instancetype)constants; @@ -26,23 +27,33 @@ @end /** bool_constant has documentation. */ +__attribute__((visibility ("default"))) extern BOOL const DBConstantsBoolConstant; +__attribute__((visibility ("default"))) extern int8_t const DBConstantsI8Constant; +__attribute__((visibility ("default"))) extern int16_t const DBConstantsI16Constant; +__attribute__((visibility ("default"))) extern int32_t const DBConstantsI32Constant; +__attribute__((visibility ("default"))) extern int64_t const DBConstantsI64Constant; +__attribute__((visibility ("default"))) extern float const DBConstantsF32Constant; /** * f64_constant has long documentation. * (Second line of multi-line documentation. * Indented third line of multi-line documentation.) */ +__attribute__((visibility ("default"))) extern double const DBConstantsF64Constant; +__attribute__((visibility ("default"))) extern NSString * __nonnull const DBConstantsStringConstant; +__attribute__((visibility ("default"))) extern NSString * __nullable const DBConstantsOptStringConstant; /** * No support for null optional constants * No support for optional constant records * No support for constant binary, list, set, map */ +__attribute__((visibility ("default"))) extern BOOL const DBConstantsDummy; diff --git a/test-suite/generated-src/objc/DBConstantsInterface+Private.mm b/test-suite/generated-src/objc/DBConstantsInterface+Private.mm index f6e7db467..f20f4f412 100644 --- a/test-suite/generated-src/objc/DBConstantsInterface+Private.mm +++ b/test-suite/generated-src/objc/DBConstantsInterface+Private.mm @@ -13,6 +13,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBConstantsInterface () - (id)initWithCpp:(const std::shared_ptr<::testsuite::ConstantsInterface>&)cppRef; diff --git a/test-suite/generated-src/objc/DBConstantsInterface.h b/test-suite/generated-src/objc/DBConstantsInterface.h index c8c86ca24..695a3768c 100644 --- a/test-suite/generated-src/objc/DBConstantsInterface.h +++ b/test-suite/generated-src/objc/DBConstantsInterface.h @@ -4,23 +4,33 @@ #import "DBConstantRecord.h" #import +__attribute__((visibility ("default"))) extern BOOL const DBConstantsInterfaceBoolConstant; +__attribute__((visibility ("default"))) extern int8_t const DBConstantsInterfaceI8Constant; +__attribute__((visibility ("default"))) extern int16_t const DBConstantsInterfaceI16Constant; /** i32_constant has documentation. */ +__attribute__((visibility ("default"))) extern int32_t const DBConstantsInterfaceI32Constant; /** * i64_constant has long documentation. * (Second line of multi-line documentation. * Indented third line of multi-line documentation.) */ +__attribute__((visibility ("default"))) extern int64_t const DBConstantsInterfaceI64Constant; +__attribute__((visibility ("default"))) extern float const DBConstantsInterfaceF32Constant; +__attribute__((visibility ("default"))) extern double const DBConstantsInterfaceF64Constant; +__attribute__((visibility ("default"))) extern NSString * __nonnull const DBConstantsInterfaceStringConstant; +__attribute__((visibility ("default"))) extern NSString * __nullable const DBConstantsInterfaceOptStringConstant; /** Interface containing constants */ +__attribute__((visibility ("default"))) @interface DBConstantsInterface : NSObject /** diff --git a/test-suite/generated-src/objc/DBCppException+Private.mm b/test-suite/generated-src/objc/DBCppException+Private.mm index 6d068a92e..9add9cf92 100644 --- a/test-suite/generated-src/objc/DBCppException+Private.mm +++ b/test-suite/generated-src/objc/DBCppException+Private.mm @@ -12,6 +12,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBCppException () - (id)initWithCpp:(const std::shared_ptr<::testsuite::CppException>&)cppRef; diff --git a/test-suite/generated-src/objc/DBCppException.h b/test-suite/generated-src/objc/DBCppException.h index 56ad21933..301020873 100644 --- a/test-suite/generated-src/objc/DBCppException.h +++ b/test-suite/generated-src/objc/DBCppException.h @@ -5,6 +5,7 @@ @class DBCppException; +__attribute__((visibility ("default"))) @interface DBCppException : NSObject - (int32_t)throwAnException; diff --git a/test-suite/generated-src/objc/DBDateRecord.h b/test-suite/generated-src/objc/DBDateRecord.h index 039d05433..9d6b7f4d4 100644 --- a/test-suite/generated-src/objc/DBDateRecord.h +++ b/test-suite/generated-src/objc/DBDateRecord.h @@ -3,6 +3,7 @@ #import +__attribute__((visibility ("default"))) @interface DBDateRecord : NSObject - (nonnull instancetype)initWithCreatedAt:(nonnull NSDate *)createdAt; + (nonnull instancetype)dateRecordWithCreatedAt:(nonnull NSDate *)createdAt; diff --git a/test-suite/generated-src/objc/DBEmptyRecord.h b/test-suite/generated-src/objc/DBEmptyRecord.h index 1dc120e42..9fa744c72 100644 --- a/test-suite/generated-src/objc/DBEmptyRecord.h +++ b/test-suite/generated-src/objc/DBEmptyRecord.h @@ -8,6 +8,7 @@ * (Second line of multi-line documentation. * Indented third line of multi-line documentation.) */ +__attribute__((visibility ("default"))) @interface DBEmptyRecord : NSObject - (nonnull instancetype)init; + (nonnull instancetype)emptyRecord; diff --git a/test-suite/generated-src/objc/DBEnumUsageInterface+Private.mm b/test-suite/generated-src/objc/DBEnumUsageInterface+Private.mm index fba81e140..f3cbd382f 100644 --- a/test-suite/generated-src/objc/DBEnumUsageInterface+Private.mm +++ b/test-suite/generated-src/objc/DBEnumUsageInterface+Private.mm @@ -14,6 +14,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBEnumUsageInterfaceCppProxy : NSObject - (id)initWithCpp:(const std::shared_ptr<::testsuite::EnumUsageInterface>&)cppRef; diff --git a/test-suite/generated-src/objc/DBEnumUsageInterface.h b/test-suite/generated-src/objc/DBEnumUsageInterface.h index b1dea8045..1c0610d5b 100644 --- a/test-suite/generated-src/objc/DBEnumUsageInterface.h +++ b/test-suite/generated-src/objc/DBEnumUsageInterface.h @@ -5,6 +5,7 @@ #import +__attribute__((visibility ("default"))) @protocol DBEnumUsageInterface - (DBColor)e:(DBColor)e; diff --git a/test-suite/generated-src/objc/DBEnumUsageRecord.h b/test-suite/generated-src/objc/DBEnumUsageRecord.h index cbc7f0952..1262766db 100644 --- a/test-suite/generated-src/objc/DBEnumUsageRecord.h +++ b/test-suite/generated-src/objc/DBEnumUsageRecord.h @@ -4,6 +4,7 @@ #import "DBColor.h" #import +__attribute__((visibility ("default"))) @interface DBEnumUsageRecord : NSObject - (nonnull instancetype)initWithE:(DBColor)e o:(nullable NSNumber *)o diff --git a/test-suite/generated-src/objc/DBExtendedRecord.h b/test-suite/generated-src/objc/DBExtendedRecord.h index 70618b3e8..ad0a1580c 100644 --- a/test-suite/generated-src/objc/DBExtendedRecord.h +++ b/test-suite/generated-src/objc/DBExtendedRecord.h @@ -5,6 +5,7 @@ #import /** Extended record */ +__attribute__((visibility ("default"))) @interface DBExtendedRecord : NSObject - (nonnull instancetype)initWithFoo:(BOOL)foo; + (nonnull instancetype)extendedRecordWithFoo:(BOOL)foo; diff --git a/test-suite/generated-src/objc/DBExternInterface1+Private.mm b/test-suite/generated-src/objc/DBExternInterface1+Private.mm index 6a85c6f8b..5a1f3a5e4 100644 --- a/test-suite/generated-src/objc/DBExternInterface1+Private.mm +++ b/test-suite/generated-src/objc/DBExternInterface1+Private.mm @@ -13,6 +13,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBExternInterface1 () - (id)initWithCpp:(const std::shared_ptr<::ExternInterface1>&)cppRef; diff --git a/test-suite/generated-src/objc/DBExternInterface1.h b/test-suite/generated-src/objc/DBExternInterface1.h index 25fac69cf..8c772fedb 100644 --- a/test-suite/generated-src/objc/DBExternInterface1.h +++ b/test-suite/generated-src/objc/DBExternInterface1.h @@ -6,6 +6,7 @@ #import +__attribute__((visibility ("default"))) @interface DBExternInterface1 : NSObject - (nonnull DBClientReturnedRecord *)foo:(nullable id)i; diff --git a/test-suite/generated-src/objc/DBExternInterface2.h b/test-suite/generated-src/objc/DBExternInterface2.h index e027ebcff..db0783fd2 100644 --- a/test-suite/generated-src/objc/DBExternInterface2.h +++ b/test-suite/generated-src/objc/DBExternInterface2.h @@ -6,6 +6,7 @@ #import +__attribute__((visibility ("default"))) @protocol DBExternInterface2 - (nonnull DBExternRecordWithDerivings *)foo:(nullable DBTestHelpers *)i; diff --git a/test-suite/generated-src/objc/DBExternRecordWithDerivings.h b/test-suite/generated-src/objc/DBExternRecordWithDerivings.h index fb4b12ee3..7ad965a40 100644 --- a/test-suite/generated-src/objc/DBExternRecordWithDerivings.h +++ b/test-suite/generated-src/objc/DBExternRecordWithDerivings.h @@ -6,6 +6,7 @@ #import /** This file tests YAML dumped by Djinni can be parsed back in */ +__attribute__((visibility ("default"))) @interface DBExternRecordWithDerivings : NSObject - (nonnull instancetype)initWithMember:(nonnull DBRecordWithDerivings *)member e:(DBColor)e; diff --git a/test-suite/generated-src/objc/DBFirstListener.h b/test-suite/generated-src/objc/DBFirstListener.h index d5da0c67c..17060bb8e 100644 --- a/test-suite/generated-src/objc/DBFirstListener.h +++ b/test-suite/generated-src/objc/DBFirstListener.h @@ -5,6 +5,7 @@ /** Used for ObjC multiple inheritance tests */ +__attribute__((visibility ("default"))) @protocol DBFirstListener - (void)first; diff --git a/test-suite/generated-src/objc/DBFlagRoundtrip+Private.mm b/test-suite/generated-src/objc/DBFlagRoundtrip+Private.mm index 32e112d44..41fb1c4ab 100644 --- a/test-suite/generated-src/objc/DBFlagRoundtrip+Private.mm +++ b/test-suite/generated-src/objc/DBFlagRoundtrip+Private.mm @@ -14,6 +14,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBFlagRoundtrip () - (id)initWithCpp:(const std::shared_ptr<::testsuite::FlagRoundtrip>&)cppRef; diff --git a/test-suite/generated-src/objc/DBFlagRoundtrip.h b/test-suite/generated-src/objc/DBFlagRoundtrip.h index a73ef8571..4ba1f02b0 100644 --- a/test-suite/generated-src/objc/DBFlagRoundtrip.h +++ b/test-suite/generated-src/objc/DBFlagRoundtrip.h @@ -6,6 +6,7 @@ #import +__attribute__((visibility ("default"))) @interface DBFlagRoundtrip : NSObject + (DBAccessFlags)roundtripAccess:(DBAccessFlags)flag; diff --git a/test-suite/generated-src/objc/DBInterfaceUsingExtendedRecord+Private.mm b/test-suite/generated-src/objc/DBInterfaceUsingExtendedRecord+Private.mm index 20048f849..0624ae393 100644 --- a/test-suite/generated-src/objc/DBInterfaceUsingExtendedRecord+Private.mm +++ b/test-suite/generated-src/objc/DBInterfaceUsingExtendedRecord+Private.mm @@ -13,6 +13,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBInterfaceUsingExtendedRecord () - (id)initWithCpp:(const std::shared_ptr<::testsuite::InterfaceUsingExtendedRecord>&)cppRef; diff --git a/test-suite/generated-src/objc/DBInterfaceUsingExtendedRecord.h b/test-suite/generated-src/objc/DBInterfaceUsingExtendedRecord.h index db6d69a2b..5a4322fa2 100644 --- a/test-suite/generated-src/objc/DBInterfaceUsingExtendedRecord.h +++ b/test-suite/generated-src/objc/DBInterfaceUsingExtendedRecord.h @@ -6,6 +6,7 @@ #import +__attribute__((visibility ("default"))) @interface DBInterfaceUsingExtendedRecord : NSObject - (nonnull DBExtendedRecord *)meth:(nonnull DBExtendedRecord *)er; diff --git a/test-suite/generated-src/objc/DBJavaOnlyListener.h b/test-suite/generated-src/objc/DBJavaOnlyListener.h index 4dfc13c58..8c1f8e5ac 100644 --- a/test-suite/generated-src/objc/DBJavaOnlyListener.h +++ b/test-suite/generated-src/objc/DBJavaOnlyListener.h @@ -4,6 +4,7 @@ #import +__attribute__((visibility ("default"))) @interface DBJavaOnlyListener : NSObject @end diff --git a/test-suite/generated-src/objc/DBListenerCaller+Private.mm b/test-suite/generated-src/objc/DBListenerCaller+Private.mm index b403438af..f425aeae4 100644 --- a/test-suite/generated-src/objc/DBListenerCaller+Private.mm +++ b/test-suite/generated-src/objc/DBListenerCaller+Private.mm @@ -13,6 +13,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBListenerCaller () - (id)initWithCpp:(const std::shared_ptr<::testsuite::ListenerCaller>&)cppRef; diff --git a/test-suite/generated-src/objc/DBListenerCaller.h b/test-suite/generated-src/objc/DBListenerCaller.h index c96e2fe9e..2fc4c2667 100644 --- a/test-suite/generated-src/objc/DBListenerCaller.h +++ b/test-suite/generated-src/objc/DBListenerCaller.h @@ -13,6 +13,7 @@ * languages, due to the details of multiple inheritance and object * comparison. */ +__attribute__((visibility ("default"))) @interface DBListenerCaller : NSObject + (nullable DBListenerCaller *)init:(nullable id)firstL diff --git a/test-suite/generated-src/objc/DBMapDateRecord.h b/test-suite/generated-src/objc/DBMapDateRecord.h index a31b346af..fbc409f4e 100644 --- a/test-suite/generated-src/objc/DBMapDateRecord.h +++ b/test-suite/generated-src/objc/DBMapDateRecord.h @@ -3,6 +3,7 @@ #import +__attribute__((visibility ("default"))) @interface DBMapDateRecord : NSObject - (nonnull instancetype)initWithDatesById:(nonnull NSDictionary *)datesById; + (nonnull instancetype)mapDateRecordWithDatesById:(nonnull NSDictionary *)datesById; diff --git a/test-suite/generated-src/objc/DBMapListRecord.h b/test-suite/generated-src/objc/DBMapListRecord.h index b86fb1a0a..a24cc6794 100644 --- a/test-suite/generated-src/objc/DBMapListRecord.h +++ b/test-suite/generated-src/objc/DBMapListRecord.h @@ -3,6 +3,7 @@ #import +__attribute__((visibility ("default"))) @interface DBMapListRecord : NSObject - (nonnull instancetype)initWithMapList:(nonnull NSArray *> *)mapList; + (nonnull instancetype)mapListRecordWithMapList:(nonnull NSArray *> *)mapList; diff --git a/test-suite/generated-src/objc/DBMapRecord.h b/test-suite/generated-src/objc/DBMapRecord.h index 2f0dd7d91..637589f23 100644 --- a/test-suite/generated-src/objc/DBMapRecord.h +++ b/test-suite/generated-src/objc/DBMapRecord.h @@ -3,6 +3,7 @@ #import +__attribute__((visibility ("default"))) @interface DBMapRecord : NSObject - (nonnull instancetype)initWithMap:(nonnull NSDictionary *)map imap:(nonnull NSDictionary *)imap; diff --git a/test-suite/generated-src/objc/DBNestedCollection.h b/test-suite/generated-src/objc/DBNestedCollection.h index 1af0699f8..28ac7ed40 100644 --- a/test-suite/generated-src/objc/DBNestedCollection.h +++ b/test-suite/generated-src/objc/DBNestedCollection.h @@ -3,6 +3,7 @@ #import +__attribute__((visibility ("default"))) @interface DBNestedCollection : NSObject - (nonnull instancetype)initWithSetList:(nonnull NSArray *> *)setList; + (nonnull instancetype)nestedCollectionWithSetList:(nonnull NSArray *> *)setList; diff --git a/test-suite/generated-src/objc/DBObjcOnlyListener.h b/test-suite/generated-src/objc/DBObjcOnlyListener.h index e79cd9c57..fc54bc16d 100644 --- a/test-suite/generated-src/objc/DBObjcOnlyListener.h +++ b/test-suite/generated-src/objc/DBObjcOnlyListener.h @@ -4,6 +4,7 @@ #import +__attribute__((visibility ("default"))) @protocol DBObjcOnlyListener @end diff --git a/test-suite/generated-src/objc/DBPrimitiveList.h b/test-suite/generated-src/objc/DBPrimitiveList.h index f08ac4f16..76e26fea0 100644 --- a/test-suite/generated-src/objc/DBPrimitiveList.h +++ b/test-suite/generated-src/objc/DBPrimitiveList.h @@ -3,6 +3,7 @@ #import +__attribute__((visibility ("default"))) @interface DBPrimitiveList : NSObject - (nonnull instancetype)initWithList:(nonnull NSArray *)list; + (nonnull instancetype)primitiveListWithList:(nonnull NSArray *)list; diff --git a/test-suite/generated-src/objc/DBRecordUsingExtendedRecord.h b/test-suite/generated-src/objc/DBRecordUsingExtendedRecord.h index c62deea4a..6f91a22df 100644 --- a/test-suite/generated-src/objc/DBRecordUsingExtendedRecord.h +++ b/test-suite/generated-src/objc/DBRecordUsingExtendedRecord.h @@ -5,6 +5,7 @@ #import "DBRecordUsingExtendedRecord.h" #import +__attribute__((visibility ("default"))) @interface DBRecordUsingExtendedRecord : NSObject - (nonnull instancetype)initWithEr:(nonnull DBExtendedRecord *)er; + (nonnull instancetype)recordUsingExtendedRecordWithEr:(nonnull DBExtendedRecord *)er; diff --git a/test-suite/generated-src/objc/DBRecordWithDerivings.h b/test-suite/generated-src/objc/DBRecordWithDerivings.h index 7ff5c438e..f231bf0b3 100644 --- a/test-suite/generated-src/objc/DBRecordWithDerivings.h +++ b/test-suite/generated-src/objc/DBRecordWithDerivings.h @@ -3,6 +3,7 @@ #import +__attribute__((visibility ("default"))) @interface DBRecordWithDerivings : NSObject - (nonnull instancetype)initWithEight:(int8_t)eight sixteen:(int16_t)sixteen diff --git a/test-suite/generated-src/objc/DBRecordWithDurationAndDerivings.h b/test-suite/generated-src/objc/DBRecordWithDurationAndDerivings.h index f9b2dd149..052c8ad78 100644 --- a/test-suite/generated-src/objc/DBRecordWithDurationAndDerivings.h +++ b/test-suite/generated-src/objc/DBRecordWithDurationAndDerivings.h @@ -3,6 +3,7 @@ #import +__attribute__((visibility ("default"))) @interface DBRecordWithDurationAndDerivings : NSObject - (nonnull instancetype)initWithDt:(NSTimeInterval)dt; + (nonnull instancetype)recordWithDurationAndDerivingsWithDt:(NSTimeInterval)dt; diff --git a/test-suite/generated-src/objc/DBRecordWithFlags.h b/test-suite/generated-src/objc/DBRecordWithFlags.h index c815ea887..e3e9243b2 100644 --- a/test-suite/generated-src/objc/DBRecordWithFlags.h +++ b/test-suite/generated-src/objc/DBRecordWithFlags.h @@ -4,6 +4,7 @@ #import "DBAccessFlags.h" #import +__attribute__((visibility ("default"))) @interface DBRecordWithFlags : NSObject - (nonnull instancetype)initWithAccess:(DBAccessFlags)access; + (nonnull instancetype)recordWithFlagsWithAccess:(DBAccessFlags)access; diff --git a/test-suite/generated-src/objc/DBRecordWithNestedDerivings.h b/test-suite/generated-src/objc/DBRecordWithNestedDerivings.h index a31ccc5c6..8a7923c1a 100644 --- a/test-suite/generated-src/objc/DBRecordWithNestedDerivings.h +++ b/test-suite/generated-src/objc/DBRecordWithNestedDerivings.h @@ -4,6 +4,7 @@ #import "DBRecordWithDerivings.h" #import +__attribute__((visibility ("default"))) @interface DBRecordWithNestedDerivings : NSObject - (nonnull instancetype)initWithKey:(int32_t)key rec:(nonnull DBRecordWithDerivings *)rec; diff --git a/test-suite/generated-src/objc/DBReturnOne+Private.mm b/test-suite/generated-src/objc/DBReturnOne+Private.mm index 1b363b5c6..1b9c10be5 100644 --- a/test-suite/generated-src/objc/DBReturnOne+Private.mm +++ b/test-suite/generated-src/objc/DBReturnOne+Private.mm @@ -12,6 +12,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBReturnOne () - (id)initWithCpp:(const std::shared_ptr<::testsuite::ReturnOne>&)cppRef; diff --git a/test-suite/generated-src/objc/DBReturnOne.h b/test-suite/generated-src/objc/DBReturnOne.h index 95a7ab84a..5587dc5b6 100644 --- a/test-suite/generated-src/objc/DBReturnOne.h +++ b/test-suite/generated-src/objc/DBReturnOne.h @@ -6,6 +6,7 @@ /** Used for C++ multiple inheritance tests */ +__attribute__((visibility ("default"))) @interface DBReturnOne : NSObject + (nullable DBReturnOne *)getInstance; diff --git a/test-suite/generated-src/objc/DBReturnTwo+Private.mm b/test-suite/generated-src/objc/DBReturnTwo+Private.mm index 1050fb043..f63b15ca9 100644 --- a/test-suite/generated-src/objc/DBReturnTwo+Private.mm +++ b/test-suite/generated-src/objc/DBReturnTwo+Private.mm @@ -12,6 +12,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBReturnTwo () - (id)initWithCpp:(const std::shared_ptr<::testsuite::ReturnTwo>&)cppRef; diff --git a/test-suite/generated-src/objc/DBReturnTwo.h b/test-suite/generated-src/objc/DBReturnTwo.h index 2e3438950..1af6722e6 100644 --- a/test-suite/generated-src/objc/DBReturnTwo.h +++ b/test-suite/generated-src/objc/DBReturnTwo.h @@ -6,6 +6,7 @@ /** Used for C++ multiple inheritance tests */ +__attribute__((visibility ("default"))) @interface DBReturnTwo : NSObject + (nullable DBReturnTwo *)getInstance; diff --git a/test-suite/generated-src/objc/DBReverseClientInterface+Private.mm b/test-suite/generated-src/objc/DBReverseClientInterface+Private.mm index 9e5fd500f..ed440873d 100644 --- a/test-suite/generated-src/objc/DBReverseClientInterface+Private.mm +++ b/test-suite/generated-src/objc/DBReverseClientInterface+Private.mm @@ -12,6 +12,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBReverseClientInterface () - (id)initWithCpp:(const std::shared_ptr<::testsuite::ReverseClientInterface>&)cppRef; diff --git a/test-suite/generated-src/objc/DBReverseClientInterface.h b/test-suite/generated-src/objc/DBReverseClientInterface.h index 057614e31..de2477dc2 100644 --- a/test-suite/generated-src/objc/DBReverseClientInterface.h +++ b/test-suite/generated-src/objc/DBReverseClientInterface.h @@ -5,6 +5,7 @@ @class DBReverseClientInterface; +__attribute__((visibility ("default"))) @interface DBReverseClientInterface : NSObject - (nonnull NSString *)returnStr; diff --git a/test-suite/generated-src/objc/DBSecondListener.h b/test-suite/generated-src/objc/DBSecondListener.h index 28a03a42d..f5d06eccd 100644 --- a/test-suite/generated-src/objc/DBSecondListener.h +++ b/test-suite/generated-src/objc/DBSecondListener.h @@ -5,6 +5,7 @@ /** Used for ObjC multiple inheritance tests */ +__attribute__((visibility ("default"))) @protocol DBSecondListener - (void)second; diff --git a/test-suite/generated-src/objc/DBSetRecord.h b/test-suite/generated-src/objc/DBSetRecord.h index 4c0f19013..5da610b6c 100644 --- a/test-suite/generated-src/objc/DBSetRecord.h +++ b/test-suite/generated-src/objc/DBSetRecord.h @@ -3,6 +3,7 @@ #import +__attribute__((visibility ("default"))) @interface DBSetRecord : NSObject - (nonnull instancetype)initWithSet:(nonnull NSSet *)set iset:(nonnull NSSet *)iset; diff --git a/test-suite/generated-src/objc/DBTestDuration+Private.mm b/test-suite/generated-src/objc/DBTestDuration+Private.mm index 4f374d52b..043c58cb6 100644 --- a/test-suite/generated-src/objc/DBTestDuration+Private.mm +++ b/test-suite/generated-src/objc/DBTestDuration+Private.mm @@ -13,6 +13,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBTestDuration () - (id)initWithCpp:(const std::shared_ptr<::testsuite::TestDuration>&)cppRef; diff --git a/test-suite/generated-src/objc/DBTestDuration.h b/test-suite/generated-src/objc/DBTestDuration.h index 227643318..9bc767898 100644 --- a/test-suite/generated-src/objc/DBTestDuration.h +++ b/test-suite/generated-src/objc/DBTestDuration.h @@ -4,6 +4,7 @@ #import +__attribute__((visibility ("default"))) @interface DBTestDuration : NSObject + (nonnull NSString *)hoursString:(NSTimeInterval)dt; diff --git a/test-suite/generated-src/objc/DBTestHelpers+Private.mm b/test-suite/generated-src/objc/DBTestHelpers+Private.mm index eab020b8b..fc20c7eae 100644 --- a/test-suite/generated-src/objc/DBTestHelpers+Private.mm +++ b/test-suite/generated-src/objc/DBTestHelpers+Private.mm @@ -20,6 +20,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBTestHelpers () - (id)initWithCpp:(const std::shared_ptr<::testsuite::TestHelpers>&)cppRef; diff --git a/test-suite/generated-src/objc/DBTestHelpers.h b/test-suite/generated-src/objc/DBTestHelpers.h index c96c7db4e..641f9ad64 100644 --- a/test-suite/generated-src/objc/DBTestHelpers.h +++ b/test-suite/generated-src/objc/DBTestHelpers.h @@ -17,6 +17,7 @@ * (Second line of multi-line documentation. * Indented third line of multi-line documentation.) */ +__attribute__((visibility ("default"))) @interface DBTestHelpers : NSObject /** Method with documentation */ diff --git a/test-suite/generated-src/objc/DBUserToken+Private.mm b/test-suite/generated-src/objc/DBUserToken+Private.mm index 7fa70bfa0..193c80fa4 100644 --- a/test-suite/generated-src/objc/DBUserToken+Private.mm +++ b/test-suite/generated-src/objc/DBUserToken+Private.mm @@ -13,6 +13,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBUserTokenCppProxy : NSObject - (id)initWithCpp:(const std::shared_ptr<::testsuite::UserToken>&)cppRef; diff --git a/test-suite/generated-src/objc/DBUserToken.h b/test-suite/generated-src/objc/DBUserToken.h index 82c9f3f7c..c238154df 100644 --- a/test-suite/generated-src/objc/DBUserToken.h +++ b/test-suite/generated-src/objc/DBUserToken.h @@ -4,6 +4,7 @@ #import +__attribute__((visibility ("default"))) @protocol DBUserToken - (nonnull NSString *)whoami; diff --git a/test-suite/generated-src/objc/DBUsesSingleLanguageListeners+Private.mm b/test-suite/generated-src/objc/DBUsesSingleLanguageListeners+Private.mm index 7e889d1b3..6b6120fe1 100644 --- a/test-suite/generated-src/objc/DBUsesSingleLanguageListeners+Private.mm +++ b/test-suite/generated-src/objc/DBUsesSingleLanguageListeners+Private.mm @@ -14,6 +14,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBUsesSingleLanguageListenersCppProxy : NSObject - (id)initWithCpp:(const std::shared_ptr<::testsuite::UsesSingleLanguageListeners>&)cppRef; diff --git a/test-suite/generated-src/objc/DBUsesSingleLanguageListeners.h b/test-suite/generated-src/objc/DBUsesSingleLanguageListeners.h index cb2bf2278..86e053df1 100644 --- a/test-suite/generated-src/objc/DBUsesSingleLanguageListeners.h +++ b/test-suite/generated-src/objc/DBUsesSingleLanguageListeners.h @@ -10,6 +10,7 @@ * Generating and compiling this makes sure other languages don't break * on references to interfaces they don't need. */ +__attribute__((visibility ("default"))) @protocol DBUsesSingleLanguageListeners - (void)callForObjC:(nullable id)l; diff --git a/test-suite/generated-src/objc/DBVarnameInterface+Private.mm b/test-suite/generated-src/objc/DBVarnameInterface+Private.mm index fca3a07d1..2048d1ed2 100644 --- a/test-suite/generated-src/objc/DBVarnameInterface+Private.mm +++ b/test-suite/generated-src/objc/DBVarnameInterface+Private.mm @@ -12,6 +12,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBVarnameInterface () - (id)initWithCpp:(const std::shared_ptr<::testsuite::VarnameInterface>&)cppRef; diff --git a/test-suite/generated-src/objc/DBVarnameInterface.h b/test-suite/generated-src/objc/DBVarnameInterface.h index c3f0a83ce..ebefca635 100644 --- a/test-suite/generated-src/objc/DBVarnameInterface.h +++ b/test-suite/generated-src/objc/DBVarnameInterface.h @@ -6,6 +6,7 @@ @class DBVarnameInterface; +__attribute__((visibility ("default"))) @interface DBVarnameInterface : NSObject /** diff --git a/test-suite/generated-src/objc/DBVarnameRecord.h b/test-suite/generated-src/objc/DBVarnameRecord.h index 5c20f1175..33ca139e6 100644 --- a/test-suite/generated-src/objc/DBVarnameRecord.h +++ b/test-suite/generated-src/objc/DBVarnameRecord.h @@ -8,6 +8,7 @@ * anticipate it to be used as a prefix/suffix. Some name styles behave * badly when it is. However this test case ensures we at least don't crash. */ +__attribute__((visibility ("default"))) @interface DBVarnameRecord : NSObject - (nonnull instancetype)initWithField:(int8_t)Field; + (nonnull instancetype)VarnameRecordWithField:(int8_t)Field; diff --git a/test-suite/generated-src/objc/DBWcharTestHelpers+Private.mm b/test-suite/generated-src/objc/DBWcharTestHelpers+Private.mm index 36936a5af..e34d0a238 100644 --- a/test-suite/generated-src/objc/DBWcharTestHelpers+Private.mm +++ b/test-suite/generated-src/objc/DBWcharTestHelpers+Private.mm @@ -13,6 +13,7 @@ static_assert(__has_feature(objc_arc), "Djinni requires ARC to be enabled for this file"); +__attribute__((visibility ("default"))) @interface DBWcharTestHelpers () - (id)initWithCpp:(const std::shared_ptr<::testsuite::WcharTestHelpers>&)cppRef; diff --git a/test-suite/generated-src/objc/DBWcharTestHelpers.h b/test-suite/generated-src/objc/DBWcharTestHelpers.h index 781158f20..f870bde97 100644 --- a/test-suite/generated-src/objc/DBWcharTestHelpers.h +++ b/test-suite/generated-src/objc/DBWcharTestHelpers.h @@ -5,6 +5,7 @@ #import +__attribute__((visibility ("default"))) @interface DBWcharTestHelpers : NSObject + (nonnull DBWcharTestRec *)getRecord; diff --git a/test-suite/generated-src/objc/DBWcharTestRec.h b/test-suite/generated-src/objc/DBWcharTestRec.h index 2a652e147..ac3d2e9fa 100644 --- a/test-suite/generated-src/objc/DBWcharTestRec.h +++ b/test-suite/generated-src/objc/DBWcharTestRec.h @@ -3,6 +3,7 @@ #import +__attribute__((visibility ("default"))) @interface DBWcharTestRec : NSObject - (nonnull instancetype)initWithS:(nonnull NSString *)s; + (nonnull instancetype)wcharTestRecWithS:(nonnull NSString *)s; diff --git a/test-suite/java/CMakeLists.txt b/test-suite/java/CMakeLists.txt index 4466cd21e..a9606ed5d 100644 --- a/test-suite/java/CMakeLists.txt +++ b/test-suite/java/CMakeLists.txt @@ -24,12 +24,13 @@ endif() ## Test Suite Shared Library ## -set(support_dir ../../support-lib/jni) +set(support_lib_dir ../../support-lib) +set(support_lib_jni_dir ../../support-lib/jni) set(test_include_dirs ../generated-src/jni/ ../generated-src/cpp/ ../handwritten-src/cpp/) file( GLOB_RECURSE support_srcs - ${support_dir}/*.cpp) + ${support_lib_jni_dir}/*.cpp) file( GLOB_RECURSE test_suite_srcs @@ -50,7 +51,8 @@ add_library(DjinniTestNative SHARED ${test_lib_srcs}) include_directories( DjinniTestNative ${test_include_dirs} - ${support_dir} + ${support_lib_dir} + ${support_lib_jni_dir} ${JNI_INCLUDE_DIRS}) target_link_libraries(DjinniTestNative ${JNI_LIBRARIES}) install( diff --git a/test-suite/objc/DjinniObjcTest.xcodeproj/project.pbxproj b/test-suite/objc/DjinniObjcTest.xcodeproj/project.pbxproj index 2e7cac57c..fc107ea43 100644 --- a/test-suite/objc/DjinniObjcTest.xcodeproj/project.pbxproj +++ b/test-suite/objc/DjinniObjcTest.xcodeproj/project.pbxproj @@ -378,6 +378,7 @@ B5F06AA21D4987EF005BE736 /* DBEnumUsageRecord.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DBEnumUsageRecord.mm; sourceTree = ""; }; B5F06AA31D4987EF005BE736 /* DBEnumUsageRecord+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DBEnumUsageRecord+Private.h"; sourceTree = ""; }; B5F06AA41D4987EF005BE736 /* DBEnumUsageRecord+Private.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "DBEnumUsageRecord+Private.mm"; sourceTree = ""; }; + CC1E047621B192E6004457CB /* project_export.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = project_export.hpp; sourceTree = ""; }; CF5673881BE05D1E006330E7 /* DBRecordWithFlags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DBRecordWithFlags.h; sourceTree = ""; }; CF5673891BE05D1E006330E7 /* DBRecordWithFlags.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DBRecordWithFlags.mm; sourceTree = ""; }; CF56738A1BE05D1E006330E7 /* DBRecordWithFlags+Private.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "DBRecordWithFlags+Private.h"; sourceTree = ""; }; @@ -466,18 +467,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 6536CD6919A6C82200DD7715 /* objc-support-lib */ = { + 6536CD6919A6C82200DD7715 /* support-lib */ = { isa = PBXGroup; children = ( - A239F3791AF400C600DF27C8 /* DJIMarshal+Private.h */, - A2CB54B319BA6E6000A9E600 /* DJIError.mm */, - 6536CD6A19A6C82200DD7715 /* DJIError.h */, - 6536CD6C19A6C82200DD7715 /* DJIProxyCaches.mm */, - 6536CD6D19A6C82200DD7715 /* DJICppWrapperCache+Private.h */, - 6536CD6E19A6C82200DD7715 /* DJIObjcWrapperCache+Private.h */, + CC1E047621B192E6004457CB /* project_export.hpp */, + CC1E047521B19206004457CB /* objc */, ); - name = "objc-support-lib"; - path = "../../support-lib/objc"; + name = "support-lib"; + path = "../../support-lib"; sourceTree = ""; }; 6536CD7019A6C96C00DD7715 /* handwritten-objc */ = { @@ -547,7 +544,7 @@ 6536CD7919A6C99800DD7715 /* Tests */, 6536CD7519A6C98800DD7715 /* handwritten-cpp */, 6536CD7019A6C96C00DD7715 /* handwritten-objc */, - 6536CD6919A6C82200DD7715 /* objc-support-lib */, + 6536CD6919A6C82200DD7715 /* support-lib */, 65868B4C1989FE4200D60EEE /* Frameworks */, 65868B4B1989FE4200D60EEE /* Products */, ); @@ -819,6 +816,19 @@ path = "../generated-src/cpp"; sourceTree = ""; }; + CC1E047521B19206004457CB /* objc */ = { + isa = PBXGroup; + children = ( + A239F3791AF400C600DF27C8 /* DJIMarshal+Private.h */, + A2CB54B319BA6E6000A9E600 /* DJIError.mm */, + 6536CD6A19A6C82200DD7715 /* DJIError.h */, + 6536CD6C19A6C82200DD7715 /* DJIProxyCaches.mm */, + 6536CD6D19A6C82200DD7715 /* DJICppWrapperCache+Private.h */, + 6536CD6E19A6C82200DD7715 /* DJIObjcWrapperCache+Private.h */, + ); + path = objc; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */