Tk Source Code

View Ticket
Login
Ticket UUID: 1955500
Title: 8.4.19 fails windows compile and link with stock vc6.
Type: RFE Version: None
Submitter: venksi Created on: 2008-05-01 16:05:09
Subsystem: 85. Win Build Assigned To: mdejong
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2008-05-02 01:12:12
Resolution: Wont Fix Closed By: hobbs
    Closed on: 2008-05-01 18:12:12
Description:
tkWinWm.c
..\win\tkWinWm.c(2993) : warning C4013: SetWindowLongPtr' undefined; assuming extern returning int

...

   Creating library .\Release\tk84.lib and object .\Release\tk84.exp
tkWinWm.obj : error LNK2001: unresolved external symbol _SetWindowLongPtr
.\Release\tk84.dll : fatal error LNK1120: 1 unresolved externals
NMAKE : fatal error U1077: 'link' : return code '0x460'
Stop.

Though most places had been fixed, one was missed out
in the recent set of fixes.  Diffs w.r.t 8.4.19 are:

diff -u tkWinWm.c.orig tkWinWm.c 
--- tkWinWm.c.origThu May  1 08:58:55 2008
+++ tkWinWm.cThu May  1 08:59:44 2008
@@ -2990,8 +2990,13 @@
      * translation.  Add the 0.5 to round the value.
      */
     if (!(wmPtr->exStyleConfig & WS_EX_LAYERED)) {
+#ifdef _WIN64
 SetWindowLongPtr(wmPtr->wrapper, GWL_EXSTYLE,
 *stylePtr);
+#else
+SetWindowLong(wmPtr->wrapper, GWL_EXSTYLE,
+*stylePtr);
+#endif
     }
     setLayeredWindowAttributesProc((HWND) wmPtr->wrapper,
     wmPtr->colorref, (BYTE) (wmPtr->alpha * 255 + 0.5),
User Comments: hobbs added on 2008-05-02 01:12:12:
Logged In: YES 
user_id=72656
Originator: NO

Get the 2003 platform SDK headers, use mingw, or use a newer MSVC.