#1 2023-12-04 09:52:56

Coldzer0
Member
From: ::1
Registered: 2018-08-31
Posts: 35
Website

Windows API Multiple defined symbols

Hello

I was working on my project ImGui-Pascal, and It requires linking with some Windows libraries, one of them is msvcrt
And I was recreating one of my projects to use it as a UI and mORMot2 as the backend.

The problem is these APIs are already defined in src\lib\mormot.lib.static.pas

Error: Multiple defined symbol "__strtod"
Error: Multiple defined symbol "__imp__localtime64"

__strtod is only used by src\lib\mormot.lib.quickjs.pas, which can be handled with an IFDEF if QuickJS is used.

But the real problem is imp_localtime64 := @localtime64; which I assume is used for some other library (not sure).

So, what do you think about this case?


Mac, Windows, Linux
FPC Trunk, Lazarus Trunk, Delphi 12.x Latest

Offline

#2 2023-12-06 10:16:39

Coldzer0
Member
From: ::1
Registered: 2018-08-31
Posts: 35
Website

Re: Windows API Multiple defined symbols

I end up using NOLIBCSTATIC

I created a pull request because it needed some extra fixes so the code could compile

https://github.com/synopse/mORMot2/pull/231


Mac, Windows, Linux
FPC Trunk, Lazarus Trunk, Delphi 12.x Latest

Offline

#3 2023-12-06 20:20:20

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,713
Website

Re: Windows API Multiple defined symbols

I will look into this.

But perhaps we could understand better why we need some of those very low-level symbols whereas you don't need them on your side.

Offline

#4 2023-12-08 19:24:16

Coldzer0
Member
From: ::1
Registered: 2018-08-31
Posts: 35
Website

Re: Windows API Multiple defined symbols

I found a bug in the static unit and sent a fix in the same pull request.


Mac, Windows, Linux
FPC Trunk, Lazarus Trunk, Delphi 12.x Latest

Offline

#5 2023-12-15 04:01:41

Coldzer0
Member
From: ::1
Registered: 2018-08-31
Posts: 35
Website

Re: Windows API Multiple defined symbols

Hello @ab

Any updates on this https://github.com/synopse/mORMot2/pull/231, Especially the _write bug.


Mac, Windows, Linux
FPC Trunk, Lazarus Trunk, Delphi 12.x Latest

Offline

Board footer

Powered by FluxBB