OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Jun 20, 2018 12:10 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to disable thread local storage in Visual Studio?
PostPosted: Mon Jun 04, 2018 12:34 pm 
Offline
Member
Member
User avatar

Joined: Mon Dec 28, 2015 11:11 am
Posts: 372
Location: Serbia, corruption and crime heaven...
This question may not be appropriate for this forum... But it's still related to OS development.
I get:
Code:
syscall.obj : error LNK2001: unresolved external symbol __Init_thread_header
syscall.obj : error LNK2001: unresolved external symbol __Init_thread_footer
syscall.obj : error LNK2001: unresolved external symbol __Init_thread_epoch
syscall.obj : error LNK2001: unresolved external symbol __tls_array
syscall.obj : error LNK2001: unresolved external symbol __tls_index

I could not find anything on Google neither in the project settings.
I would actually define these myself if I knew what they even actually are (e.g. are they functions, variables, etc.) and leave them empty.

Strangely, it happens every time I try to use C++ "static" and my solution to this problem was simply avoiding it.

_________________
Website


Top
 Profile  
 
 Post subject: Re: How to disable thread local storage in Visual Studio?
PostPosted: Mon Jun 04, 2018 12:52 pm 
Offline
Member
Member

Joined: Fri Aug 19, 2016 10:28 pm
Posts: 290
Do you mean global or local static? For local static I suspect it may be the thread-safe local static initialization in C++11. It requires synchronization such as userland mutex to be implemented, and it might rely on thread local storage. The compiler option to suppress the conformance in this regard is "/Zc:threadSafeInit-".


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group