xmktclapp & VisualC++
From: Ryan (ryan_border_at_yahoo.com)
Date: 03/29/05
- Next message: Bryan Oakley: "Re: extract variable after running exec xtclsh"
- Previous message: ramesh venk: "Re: Oratcl 4.3 fails to initialize on Solaris with Oracle 9"
- Next in thread: Shaun Deacon: "Re: xmktclapp & VisualC++"
- Reply: Shaun Deacon: "Re: xmktclapp & VisualC++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Mar 2005 13:17:39 -0800
Hello,
I have had good luck using xmktclapp on a variety of Unix platforms,
and now have a small application that I would like to port to a windows
environment. I have access to Visual C++ 6.0
I had difficulty trying to build mktclapp, and so downloaded the
pre-built binary from posoft.de (it seems to run fine).
I have tcl/tk 8.4.9, which run- though I notice the loading of tcl
scripts into wish is painfully slow.
I am unable to get the most basic example case to compile. From the
mktclapp home-page, I am using hello.tcl:
button .b -text Go -command Hello
button .e -text Quit -command exit
pack .b .e -side left
proc Hello {} {
catch {destroy .hi}
toplevel .hi
button .hi.b -text {Hello, World!} -command {destroy .hi}
pack .hi.b
}
With no associated C-code. xmktclapp/mktclapp converts this tcl script
into a C source file without errors. But, when I attempt to compile
the resultant source code, with VisualC++, I get the errors pasted
below.
Are there magic flags I should be throwing at the compiler to resolve
this? Any other ideas on how to proceed? Do I need a new (or older)
version of either xmktclapp, or tcl/tk?
Thanks-
Ryan Border.
Here is the code I think it doesn't like:
/*
** This is the channel type that will access the built-in files.
*/
static Tcl_ChannelType builtinChannelType = {
"builtin", /* Type name. */
NULL, /* Always non-blocking.*/
Et_FileClose, /* Close proc. */
Et_FileInput, /* Input proc. */
Et_FileOutput, /* Output proc. */
Et_FileSeek, /* Seek proc. */ <---(line 1789)
NULL, /* Set option proc. */
NULL, /* Get option proc. */
Et_FileWatch, /* Watch for events on console. */
Et_FileHandle, /* Get a handle from the device. */
};
Compiling...
testapp.cpp
testapp.cpp(61) : warning C4018: '<' : signed/unsigned mismatch
testapp.cpp(73) : warning C4018: '<' : signed/unsigned mismatch
testapp.cpp(1788) : error C2440: 'initializing' : cannot convert from
'' to 'int (__cdecl *)(void *,const char *,int,int *)'
None of the functions with this name in scope match the target
type
testapp.cpp(1789) : error C2440: 'initializing' : cannot convert from
'' to 'int (__cdecl *)(void *,const char *,int,int *)'
None of the functions with this name in scope match the target
type
testapp.cpp(1792) : error C2440: 'initializing' : cannot convert from
'' to 'int (__cdecl *)(void *,struct Tcl_Interp *,const char *,const
char *)'
None of the functions with this name in scope match the target
type
testapp.cpp(1793) : error C2440: 'initializing' : cannot convert from
'' to 'int (__cdecl *)(void *,struct Tcl_Interp *,const char *,const
char *)'
None of the functions with this name in scope match the target
type
testapp.cpp(2021) : error C2664: 'Tcl_CreateCommand' : cannot convert
parameter 3 from 'int (void *,struct Tcl_Interp *,int,char ** )' to
'int (__cdecl *)(void *,struct Tcl_Int
erp *,int,const char *[])'
None of the functions with this name in scope match the target
type
testapp.cpp(2034) : error C2664: 'Tcl_CreateCommand' : cannot convert
parameter 3 from 'int (void *,struct Tcl_Interp *,int,char ** )' to
'int (__cdecl *)(void *,struct Tcl_Int
erp *,int,const char *[])'
None of the functions with this name in scope match the target
type
testapp.cpp(2055) : error C2664: 'Tcl_CreateCommand' : cannot convert
parameter 3 from 'int (__cdecl *)(void *,struct Tcl_Interp *,int,char
** )' to 'int (__cdecl *)(void *,str
uct Tcl_Interp *,int,const char *[])'
This conversion requires a reinterpret_cast, a C-style cast or
function-style cast
Error executing cl.exe.
testapp.obj - 7 error(s), 2 warning(s)
- Next message: Bryan Oakley: "Re: extract variable after running exec xtclsh"
- Previous message: ramesh venk: "Re: Oratcl 4.3 fails to initialize on Solaris with Oracle 9"
- Next in thread: Shaun Deacon: "Re: xmktclapp & VisualC++"
- Reply: Shaun Deacon: "Re: xmktclapp & VisualC++"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]