Re: [sqlite] import-prefixed symbols in sqlite3.obj file

2016-11-10 Thread Max Vlasov
On Thu, Nov 10, 2016 at 1:51 PM, Dominique Devienne  wrote:
> On Thu, Nov 10, 2016 at 11:38 AM, Max Vlasov  wrote:
>
>> __imp_EnterCriticalSection
>
>
> Is this post [1] related to your issue?
> Maybe you're not using the 64-bit SDK too? --DD

thanks for mentioning. As this topic and many other discussions at the
web are c++ linker related. So mostly it's about setting the correct
path/library information when the linker knows what different prefixes
mean. I suppose that in my case delphi linker understands only
non-prefixed symbol entries. Even if I failed switching to the correct
SDK, then I'd get many additional unresolved external entries, but in
my case other windows symbols used by sqlite are correctly resolved
when linking.
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


Re: [sqlite] import-prefixed symbols in sqlite3.obj file

2016-11-10 Thread Dominique Devienne
On Thu, Nov 10, 2016 at 11:38 AM, Max Vlasov  wrote:

> __imp_EnterCriticalSection


Is this post [1] related to your issue?
Maybe you're not using the 64-bit SDK too? --DD

[1]
http://stackoverflow.com/questions/17840857/linker-errors-while-migrating-from-x32-to-x64
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users


[sqlite] import-prefixed symbols in sqlite3.obj file

2016-11-10 Thread Max Vlasov
Hi,

Trying to link sqlite object file generated by visual c++ command-line
compiler(cl.exe sqlite3.c /c) with the Delphi 64 bit executable, I
encountered that some functions by windows api used by sqlite contains
"___imp_" prefix (total: 7). This happened since recent delphi 64 bit
compilers accept COFF format files  but probably lack some assumptions
about semantics so doesn't automatically interprets such symbols as
imported function names.

The examples of imp-prefixed functions are
  __imp_EnterCriticalSection
  __imp_InitializeCriticalSection

All the other windows api imported function is linked without problems
and they don't have a prefix in the symbol table of the obj file.

I tried to compare the first appearances of normal and imp-prefixed
functions in the sqlite3.c. The normal ones are usually part of
win_syscall structure, while imp-prefixed appears randomly inside
win*** functions, for example EnterCriticalSection in winMutexEnter.

I will probably fix this by making special imported entries containing
this prefix, but just wonder why Visual c++ compiler interprets some
windows symbols as strict dll-imported entries and some as general
external symbols.

Thanks,

Max
___
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users