summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-29 02:43:06 +0000
committerkirthika <kirthika@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-11-29 02:43:06 +0000
commit8c26d0fd757183ee496f283de4be057ea05ab847 (patch)
treecaebcb1df66448d6233b178d561a1de717bd1f21
parent9809a2e6b2a48bc3b4ede997a2113f04cac8b4ac (diff)
downloadATCD-8c26d0fd757183ee496f283de4be057ea05ab847.tar.gz
*** empty log message ***
-rw-r--r--examples/DLL/Newsweek.cpp15
-rw-r--r--examples/DLL/Today.cpp17
2 files changed, 25 insertions, 7 deletions
diff --git a/examples/DLL/Newsweek.cpp b/examples/DLL/Newsweek.cpp
index c689edacc0a..95c9eeee6aa 100644
--- a/examples/DLL/Newsweek.cpp
+++ b/examples/DLL/Newsweek.cpp
@@ -2,6 +2,17 @@
#include "Newsweek.h"
+#ifdef __cplusplus
+extern "C" { // only need to export C interface if
+ // used by C++ source code
+#endif
+
+ __declspec( dllexport ) Magazine *create_magazine (void);
+
+#ifdef __cplusplus
+}
+#endif
+
// Implementation of the abstract class method which describes
// the magazine.
void Newsweek::title (void)
@@ -12,9 +23,7 @@ void Newsweek::title (void)
// Returns the Newsweek class pointer.
extern "C"
-
-Magazine *
-create_magazine (void)
+Magazine *create_magazine (void)
{
Magazine *mag;
ACE_NEW_RETURN (mag,
diff --git a/examples/DLL/Today.cpp b/examples/DLL/Today.cpp
index 8c5f66ae4d6..f50de9864cc 100644
--- a/examples/DLL/Today.cpp
+++ b/examples/DLL/Today.cpp
@@ -2,6 +2,17 @@
#include "Today.h"
+#ifdef __cplusplus
+extern "C" { // only need to export C interface if
+ // used by C++ source code
+#endif
+
+ __declspec( dllexport ) Magazine *create_magazine (void);
+
+#ifdef __cplusplus
+}
+#endif
+
// Implementation of the abstract class method which describes the
// magazine.
void
@@ -13,10 +24,8 @@ Today::title (void)
// Returns the pointer to the Today class.
-extern "C"
-
-Magazine *
-create_magazine (void)
+extern "C"
+Magazine *create_magazine (void)
{
Magazine *mag;
ACE_NEW_RETURN (mag,