compile problems with vc++
Moderators: silvia, selimgunay, Moderators
compile problems with vc++
I have encoutered two function errors while trying to compile in vc. These same errors appeared in vc6,7 and vc.net.
First error appeared in ..\tcl\tkMain.cpp(80). error C2733=> second C linkage of overloaded function 'TkpDisplayWarning' not allowed.
It complained about the lines:
#ifdef _TCL84
extern "C" void TkpDisplayWarning _ANSI_ARGS_((const char *msg, char *title));
#else....
'===========
Second error appeared in ..\tcl\winMain.cpp(114)
error C2664: 'Tcl_SetPanicProc' : cannot convert parameter 1 from 'void (char *,...)' to 'Tcl_PanicProc (__cdecl *)'
It complained about the call in WinMain
Tcl_SetPanicProc(WishPanic);
I used the tcl.tk 8.4 as required for the current steady build.
Any suggestion? Thanks!
First error appeared in ..\tcl\tkMain.cpp(80). error C2733=> second C linkage of overloaded function 'TkpDisplayWarning' not allowed.
It complained about the lines:
#ifdef _TCL84
extern "C" void TkpDisplayWarning _ANSI_ARGS_((const char *msg, char *title));
#else....
'===========
Second error appeared in ..\tcl\winMain.cpp(114)
error C2664: 'Tcl_SetPanicProc' : cannot convert parameter 1 from 'void (char *,...)' to 'Tcl_PanicProc (__cdecl *)'
It complained about the call in WinMain
Tcl_SetPanicProc(WishPanic);
I used the tcl.tk 8.4 as required for the current steady build.
Any suggestion? Thanks!
-
- Posts: 2
- Joined: Fri Jun 18, 2004 8:00 am
- Location: Aristotle University of Thessaloniki, Greece
i may suggest you to check two things:
1. if the recommended version of tcl/tk along with all the header files and the libraries is properly installed.
2. if the path of the tcl's include directory is provided to the workspace, i.e. if the path "c:\...\tcl\include" is known to the project>settings,c++ tab, category preprocessor, additional include directories field. that should hold for all the projects that involve tcl/tk functions.
fotis._
1. if the recommended version of tcl/tk along with all the header files and the libraries is properly installed.
2. if the path of the tcl's include directory is provided to the workspace, i.e. if the path "c:\...\tcl\include" is known to the project>settings,c++ tab, category preprocessor, additional include directories field. that should hold for all the projects that involve tcl/tk functions.
fotis._
Thanks for the assistance. I tried the suggestions, but still faced the same errors. These were what I did:
(1) I used the 1.5.2 zipped source. Modified all arguments to fabs() and sqrt() to double. Changed one fmode() to % for the int remainder.
(2) I uninstalled, reinstalled ActiveTcl8.4.4. The wish.exe runs tcl script fine.
(3) I thought the errors were from conflict of definitions, so i did rearrange the order of the "C:\program files\tcl\include" either to the first to check or the last to check among all includes.
I also replace <tcl.h> with #include "c:/Program files/tcl/include/tcl.h"
Same errors persist.
(4) Somehow, I got a new error while compiling the quickmain project:
LINK : fatal error LNK1104: cannot open file 'nonlinearBeamColumn.lib'
I can't find where 'nonlinearBeamColumn.lib was built within Opensees projects.
Any suggestion will be much appreciated.
(1) I used the 1.5.2 zipped source. Modified all arguments to fabs() and sqrt() to double. Changed one fmode() to % for the int remainder.
(2) I uninstalled, reinstalled ActiveTcl8.4.4. The wish.exe runs tcl script fine.
(3) I thought the errors were from conflict of definitions, so i did rearrange the order of the "C:\program files\tcl\include" either to the first to check or the last to check among all includes.
I also replace <tcl.h> with #include "c:/Program files/tcl/include/tcl.h"
Same errors persist.
(4) Somehow, I got a new error while compiling the quickmain project:
LINK : fatal error LNK1104: cannot open file 'nonlinearBeamColumn.lib'
I can't find where 'nonlinearBeamColumn.lib was built within Opensees projects.
Any suggestion will be much appreciated.
vc6 works with opensees1.4 and tcl/tk 8.3
I went back and downlloaded the older 1.4 version, then complied it with VC 6. The built was sucessful.
Please drop me a line if you built successfully with vc net 2003 on opensees1.5.2. I tried many combinations and still got stuck.
---------------------
I got around the error message in tkMain.cpp by removing "C" in the line below:
#ifdef _TCL84
extern "C" void TkpDisplayWarning _ANSI_ARGS_((const char *msg, char *title));
i.e., extern void TkpDisplayWarning ....
But have no luck on winMain.cpp.
Thanks.
Please drop me a line if you built successfully with vc net 2003 on opensees1.5.2. I tried many combinations and still got stuck.
---------------------
I got around the error message in tkMain.cpp by removing "C" in the line below:
#ifdef _TCL84
extern "C" void TkpDisplayWarning _ANSI_ARGS_((const char *msg, char *title));
i.e., extern void TkpDisplayWarning ....
But have no luck on winMain.cpp.
Thanks.
VC6 build the recent release fine
I was able to build the recent stable release 1.5.2 with VC 6 with minor modification to the source. Be happy to supply the list of changes I did. Using the same settings still gives the old three errors with tcl in VC net 2003.
By the way, quickmain is simply a build for running Example1.cpp. Best to remove it from the project. QuickMain can be built independently after Openseees libs are built.
By the way, quickmain is simply a build for running Example1.cpp. Best to remove it from the project. QuickMain can be built independently after Openseees libs are built.
Indeed that's the problem, VC net 2003 builds 1.5.2
You are right! By removing OpenSeesTK from the build, VC net 2003 works fine. The tcl script runs fine as well--at least for the check I just did. I wonder why OpenSeesTK was there? Was it needed for TK?
Much appreciated!.
Much appreciated!.