STL run time link problem ( MSVC ABI )

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

STL run time link problem ( MSVC ABI )

Alex Denisov via cfe-dev

We have a contributor who is working on porting CopperSpice to compile
with MSVC 2017 and/or the clang Windows ABI compatible tool chain. There
seems to be a potential problem and we are not sure if this is serious.
Options:  some wonderful person points us to a workaround, there is a
decent solution using the clang front end, jump up and down and hope MS
will correct this.

In our library we have a templated class with a data member whose type
is std::deque<T>. This class is in "lib_a.dll" and is used in
"lib_b.dll" and the main executable.

We have read/been told the following:  "The only STL container that can
currently be exported is std::vector. The other containers ( map, set,
queue, list, deque) all contain nested classes and can not be exported."
So according to MSDN docs it is impossible to export the  STL
containers, like deque. Does this limitation exist in clang when using
the MSVC compatible ABI on Windows?

Something does not add up here and I will admit I am not sure I fully
understand the problem. Our hope is that someone can see through this
issue and help us define the real problem and offer a suggestion.

Any ideas or a potential direction is appreciated.


Barbara

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: STL run time link problem ( MSVC ABI )

Alex Denisov via cfe-dev
Haven’t used msvc in a while, but if I remember correctly, each dll has it’s own heap, so you can’t allocate in one and delete in another — unless you buy the professional version.

Not sure if this applies, but hope it helps...
don 

On Thu, Nov 9, 2017 at 9:47 PM barbara via cfe-dev <[hidden email]> wrote:

We have a contributor who is working on porting CopperSpice to compile
with MSVC 2017 and/or the clang Windows ABI compatible tool chain. There
seems to be a potential problem and we are not sure if this is serious.
Options:  some wonderful person points us to a workaround, there is a
decent solution using the clang front end, jump up and down and hope MS
will correct this.

In our library we have a templated class with a data member whose type
is std::deque<T>. This class is in "lib_a.dll" and is used in
"lib_b.dll" and the main executable.

We have read/been told the following:  "The only STL container that can
currently be exported is std::vector. The other containers ( map, set,
queue, list, deque) all contain nested classes and can not be exported."
So according to MSDN docs it is impossible to export the  STL
containers, like deque. Does this limitation exist in clang when using
the MSVC compatible ABI on Windows?

Something does not add up here and I will admit I am not sure I fully
understand the problem. Our hope is that someone can see through this
issue and help us define the real problem and offer a suggestion.

Any ideas or a potential direction is appreciated.


Barbara

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: STL run time link problem ( MSVC ABI )

Alex Denisov via cfe-dev
In reply to this post by Alex Denisov via cfe-dev
I think this article provides good explanation of complexities you may face with STL classes as well as possible solution for the problem.
 
 
In short all classes anyhow related to exported class are to be explicitly exported as well including alocators, iterators and inner classes related to implementation.
 
 
Regards,
Serge Preis.
 
 
10.11.2017, 12:47, "barbara via cfe-dev" <[hidden email]>:


We have a contributor who is working on porting CopperSpice to compile
with MSVC 2017 and/or the clang Windows ABI compatible tool chain. There
seems to be a potential problem and we are not sure if this is serious.
Options: some wonderful person points us to a workaround, there is a
decent solution using the clang front end, jump up and down and hope MS
will correct this.

In our library we have a templated class with a data member whose type
is std::deque<T>. This class is in "lib_a.dll" and is used in
"lib_b.dll" and the main executable.

We have read/been told the following: "The only STL container that can
currently be exported is std::vector. The other containers ( map, set,
queue, list, deque) all contain nested classes and can not be exported."
So according to MSDN docs it is impossible to export the STL
containers, like deque. Does this limitation exist in clang when using
the MSVC compatible ABI on Windows?

Something does not add up here and I will admit I am not sure I fully
understand the problem. Our hope is that someone can see through this
issue and help us define the real problem and offer a suggestion.

Any ideas or a potential direction is appreciated.


Barbara

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev