linker error with version 2.23

281 views
Skip to first unread message

dlchnr

unread,
Dec 31, 2010, 1:31:16 PM12/31/10
to scintilla-interest
These days I started to transfer a patch enabling user configurable
explicit fold points (like jEdit's "Configurable Fold Handler")
from SciTE/Scintilla version 2.11 to SciTE/Scintilla version 2.23. I
haven't had problems to compile SciTE/Scintilla with
"Vicual C++ 2008 Express Edition" until SciTE/Scintilla version 2.12,
but after this version I got linker errors first when building
SciTE (version 2.20, version 2.21, version 2.22 and version 2.23), now
when building Scintella (version 2.23) - do I need a full
version of Microsoft Visual Studio to compile the latest version of
ScitTE/Scintilla or can someone give a hint, what I've to do,
building will work without linker errors?

scite223/SciLexer:
.
.
.
LexYAML.cxx
LineMarker.cxx
PerLine.cxx
PlatWin.cxx
PositionCache.cxx
Generating Code...
Compiling...
PropSetSimple.cxx
RESearch.cxx
RunStyles.cxx
ScintillaBase.cxx
ScintillaWin.cxx
Selection.cxx
Style.cxx
StyleContext.cxx
UniConversion.cxx
ViewStyle.cxx
WordList.cxx
XPM.cxx
Generating Code...
Compiling resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
Copyright (C) Microsoft Corporation. All rights reserved.
Compiling manifest to resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
Copyright (C) Microsoft Corporation. All rights reserved.
Linking...
Creating library .\../bin/SciLexer.lib and object .\../bin/
SciLexer.exp
Catalogue.obj : error LNK2001: unresolved external symbol "class
LexerModule lmA68k" (?lmA68k@@3VLexerModule@@A)
.\../bin/SciLexer.dll : fatal error LNK1120: 1 unresolved externals
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 9.00.30729
Copyright (C) Microsoft Corporation. All rights reserved.
Build log was saved at "file://H:\P2009\wxWidgets-2.8.9\scite\scintilla
\vcbuild\Debug\BuildLog.htm"
SciLexer - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
==========

scite223/SciTE:
.
.
.
XPM.cxx
Generating Code...
Compiling resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
Copyright (C) Microsoft Corporation. All rights reserved.
Compiling manifest to resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
Copyright (C) Microsoft Corporation. All rights reserved.
Linking...
SciTEWin.obj : error LNK2019: unresolved external symbol
__imp__CloseThemeData@4 referenced in function "protected: virtual
void __thiscall Strip::Destruction(void)" (?Destruction@Strip@@MAEXXZ)
SciTEWin.obj : error LNK2019: unresolved external symbol
__imp__DrawThemeBackground@24 referenced in function "protected:
virtual void __thiscall Strip::Paint(struct HDC__ *)" (?
Paint@Strip@@MAEXPAUHDC__@@@Z)
SciTEWin.obj : error LNK2019: unresolved external symbol
__imp__GetThemePartSize@28 referenced in function "protected: void
__thiscall Strip::SetTheme(void)" (?SetTheme@Strip@@IAEXXZ)
SciTEWin.obj : error LNK2019: unresolved external symbol
__imp__OpenThemeData@8 referenced in function "protected: void
__thiscall Strip::SetTheme(void)" (?SetTheme@Strip@@IAEXXZ)
SciTEWin.obj : error LNK2019: unresolved external symbol
__imp__TransparentBlt@44 referenced in function "protected: virtual
long __thiscall Strip::CustomDraw(struct tagNMHDR *)" (?
CustomDraw@Strip@@MAEJPAUtagNMHDR@@@Z)
SciTEWin.obj : error LNK2019: unresolved external symbol
__imp__GetThemeBackgroundContentRect@24 referenced in function
"protected: virtual long __thiscall Strip::CustomDraw(struct tagNMHDR
*)" (?CustomDraw@Strip@@MAEJPAUtagNMHDR@@@Z)
SciTEWin.obj : error LNK2019: unresolved external symbol
__imp__DrawThemeParentBackground@12 referenced in function "protected:
virtual long __thiscall Strip::CustomDraw(struct tagNMHDR *)" (?
CustomDraw@Strip@@MAEJPAUtagNMHDR@@@Z)
.\Debug/SciTE.exe : fatal error LNK1120: 7 unresolved externals
Creating browse information file...
Microsoft Browse Information Maintenance Utility Version 9.00.30729
Copyright (C) Microsoft Corporation. All rights reserved.
Build log was saved at "file://h:\P2009\wxWidgets-2.8.9\scite\scite
\vcbuild\Debug\BuildLog.htm"
SciTE - 8 error(s), 2 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped
==========linker error

:dlchnr

dlchnr

unread,
Dec 31, 2010, 3:39:41 PM12/31/10
to scintilla-interest
I've detected the problem for the linker error building SciLexer 2.23
- LexA68k.cxx must be added to the project.
Have I to add another file to the SciTE project to solve the linker
errors in that case too?

dlchnr

unread,
Dec 31, 2010, 6:52:59 PM12/31/10
to scintilla-interest
It seems, the unresolved external will be produced within

#ifdef THEME_AVAILABLE
.
.
.
#endif

blocks inside SciTEWin.cxx.

The SciTE project can be successfully built, if

#ifdef DTBG_CLIPRECT
#define THEME_AVAILABLE
#endif

will be changed to

#ifdef DTBG_CLIPRECT
//#define THEME_AVAILABLE
#endif

inside SciTEWin.cxx - therefore DTBG_CLIPRECT must be defined, but I
can't find its definition - and I can't find any source code of the
missed functions???

Neil Hodgson

unread,
Dec 31, 2010, 7:39:48 PM12/31/10
to scintilla...@googlegroups.com
dlchnr:

> I've detected the problem for the linker error building SciLexer 2.23
> - LexA68k.cxx must be added to the project.

An updated project file is available from Hg.
https://sourceforge.net/scm/?type=hg&group_id=2439

You need a newer version of the Windows SDK
http://msdn.microsoft.com/en-us/windows/bb980924

Neil

dlchnr

unread,
Dec 31, 2010, 7:48:06 PM12/31/10
to scintilla-interest

> inside SciTEWin.cxx - therefore DTBG_CLIPRECT must be defined, but I
> can't find its definition - and I can't find any source code of the
> missed functions???

I've found it - DTBG_CLIPRECT will be defined in Microsoft SDKs'
Uxtheme.h.
I've to add UxTheme.lib and Msimg32.lib to the link line - correct
solution (I wonder, I've to add something to the project ?-)?

dlchnr

unread,
Dec 31, 2010, 8:05:37 PM12/31/10
to scintilla-interest

>    You need a newer version of the Windows SDKhttp://msdn.microsoft.com/en-us/windows/bb980924


I've installed SDK v6.0A - is it ok, to add the two libraries to the
link line or do I have to upgrade to SDK 7.1?

Thx dlchnr

Neil Hodgson

unread,
Jan 1, 2011, 7:25:13 AM1/1/11
to scintilla...@googlegroups.com
dlchnr:

> I've installed SDK v6.0A - is it ok, to add the two libraries to the
> link line or do I have to upgrade to SDK 7.1?

My copy says "Windows SDK for Visual Studio 2008" rather than a
version number. I think its a subset that could be quickly downloaded.

> I've to add UxTheme.lib and Msimg32.lib to the link line - correct
> solution (I wonder, I've to add something to the project ?-)?

Something like that.

I use the make files (scintilla\win32\scintilla.mak and
scite\win32\scite.mak) since they can more readily cope with the
different versions of Visual Studio.

Neil

Reply all
Reply to author
Forward
0 new messages