Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

CRYP7IK

Member Since 14 May 2006
Offline Last Active Today, 02:12 AM
-----

Topics I've Started

Exporting and the issues that transpire!

10 January 2013 - 12:13 AM

Hey all,

 

I would like to start a discussion on the ever present issue that I am sure all programmers must face at some point, the issue or warning of exporting classes that contain standard template library classes; for example std::vector and std::string.  What do you think the most efficient, platform agnostic and cost effective solution is?

 

The first solution that comes to my mind is to just re-write aspects of the STL that you want to use.

 

Pros:

  • Full control
  • Probably faster (But situational)
  • No problems exporting your own classes
  • Can be thread friendly
  • Easier to debug

Cons:

  • Very cost in-effective
  • Needs a lot of testing

 

Another solution is to just ignore it and build different libraries for different implementations, so use msvc, gcc, clang and name your libraries after what they were compiled with. E.g. MyLibWindows64MSVC or MyLibWindows32GCC

 

Pros:

  • Very cost effective
  • Full usage of stl

Cons:

  • Hard for clients to use

 

How have you solved this problem or how would you solve this problem?


PARTNERS