compile problems with vc++

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

Moderators: silvia, selimgunay, Moderators

Post Reply
jslin
Posts: 8
Joined: Mon Jun 28, 2004 5:20 pm
Location: Univ. Pittsburgh

compile problems with vc++

Post by jslin » Mon Jun 28, 2004 5:42 pm

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!

fkar
Posts: 2
Joined: Fri Jun 18, 2004 8:00 am
Location: Aristotle University of Thessaloniki, Greece

Post by fkar » Tue Jun 29, 2004 1:34 am

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._

jslin
Posts: 8
Joined: Mon Jun 28, 2004 5:20 pm
Location: Univ. Pittsburgh

Post by jslin » Tue Jun 29, 2004 11:02 am

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.

jslin
Posts: 8
Joined: Mon Jun 28, 2004 5:20 pm
Location: Univ. Pittsburgh

vc6 works with opensees1.4 and tcl/tk 8.3

Post by jslin » Thu Jul 01, 2004 6:13 pm

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.

jslin
Posts: 8
Joined: Mon Jun 28, 2004 5:20 pm
Location: Univ. Pittsburgh

VC6 build the recent release fine

Post by jslin » Tue Jul 06, 2004 9:36 am

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.

Guest

Post by Guest » Wed Jul 07, 2004 11:33 am

Problem is with the OpenSeesTK project .. if you just build the OpenSees project
you should be fine .. to do this just right click on OpenSees project (should be one of
projects listed on left side of visual studio window) and pick build.

I will sort out the problem and upload into CVS shortly.

jslin
Posts: 8
Joined: Mon Jun 28, 2004 5:20 pm
Location: Univ. Pittsburgh

Indeed that's the problem, VC net 2003 builds 1.5.2

Post by jslin » Wed Jul 07, 2004 1:50 pm

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!.

fmk
Site Admin
Posts: 5883
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk » Mon Aug 09, 2004 7:29 pm

i have fixed the visualstudio.net and vc6.0++ project files .. both now assume tcl8.4 or greater .. the current files can be obtained from cvs .. the tarball source code distribution of the new 1.6.0 release will be at the website shortly.

Post Reply