Artifacts Associated With Ticket 1031781fffffffff
Ticket change [979dcbb375] (rid 110468) by nobody on 2004-09-21 09:50:47:
- assignee initialized to: "mdejong"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I opened the tcl.dsw file, doing the conversion required, and built the static release. It built fine, but I could not link to it - when compiling my app_init.c file (pinched from the one for tclsh) the linker reported missing symbols. The usual cause of this problem is that the library cannot be found by the linker, but that is definitely not the case here. I had seen this problem when building zlib once, and the answer then was to create a brand new fresh project from scratch, making sure I included all the correct source files and did the settings. After some effort I got that to build, only to find exactly the same problem. I had changed the settings to compile as C code, so I figured that the way I was compiling my program (which is the same mechanism as we use to build our product, and cannot be changed) was using C++ name mangling, and thus the linker was having problems as the symbols in the library were mangled in the C style. When I changed my project settings to compile the Tcl static library as C++ code, it failed to build quite horrendously, and for a quite obvious reason: int TclpGetTimeZone (currentTime) unsigned long currentTime; { Hmm - what an antiquated function declaration style. I haven't seen that used since I was at University around 1995 or so. I am sure you have your reasons for declaring functions like this rather than like: int TclpGetTimeZone (unsigned long currentTime) { However this is stopping me from compiling Tcl. Have you any ideas how I can set myself up so I can build the Tcl static library for Windows using VS.NET? I suspect that for ease of development in the future I will need to integrate the Tcl source code into our build system. I am not sure it will be possible at the moment. I will be eternally grateful for any help you can give me. Alastair Growcott [email protected] - foundin initialized to: "obsolete: 8.4.7"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "53. Configuration and Build Tools"
- title initialized to: "Problems building on Windows 2k with VS.NET"
- type initialized to: "Bug"
Ticket change [4267193cdc] (rid 116374) by nobody on 2004-09-21 19:56:23:
- icomment:
Logged In: NO It turns out that I need to define BUILD_STATIC when compiling source code that links to the static library. Ugh! This is because tcl.h interprets the BUILD_STATIC symbol to define EXTERN for DLL linking. Lots of other libraries can be built as either static or DLL/Dynamic without applications that link to them having to know about it or define any symbols to do so. I recommend using them as an example to figure out how to do it. Ideally applications that link to Tcl should specify whether they want to statically link or dynamically link by linking to either tcl84s.lib or tcl84.lib respectively, and not by defining build symbols. If you want some ideas, email me (email address in previous bit of bug report).
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [9da961412d] (rid 96346) by mdejong on 2004-09-24 03:34:26:
- assignee changed to: "davygrvy"
Ticket change [3c67775569] (rid 120911) by davygrvy on 2004-09-24 03:53:08:
- icomment:
Logged In: YES user_id=7549 So where's the bug in this? If I want a static library, I do this: C:\tcl_src\win\>nmake -f makefile.vc OPTS=static If I want a dynamic build with threads, I do this: C:\tcl_src\win\>nmake -f makefile.vc OPTS=thread If I want both, I do this: C:\tcl_src\win\>nmake -f makefile.vc OPTS=thread,static The Tcl source is C, not C++, so don't force -TP
- login: "davygrvy"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- username: "davygrvy"
- icomment:
Ticket change [0544f81b92] (rid 89027) by davygrvy on 2004-09-24 04:11:07:
- assignee changed to: "hobbs"
- icomment:
Logged In: YES user_id=7549 Just post your code changes ideas here, rather than asking me to ask you for them. This topic has zero to do with makefile.vc.. setting new ownership..
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
Ticket change [e46e4b9ccb] (rid 87947) by hobbs on 2005-05-31 09:25:52:
- assignee changed to: "patthoyts"
Ticket change [d52f6b3f01] (rid 123573) by saurabh_b on 2005-09-13 13:42:16:
- icomment:
Logged In: YES user_id=1343680 I am also trying to build TCL 64 bit on AMD64 machine using MS VS2005 Beta. I have a basci q'n. Do we have to use NMAKE tool? Hi There, Today I did some more research and was able to compile TCL x64!!! The issue is in LINK as I get error CVTRES : fatal error CVT1100: duplicate resource. type:VERSION, name:1, language:0x0409. I suppose this is happening because we have two .rc files in the project. tclsh.rc and tcl.rc . There seems to be a conflict in what resource to use. One is for dll and the other for application. I have a feeling that we need two modules(.dsps) for the dll and tclsh. Also, there are a couple of helper files like CAT.C and STUB16.C, each has a main() and this conflicts with the main of tclsh. I had to remove these from the project to compile. I guess that is wrong thing to do. Also, in the MSVS VC6.0 the project loads itself in the Makefile mode and builds fine. Now, I need to know which option is less time consuming and repeatable? 1.Adapt the VC6.0 Makefile.vc to VC8.0 2.Understand the dependencies of dll and tclsh and create new modules for the tcl project. I am using TCL 8.4.2. Thanks in advance, Saurabh -----Original Message----- From: [email protected] [mailto:tcl-win- [email protected]] Sent: Friday, September 09, 2005 3:45 PM To: [email protected] Cc: [email protected]; [email protected] Subject: RE: [WINTCL] Re:Compiling tcl 8.4.9 with VS.NET 2005 Beta 2 compiler? Hi Experts, The first issue is solved leading to the next! .\tclWinFile.c(1604) : error C2037: left of 'st_size' specifies undefined struct/union '_stati64' I found _stati_64 defined in <sys/stat.h>. #define _fstati64 _fstat64 Hence I have included this header(hopefully no duplicate code will result!!!) in all the code which was throwing this error. In tcl-8.4.2\generic\ tclCmdAH.c tclFCmd.c tclFileName.c tclIOUtil.c tclTest.c In c:\tcl-8.4.2\win\tclWinFile.c Moved #include <sys/stat.h> before all other includes. Previously, it was #include "tclWinInt.h" #include <winioctl.h> #include <sys/stat.h> Also, NULL was not being able to reference it's definition in stdio.h. Add #include <stdio.h> to regc_nfa.c Now, I am facing this error regarding old C way of defining functions: ..\generic\regerror.c(53) : error C2081: 'preg' : name in formal parameter list illegal ..\generic\regerror.c(53) : error C2081: 'errbuf' : name in formal parameter list illegal ..\generic\regerror.c(53) : error C2081: 'errbuf_size' : name in formal parameter list illegal - regerror - the interface to error numbers */ /* ARGSUSED */ size_t/* actual space needed (including NUL) */ regerror(errcode, preg, errbuf, errbuf_size) int errcode;/* error code, or REG_ATOI or REG_ITOA */ CONST regex_t *preg;/* associated regex_t (unused at present) */ char *errbuf;/* result buffer (unless errbuf_size==0) */ size_t errbuf_size;/* available space in errbuf, can be 0 */ { ..... ... } I can see #define regerror TclReError in regex.h as: extern size_t regerror _ANSI_ARGS_((int, __REG_CONST regex_t *, char *, size_t)); To me the declaration and usage seems alright!  Any clues? Should I be writing to the TCL developers list? Saurabh -----Original Message----- From: [email protected] [mailto:tcl-win- [email protected]] On Behalf Of Saurabh Bhatnagar Sent: Tuesday, September 06, 2005 10:56 AM To: 'David Gravereaux'; [email protected] Subject: RE: [WINTCL] Re:Compiling tcl 8.4.9 with VS.NET 2005 Beta 2 compiler? Okay! I take this up. I am less into applications so it may take me some time... Attached is my build log. The first issue to handle is this: .\tclWinFile.c(1604) : error C2037: left of 'st_size' specifies undefined struct/union '_stati64' If anyone is working on this, your comments are welcome! Saurabh -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of David Gravereaux Sent: Friday, September 02, 2005 12:03 PM To: [email protected] Subject: Re: [WINTCL] Re:Compiling tcl 8.4.9 with VS.NET 2005 Beta 2 compiler? Saurabh Bhatnagar wrote: > Hi Jeff, > Saw your email on VS.NET 2005 Beta 2 compiler. > > I have similar issues. > > I am building TCL 8.4.2 using x64(AMD64) compiler of VS 2005 Beta. > > Somehow there are too many conflicts with the VS header files for trivial > functions like sprintf etc. > > I wonder weather this version supports 64 bit at all. > > I am able to build TCL8.4.2 for 32 bit using MSVC++ 6.0 compiler. > > Can anyone confirm which version of TCL supports x64 configuration? > > Thanks > Saurabh > How about fixing it and submitting a patch? ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Tcl-win mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tcl-win
- login: "saurabh_b"
- mimetype: "text/plain"
- username: "saurabh_b"
- icomment:
Ticket change [972cbc51bb] (rid 106459) by patthoyts on 2005-09-13 17:57:58:
- closedate changed to: "2005-09-13T10:57:58"
- closer changed to: "patthoyts"
- icomment:
Logged In: YES user_id=202636 There is a patch #1096916 already submitted to deal with build issues using MSVC 8. The way to sort it out is to look and what that patch is doing for tcl 8.5 and if required bring some of those build modifications into your 8.4 tree. I would recommend always arranging to be able to perform the build using NMAKE and then to setup a Makefile project in Visual Studio. This works well and avoids having to continually update a .dsp file and the nmake file and the autoconf files.
- login: "patthoyts"
- mimetype: "text/plain"
- resolution changed to: "None"
- status changed to: "Closed"
- username: "patthoyts"