gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnucap-devel] Re: [Help-gnucap] plugins mingw compatibility


From: al davis
Subject: [Gnucap-devel] Re: [Help-gnucap] plugins mingw compatibility
Date: Wed, 4 Apr 2007 22:19:56 -0400
User-agent: KMail/1.9.5

On Wednesday 04 April 2007 11:35, Leonardo wrote:
> I compiled gnucap with mingw ,but have some problems with
> plugins... see my output when compiling jfet:

> address@hidden
> /g/msys/1.0/home/leonardo/gnucap-2007-03-29/plugins/
> spice3f5-models/jfet
> $ make
> g++ -O2 -g -I. -I../Include -DTRACE_UNTESTED -DSPICE_3f
> -DHAS_STDLIB -fPIC - I../../../src -Wall -Wextra  -c
> ../Include/wrapper.cc ../Include/wrapper.cc:1: warning: -fPIC
> ignored for target (all code is position independent)
> In file included from
> g:/msys/1.0/mingw/bin/../lib/gcc/mingw32/
> 3.4.5/../../../../include/c++/3.4.5/cmath:52,
>                  from ../../../src/md.h:39,
>                  from ../../../src/u_limit.h:27,
>                  from ../Include/wrapper.cc:43:
> g:/msys/1.0/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../in
>clude/math.h:211: error: redefinition of `struct _complex'
> ../Include/cpstd.h:35: error: previous definition of `struct
> _complex'
>
> Some clue please...

The plugins have not been tested with mingw yet.

I tried it, with mingw on debian as a cross compiler and 
confirmed the compile errors you have.

The problem is a name conflict between the Spice headers and the 
mingw headers.  To fix that (and another you didn't get to yet) 
Change wrapper.cc ..
======From======
// spice includes
extern "C" {
  #define NODE NodE
  #define public PubliC
  #define bool BooL
  #define main MaiN
  #include "capabil.h"
  #include "const.h"
  #include "iferrmsg.h"
  #include "devdefs.h"
  #include "ftedefs.h"
  #undef main
  #undef bool
  #undef public
  #undef NODE
  #undef OPT
  #undef LINEAR
}
======To=======
// spice includes
extern "C" {
  #define _complex CompleX
  #define NODE NodE
  #define public PubliC
  #define bool BooL
  #define main MaiN
  #include "capabil.h"
  #include "const.h"
  #include "iferrmsg.h"
  #include "devdefs.h"
  #include "ftedefs.h"
  #undef main
  #undef bool
  #undef public
  #undef NODE
  #undef _complex
  #undef OPT
  #undef LINEAR
  
#undef VT_BOOL
#undef VT_NUM
#undef VT_REAL
#undef VT_STRING
#undef VT_LIST
}
============
.. notice the added lines.

But then there is still a problem .. Link fails with a big list 
of "undefined reference".  I don't know what to do about it.  
They get resolved later when the plugin is used, so they should 
not be required at the link step.

I don't have a windows system, so I need help on this one.
Can anyone help here?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]