Skip to content

Statically linking lexilla still exports symbols #311

@dail8859

Description

@dail8859

On Windows, in Lexilla.cxx

lexilla/src/Lexilla.cxx

Lines 14 to 17 in 0c5d07e

#if defined(_WIN32)
#define EXPORT_FUNCTION __declspec(dllexport)
#define CALLING_CONVENTION __stdcall
#else

EXPORT_FUNCTION is always defined as __declspec(dllexport)

I am statically linking Lexilla thus I do not need any exports. In the end it's not effecting functionality, but currently after compiling my executable is exporting the Lexilla functions.

C:\Users\xxx\Code\NotepadNext>dumpbin /EXPORTS NotepadNext.exe
Microsoft (R) COFF/PE Dumper Version 14.43.34810.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file NotepadNext.exe

File Type: EXECUTABLE IMAGE

  Section contains the following exports for NotepadNext.exe

    00000000 characteristics
    FFFFFFFF time date stamp
        0.00 version
           1 ordinal base
           8 number of functions
           8 number of names

    ordinal hint RVA      name

          1    0 00051C90 CreateLexer = @ILT+330880(CreateLexer)
          2    1 00048BD0 GetLexerCount = @ILT+293824(GetLexerCount)
          3    2 000012F0 GetLexerFactory = @ILT+736(GetLexerFactory)
          4    3 0004BDD0 GetLexerName = @ILT+306624(GetLexerName)
          5    4 00009220 GetLibraryPropertyNames = @ILT+33296(GetLibraryPropertyNames)
          6    5 00031CE0 GetNameSpace = @ILT+199888(GetNameSpace)
          7    6 00010AE0 LexerNameFromID = @ILT+64208(LexerNameFromID)
          8    7 00002730 SetLibraryProperty = @ILT+5920(SetLibraryProperty)

Ideally I would like some way (e.g. a define) to signal the intent to build it statically.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildingBuild process issue

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions