compiling problems with VC++ 6

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
shisha
Posts: 6
Joined: Wed Jul 21, 2004 3:01 am
Location: LnT

compiling problems with VC++ 6

Post by shisha »

Hi All,

I have been having problems compiling OpenSees 1.5.2 using VC++ 6.0.

The error messages go like this:

compiling...
TclDatabaseCommands.cpp
d:\shisha\opensees\utilities\os source code\opensees\src\database\tcldatabasecommands.cpp(78) : error
C2664: 'Tcl_CreateCommand' : cannot convert parameter 3 from 'int (void *,struct Tcl_Interp *,int,const char ** )' to 'int (__cdecl *)(void *,struc
t Tcl_Interp *,int,char *[])'
None of the functions with this name in scope match the target type

d:\shisha\opensees\utilities\os source code\opensees\src\database\tcldatabasecommands.cpp(80) : error
C2664: 'Tcl_CreateCommand' : cannot convert parameter 3 from 'int (void *,struct Tcl_Interp *,int,const char ** )' to 'int (__cdecl *)(void *,struc
t Tcl_Interp *,int,char *[])'
None of the functions with this name in scope match the target type

d:\shisha\opensees\utilities\os source code\opensees\src\database\tcldatabasecommands.cpp(218) : error C2664: 'Tcl_GetInt' : cannot convert parameter 2 from 'const char *' to 'char *'
Conversion loses qualifiers
d:\shisha\opensees\utilities\os source code\opensees\src\database\tcldatabasecommands.cpp(249) : error C2664: 'Tcl_GetInt' : cannot convert parameter 2 from 'const char *' to 'char *'
Conversion loses qualifiers
Error executing cl.exe.

openSees.exe - 4 error(s), 0 warning(s)

Please suggest ideas to overcome the problem.
shisha.
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

the problem is tcl/tk .. they have tightened up their api betwen versions 8.3 and 8.4
.. a lot of procedures now take const char * instead of char * .. as we have developers
trying to compile with both versions we have defined TCL_Char in OPS_Globals.h ..
if you look at the OpenSees files that call Tcl routines you will see TCL_Char all over the place .. by default it is char, if the macro definition _TCL84 exists it is const char .. the _TCL84 if required, is placed in the C++ preprocessor settings in the projects .. if you still have problems, i will be updating the vc6.0 project later today so that it compiles with tcl8.4.6 and the latest code in the repository and you can start with the new project and then add your files .. you will be able to obtain it from cvs
Post Reply