Page 1 of 1

Technical problem request master solution

Posted: Wed Feb 17, 2016 9:02 am
by zgneng

Code: Select all

POLINK: error: Unresolved external symbol '___security_cookie'.
POLINK: error: Unresolved external symbol '@__security_check_cookie'.
POLINK: error: Unresolved external symbol '___iob_func'.
POLINK: error: Unresolved external symbol '__except_handler4'.
POLINK: fatal error: 4 unresolved external(s).

Code: Select all

  ImportC "mytest.lib"
;   
    LzmaCompress(a.i, b.i) As "_LzmaCompress@8"
;   
 EndImport
ImportC "-Wl,--allow-multiple-definition" : EndImport   

p.s="ssssssssss"

c.s="wwwwwwww"


 LzmaCompress(@p,@c)


Some static library loading problems, request solutions

Describe the process of solving the problem

I will thank you very much

Open source code, please download

http://files.cnblogs.com/cxun/7zDll.7z


Re: Technical problem request master solution

Posted: Wed Feb 17, 2016 11:13 am
by zgneng
zgneng wrote:

Code: Select all

POLINK: error: Unresolved external symbol '___security_cookie'.
POLINK: error: Unresolved external symbol '@__security_check_cookie'.
POLINK: error: Unresolved external symbol '___iob_func'.
POLINK: error: Unresolved external symbol '__except_handler4'.
POLINK: fatal error: 4 unresolved external(s).

Code: Select all

  ImportC "mytest.lib"
;   
    LzmaCompress(a.i, b.i) As "_LzmaCompress@8"
;   
 EndImport
ImportC "-Wl,--allow-multiple-definition" : EndImport   

p.s="ssssssssss"

c.s="wwwwwwww"


 LzmaCompress(@p,@c)


Some static library loading problems, request solutions

Describe the process of solving the problem

I will thank you very much

Open source code, please download

http://files.cnblogs.com/cxun/7zDll.7z

No one can solve it

Re: Technical problem request master solution

Posted: Wed Feb 17, 2016 11:52 am
by Dude
zgneng wrote:No one can solve it
You only posted it two hours ago! :shock:

Re: Technical problem request master solution

Posted: Wed Feb 17, 2016 12:00 pm
by DontTalkToMe
Probably you have to rebuild the library disabling exception handling (or something similar sounding), and overflow buffers checks (or similar sounding) and retry.

Unfortunately linking static libraries built with different compilers gives problem almost everytime, and even if you solve the problem now, a change in the compiler used for PB or in the compiler used for the library or the library code itself will break it again in the future.

That's why you see many libs are distributed as DLL (or at least it's one of the reasons).

Re: Technical problem request master solution

Posted: Wed Feb 17, 2016 12:02 pm
by acreis
I've done a quick and dirty google search.

Thirs search result:

http://preshing.com/20110807/the-cost-o ... -visual-c/

Maybe you should disable Buffer Security Check.

Best regards