Re: Compiling TCL C++ extension (.so) in cygwin environment



Thanks of all your replies. I tried the suggests apart from recompiling
tclsh.

If the tclsh that comes with the latest cygwin is built for windows
then this is probably the problem. When I build my extension I don't
use the -mno-cygwin option. When I do I get lots of errors but the lib
is created. Do I need to include some other lib?

In file included from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/stl_algobase.h:67,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/char_traits.h:46,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/string:47,
from filemap.cpp:1:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cstdlib:181: error:
`::strtold' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cstdlib:200: error:
`__gnu_cxx::strtold' has not been declared
In file included from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/postypes.h:46,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/iosfwd:50,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/stl_algobase.h:70,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/char_traits.h:46,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/string:47,
from filemap.cpp:1:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:146: error:
`::fgetwc' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:147: error:
`::fgetws' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:148: error:
`::fputwc' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:149: error:
`::fputws' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:150: error:
`::fwide' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:151: error:
`::fwprintf' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:152: error:
`::fwscanf' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:153: error:
`::getwc' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:154: error:
`::getwchar' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:159: error:
`::putwc' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:160: error:
`::putwchar' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:161: error:
`::swprintf' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:162: error:
`::swscanf' has not been declared
...

/usr/include/tcl.h:391: error: `__int64' does not name a type
/usr/include/tcl.h:392: error: `__int64' does not name a type
/usr/include/tcl.h:640: error: `Tcl_WideInt' does not name a type
/usr/include/tcl.h:776: error: `Tcl_WideInt' does not name a type
/usr/include/tcl.h:1457: error: ISO C++ forbids declaration of
`Tcl_WideInt' with no type
/usr/include/tcl.h:1457: error: typedef `Tcl_WideInt' is initialized
(use __typeof__ instead)
/usr/include/tcl.h:1457: error: `Tcl_DriverWideSeekProc' was not
declared in this scope
/usr/include/tcl.h:1457: error: expected `,' or `;' before '(' token
/usr/include/tcl.h:1545: error: ISO C++ forbids declaration of
`Tcl_DriverWideSeekProc' with no type
/usr/include/tcl.h:1545: error: expected `;' before '*' token
In file included from /usr/include/tcl.h:2250,
from cao.cpp:1:
/usr/include/tclDecls.h:1565: error: expected constructor, destructor,
or type conversion before '*' token
/usr/include/tclDecls.h:1565: error: expected `,' or `;' before '*'
token
/usr/include/tclDecls.h:2119: error: ISO C++ forbids declaration of
`Tcl_DriverWideSeekProc' with no type
/usr/include/tclDecls.h:2119: error: expected `;' before '*' token
In file included from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/stl_algobase.h:67,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/char_traits.h:46,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/string:47,
from cao.cpp:2:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cstdlib:181: error:
`::strtold' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cstdlib:200: error:
`__gnu_cxx::strtold' has not been declared
In file included from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/postypes.h:46,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/iosfwd:50,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/stl_algobase.h:70,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/bits/char_traits.h:46,
from
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/string:47,
from cao.cpp:2:
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:146: error:
`::fgetwc' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:147: error:
`::fgetws' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:148: error:
`::fputwc' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:149: error:
`::fputws' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:150: error:
`::fwide' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:151: error:
`::fwprintf' has not been declared
/usr/lib/gcc/i686-pc-mingw32/3.4.4/include/c++/cwchar:152: error:
`::fwscanf' has not been declared
...

.



Relevant Pages

  • Building tclsh For Windows Using Microsoft Visual C++
    ... Has anybody built "tclsh" for Windows using the standard Microsoft Visual ... but I remember it was fairly painful. ...
    (comp.lang.tcl)
  • Re: Bug fix for scid
    ... However, the web site was recently updated, so I hope Shane gets back to scid's development. ... I think I was *wrong* to say it should work under Windows like this. ... tclsh - Simple shell containing Tcl interpreter ... from its standard input or from a file and evaluates them. ...
    (rec.games.chess.computer)
  • Re: Compiling TCL C++ extension (.so) in cygwin environment
    ... However when I load in tclsh I get the ... I remember that the supplied "wish" once was/yet is a "normal" windows application without cygwin, which of course can't load cygwin .so You may try to either compile your extension with "-mno-cygwin", or try to recompile Tcl from sources with "configure" from the unix directory. ...
    (comp.lang.tcl)
  • Re: loading multi threaded library into executable enabled for single thread
    ... Yes, the exe is tclsh. ... I understand that linking tclsh with libpthread is ... option would be to ship tclsh with my lib, but that also is a little weird. ... to work in FreeBSD v5.5? ...
    (freebsd-hackers)
  • Re: why is "tcl_platform(debug)" not available on unix
    ... > I have a problem to load different libraries, depending on debugging ... in the current tclsh. ... Because it only matters on Windows, where you could end up mixing ...
    (comp.lang.tcl)