-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Missing main entry point in shared libraries #6983
Copy link
Copy link
Closed
Labels
BugThis tag is applied to issues which reports bugs.This tag is applied to issues which reports bugs.OS: WindowsBugs/feature requests, that are specific to Windows OS.Bugs/feature requests, that are specific to Windows OS.Status: ConfirmedThis bug has been confirmed to be valid by a contributor.This bug has been confirmed to be valid by a contributor.
Description
Metadata
Metadata
Assignees
Labels
BugThis tag is applied to issues which reports bugs.This tag is applied to issues which reports bugs.OS: WindowsBugs/feature requests, that are specific to Windows OS.Bugs/feature requests, that are specific to Windows OS.Status: ConfirmedThis bug has been confirmed to be valid by a contributor.This bug has been confirmed to be valid by a contributor.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Unlike executable files libraries do not use a main entry point, at least on Windows.
No entry point means _vinit is not called at all, hence consts etc... do not get initialized.
On Windows I would suggest to generate the DllMain function which calls then _vinit and possibly a user-main function, which gets the parameters from DllMain forwarded.
V version:
OS: windows, Microsoft Windows 7 Professional v7601 64-bit
Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i5-2500 CPU @ 3.30GHz
CC version: N/A
vroot: D:\ProgramData\Compiler\v
vexe: D:\ProgramData\Compiler\v\v.exe
vexe mtime: 2020-11-27 18:44:30
is vroot writable: true
V full version: V 0.1.29 e0d6490.1891f55
Git version: git version 2.19.1.windows.1
Git vroot status: latest-commit-414-g1891f55c
.git/config present: true
thirdparty/tcc status: master 17d18c13
What did you do?
build shared library
What did you expect to see?
The function DllMain created
What did you see instead?
DllMain is missing