[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
MSVC patch: fix for export problem
From: |
John W. Eaton |
Subject: |
MSVC patch: fix for export problem |
Date: |
Wed, 6 Dec 2006 15:18:49 -0500 |
On 6-Dec-2006, address@hidden wrote:
| Since Cell class is exported, a compilation failure appeared due to how MSVC
| handles exported classes with a template specialization in its inheritance
tree
| (it's actually completely instantiated). This leads to multiple symbols
defined in
| octinterp.dll. The easiest fix is to avoid to include Cell.h in
oct-stream.cc; hence
| the attached patch.
| Index: src/oct-stream.cc
| ===================================================================
| RCS file: /cvs/octave/src/oct-stream.cc,v
| retrieving revision 1.135
| diff -c -p -r1.135 oct-stream.cc
| *** src/oct-stream.cc 27 Oct 2006 02:16:18 -0000 1.135
| --- src/oct-stream.cc 6 Dec 2006 09:53:49 -0000
| *************** Software Foundation, Inc., 51 Franklin S
| *** 47,53 ****
| #include "quit.h"
|
| #include "error.h"
| ! #include "input.h"
| #include "oct-stdstrm.h"
| #include "oct-stream.h"
| #include "oct-obj.h"
| --- 47,54 ----
| #include "quit.h"
|
| #include "error.h"
| ! //#include "input.h"
| ! extern bool interactive;
| #include "oct-stdstrm.h"
| #include "oct-stream.h"
| #include "oct-obj.h"
Does the following patch instead of the above change also avoid the
problem?
Thanks,
jwe
src/ChangeLog:
2006-12-06 John W. Eaton <address@hidden>
* sysdep.cc: Include "Cell.h" here.
* input.h: Include "oct-obj.h", not "ov-list.h".
Index: src/input.h
===================================================================
RCS file: /cvs/octave/src/input.h,v
retrieving revision 1.42
diff -u -u -r1.42 input.h
--- src/input.h 6 Dec 2006 20:10:03 -0000 1.42
+++ src/input.h 6 Dec 2006 20:16:02 -0000
@@ -31,6 +31,7 @@
#include <string>
#include "oct-time.h"
+#include "oct-obj.h"
#include "pager.h"
class octave_value;
Index: src/sysdep.cc
===================================================================
RCS file: /cvs/octave/src/sysdep.cc,v
retrieving revision 1.123
diff -u -u -r1.123 sysdep.cc
--- src/sysdep.cc 2 Nov 2006 15:58:54 -0000 1.123
+++ src/sysdep.cc 6 Dec 2006 20:16:02 -0000
@@ -77,6 +77,7 @@
#include "oct-env.h"
#include "quit.h"
+#include "Cell.h"
#include "defun.h"
#include "error.h"
#include "input.h"