portability

Building linux binaries for multiple platforms

空扰寡人 提交于 2019-11-30 12:39:09
Help me settle a score. I have a piece of software written in C++ that's meant to run on as many linux distributions as possible and I need to figure out a strategy that's effective. I'm trying to ship binaries in this case not source code (might be good to know). It's already a commercial product and I have intellectual property issues that prevent me from open sourcing the product but also means I have to deal with a myriad of GPL issues. The current line of reasoning has been to pick a least common denominator and build everything off that. That has two major implications that I find

Is there a portable Perl? [closed]

好久不见. 提交于 2019-11-30 11:37:58
Is there a portable Perl along the lines of portable Python? Something I could use (while learning the stuff) from my thumb drive? Oh, and I'm talking about Window XP. I can heartily recommend Strawberry Perl . The Portable version is on Beta (the real meaning of Beta, though), click here to get it. EDIT: The Portable version is already out of beta (for a few months now), check here There's a test version over at PortableApps.com although it appears that long-term it will be replaced by Strawberry Perl (which is what it's based on). I've deployed applications to hostile end user machines (i.e.

Multithreading in C++ … where to start?

我的梦境 提交于 2019-11-30 11:35:10
I'd like to start learning multithreading in C++. I'm learning it in Java as well. In Java, if I write a program which uses multithreading, it will work anywhere. However in C++, doesn't multithreading rely on platform-specific API's? If so, that would seem to get in the way of portability. How can I do multithreading in C++ without causing portability issues? Is boost's thread library a good solution? As a sidenote - how is it even possible to implement multithreading as a library? Isn't that something that has to be done by the compiler? If you do not have a compiler that supports C++0x yet

Portable lightweight C++ sockets wrapper

孤者浪人 提交于 2019-11-30 11:16:42
I really thought this would be easier to find... I need a portable c++ sockets wrapper. I'm planning to use it for a windows server application and a client that will be running on a embedded device running ulinux (or something similar). I would use Boost but I need it to be lightweight and easy to add to the embedded device project. Also I would like it to be a "higher level" wrapper... so it starts a background thread to read data and informs be over a callback... Any ideas? Just learn to use the socket API directly. You can then easily wrap it yourself. It's not that hard, and you can get

How to design a C / C++ library to be usable in many client languages? [closed]

谁说胖子不能爱 提交于 2019-11-30 10:13:46
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . I'm planning to code a library that should be usable by a large number of people in on a wide spectrum of platforms. What do I have to consider to design it right? To make this questions more specific, there are four "subquestions" at the end. Choice of language Considering all the

How similar/different are gnu make, microsoft nmake and posix standard make?

梦想与她 提交于 2019-11-30 08:04:09
How similar/different are gnu make, microsoft nmake and posix standard make? Obviously there's things like "which OS?", "which compiler?" and "which linker?", but I'm referring specifically to the syntax, semantics and command-line options of the makefiles themselves. If I write makefiles based on manuals for gnu make, what are the most important portability issues that I need to be aware of? GNU Make and POSIX Make share a common core so that GNU Make understands makefiles intended for POSIX Make and interprets them the same way - with very few exceptions. However, many GNU Makefiles use

What is the most portable/cross-platform way to represent a newline in go/golang?

你离开我真会死。 提交于 2019-11-30 08:02:39
Currently, to represent a newline in go programs, I use \n . For example: package main import "fmt" func main() { fmt.Printf("%d is %s \n", 'U', string(85)) } ... will yield 85 is U followed by a newline. However, this doesn't seem all that cross-platform. Looking at other languages, PHP represents this with a global constant ( PHP_EOL ). Is \n the right way to represent newlines in a cross-platform specific manner in go / golang? I got curious about this so decided to see what exactly is done by fmt.Println . http://golang.org/src/pkg/fmt/print.go If you scroll to the very bottom, you'll see

Program portability

邮差的信 提交于 2019-11-30 06:44:37
How to make sure that my program will be fully portable? Steve Jessop 1. Test This is a necessary but not a sufficient condition for doing anything properly. To test portability, you'll want multiple platforms and compilers. 2. Write to the standard, not to your development platform. This means, only do something if the standard says you can do it. Only expect a particular result if the standard says you can expect it. Only use a library or API if the standard says it exists. The standard is available here (among other places): http://openassist.googlecode.com/files/C%2B%2B%20Standard%20-

Portable Programming IDE

陌路散爱 提交于 2019-11-30 06:38:18
问题 Frequently I'm brainstormed with programming ideas that I would like to directly code. More or less like "Wow, that algorithm will rock! I need to write it now!". For this kind of "impulse" to write, I use http://www.jarte.com/ that is a cool portable text editor. If I'm near a cybecafe or a friend computer, I just plug the usb pen drive and start to write... So, I would like: 1) a portable minimalist IDE 2) with minimal OS requirement (ie.: I want run from XP, Vista, etc...) 3) any modern

When is the use of std::ref necessary?

自古美人都是妖i 提交于 2019-11-30 06:02:47
Consider: std::tuple<int , const A&> func (const A& a) { return std::make_tuple( 0 , std::ref(a) ); } Is the std::ref required for writing correct and portable code? (It compiles fine without it) Background: If I remove std::ref my code builds fine without any warnings ( g++-4.6 -Wall ), but doesn't run correctly. In case of interest the definition of A : struct A { std::array<int,2> vec; typedef int type_t; template<typename... OPs,typename... VALs> A& operator=(const std::pair< std::tuple<VALs...> , std::tuple<OPs...> >& e) { for( int i = 0 ; i < vec.size() ; ++i ) { vec[i] = eval( extract(i