I have finally managed to get TclBlend 1.2.3 to load into Tcl 8.0.5. It turned out that my version of the JDK runtime was somehow screwed up and wouldn't run the simplest of apps with nothing more than a System.out.println("Hello World!"); //Display the string. in it. Reinstalling the JDK solved the problem. Unfortunately, it was very difficult to find this problem, because the jvm was displaying a class not found error message, but it flashed on the tclsh window so fast before the window closed that you couldn't really see it. By debugging I must have slowed things down just enough for it to be seen. Once I noticed that some kind of error was being displayed, I opened a DOS command prompt and ran tclsh80d from there. This allowed me to see the error message without the window closing on me. Once I could see the java.lang.NoClassDefFoundError: error message it took me little time to solve the actual problem. I also got debugging working. The method is as follows for Visual Studio 6.x and is probably similar for earlier versions as well. (1) Turn debugging on in the makefile for tcl and tclblend and then build the executable and dll respectively using nmake. Either use nmake<cr> if the file is called makefile or use nmake -f makefile.vc for a file called makefile.vc. (2) Set your paths to point to the executable and dll respectively. (3) Open the tclsh80d.exe file using the open command in the file menu. This will create a project with a single executable. (4) Go to Project/Settings.../Debug Tab/Additional DLLs and set the module to be the tclblend.dll. Click on the field below "Local Name" and a browse button will appear to the right. Browse for the tclblend.dll to make sure you get the path correct. Select OK. (5) Run the executable using Build/Start Debug/Go or press the F5 function key. (6) The Build menu item changes to Debug. Select Debug/Break. (7) The executable should halt and a disassembled code window should come up. (8) To get source code to show in the disassembly window select, View/Debug Windows/Disassembly. (9) To place another breakpoint other than the one you are currently at, open a pertinent source file, right click on the line of interest and select Insert/Remove Breakpoint. Hope this info. helps somebody else. -=> Gregg <=- ---------------------- Forwarded by Gregg Leichtman/QPHL/Quintiles on 08/20/99 01:21 PM --------------------------- Moses DeJong <[EMAIL PROTECTED]> on 08/19/99 05:49:32 PM To: Gregg Leichtman/QPHL/Quintiles cc: [EMAIL PROTECTED] Subject: Re: [Tcl Java] Debugging TclBlend 1.2.3 with JDK 1.2 and Tcl 8.0.5? On Thu, 19 Aug 1999 [EMAIL PROTECTED] wrote: > > I have succeeded in getting both Tcl 8.0.5 and TclBlend 1.2.3 built with > debugging info. Unfortunately, I still get a crash as soon as the tclblend.dll > is loaded. I turned on the debug flag in pkgIndex.tcl and everything seems in > order. I noticed a link warning associated with the tclblend.dll build as shown: > > set LIB=E:\VS6.0\VC98\lib I think I got this warning from VC++ 6.0 too, it did not seem to break anything. > E:\VS6.0\VC98\bin\link.exe /debug:full /debugtype:cv /NODEFAULTLIB /RELEASE > /NOLOGO /align:0x1000 /MACHINE:IX86 /entry:_DllMainCRTStartup@12 /dll > /out:tclblend.dll E:\Tcl\Tcl8.0.5\src\win\Debug\tcl80d.lib > E:\java\sun\jdk1.2.2\lib\jvm.lib msvcrtd.lib oldnames.lib kernel32.lib > advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib @C:\TEMP\nma00176. > > LINK : warning LNK4108: /ALIGN specified without /DRIVER or /VXD; image may not > run > > Creating library tclblend.lib and object tclblend.exp Perhaps the problem is that you did not tell the ide where to find the source files for Tcl. After you attach to the running process I think there is an "open sorce file" option of something. Once you open the first source file the debugger should be able to open the others automatically. I can't remember the exact option or pulldown but you should be able to figure it out. > I don't know if this warning can be ignored, but putting the /driver flag in the > link should not and did not solve the crashing problem and I can't imagine how > the /vxd flag would help. I am quite new to Visual Studio and do not quite know > how to set up debugging so that I can walk through the source code. I was able > to attach to the running tclsh80d process, but this only provides a disassembly > which is pretty much useless to me. Just create an empty "single executable" project and then set the full path name of tclsh80d.exe in the debug tab, then run the debugger. This should start up Tcl inside the debugger and open up the Tcl source in the debug display. I have done this before and it works just fine. later mo > I also tried to create a project from the > makefile, but this only created a project that contained one file --- the > makefile --- which was also useless. I assume that you can debug the dll and > trace into its source and probably trace into tcl 8.0.5 source as well. > > Is there some way that I can set up Visual Studio so that I can debug Tcl 8.0.5 > and the TclBlend dll using the source without having to build a project by hand? > > If it does have to be done by hand, does some kind soul have a project for > Visual Studio 5 or 6 that they can send to me? > ---------------------------------------------------------------- The TclJava mailing list is sponsored by WebNet Technologies. To subscribe: send mail to [EMAIL PROTECTED] with the word SUBSCRIBE as the subject. To unsubscribe: send mail to [EMAIL PROTECTED] with the word UNSUBSCRIBE as the subject. To send to the list, send email to '[EMAIL PROTECTED]'. A list archive is at: http://www.findmail.com/listsaver/tcldallas/