Revision: 41877
http://brlcad.svn.sourceforge.net/brlcad/?rev=41877&view=rev
Author: erikgreenwald
Date: 2010-12-30 20:47:25 +0000 (Thu, 30 Dec 2010)
Log Message:
-----------
here be dragons. The need to use both dllexport and dllimport in the same file
excludes BU_EXTERN, so replace it with something that uses a second
preprocessor define. Needed for one dll to use a global variable exported from
another.
Modified Paths:
--------------
brlcad/trunk/misc/win32-msvc8/libtie/libtie.vcproj
brlcad/trunk/src/adrt/libtie/tie.h
Modified: brlcad/trunk/misc/win32-msvc8/libtie/libtie.vcproj
===================================================================
--- brlcad/trunk/misc/win32-msvc8/libtie/libtie.vcproj 2010-12-30 20:36:09 UTC
(rev 41876)
+++ brlcad/trunk/misc/win32-msvc8/libtie/libtie.vcproj 2010-12-30 20:47:25 UTC
(rev 41877)
@@ -53,7 +53,7 @@
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../../../src/other/tcl/win;../../../src/other/tcl/generic;../../../include;../../../src/adrt/libtie/libtie;../../../src/adrt/libtie;../../../src/other/libz"
-
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BU_EXPORT_DLL;TCL_THREADS=1;__win32;BRLCAD_DLL;HAVE_CONFIG_H;BRLCADBUILD;_CRT_SECURE_NO_WARNINGS"
+
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BU_EXPORT_DLL;TIEBUILD;TCL_THREADS=1;__win32;BRLCAD_DLL;HAVE_CONFIG_H;BRLCADBUILD;_CRT_SECURE_NO_WARNINGS"
StringPooling="true"
BasicRuntimeChecks="0"
RuntimeLibrary="2"
@@ -155,7 +155,7 @@
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="../../../include;../../../src/other/tcl/generic;../../../src/other/tcl/win;../../../src/other/libpng;../../../src/other/libz;../../../src/tie/libtie;../../../src/tie/librender;../../../src/tie"
-
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BU_EXPORT_DLL;TCL_THREADS=1;__win32;BRLCAD_DLL;HAVE_CONFIG_H;BRLCADBUILD;_CRT_SECURE_NO_WARNINGS"
+
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;BU_EXPORT_DLL;TIEBUILD;TCL_THREADS=1;__win32;BRLCAD_DLL;HAVE_CONFIG_H;BRLCADBUILD;_CRT_SECURE_NO_WARNINGS"
StringPooling="true"
BasicRuntimeChecks="0"
RuntimeLibrary="2"
Modified: brlcad/trunk/src/adrt/libtie/tie.h
===================================================================
--- brlcad/trunk/src/adrt/libtie/tie.h 2010-12-30 20:36:09 UTC (rev 41876)
+++ brlcad/trunk/src/adrt/libtie/tie.h 2010-12-30 20:47:25 UTC (rev 41877)
@@ -83,6 +83,20 @@
# error "Unknown precision"
#endif
+/*
+ * The BU_EXPORT macro is unable to cope with building a windows DLL that uses
+ * exported global variables from another DLL, so we punt.
+ */
+#if WIN32
+# ifdef TIEBUILD
+# define WINHACK __declspec(dllexport)
+# else
+# define WINHACK __declspec(dllimport)
+# endif
+#else
+# define WINHACK
+#endif
+
/* TCOPY(type, source base, source offset, dest base, dest offset) */
#define TCOPY(_t, _fv, _fi, _tv, _ti) { \
*(_t *)&((uint8_t *)_tv)[_ti] = *(_t *)&((uint8_t *)_fv)[_fi]; }
@@ -150,7 +164,7 @@
BU_EXPORT BU_EXTERN(uint32_t TIE_VAL(tie_kdtree_cache_free), (tie_t *tie, void
**cache));
BU_EXPORT BU_EXTERN(void TIE_VAL(tie_kdtree_cache_load), (tie_t *tie, void
*cache, uint32_t size));
BU_EXPORT BU_EXTERN(void TIE_VAL(tie_kdtree_prep), (tie_t *tie));
-BU_EXPORT extern tfloat TIE_VAL(TIE_PREC);
+WINHACK extern tfloat TIE_VAL(TIE_PREC);
/* compatability macros */
#define tie_kdtree_free TIE_VAL(tie_kdtree_free)
@@ -159,7 +173,7 @@
#define tie_kdtree_prep TIE_VAL(tie_kdtree_prep)
#define TIE_PREC TIE_VAL(TIE_PREC)
-BU_EXPORT extern int tie_check_degenerate;
+WINHACK extern int tie_check_degenerate;
BU_EXPORT BU_EXTERN(void TIE_VAL(tie_init), (tie_t *tie, unsigned int tri_num,
unsigned int kdmethod));
BU_EXPORT BU_EXTERN(void TIE_VAL(tie_free), (tie_t *tie));
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits