portability

Can any one tell me how to write a simple C++ code to export my data(from variable) into PDF file without using any external libraries or utilities?

Can any one tell me how to write a simple C++ code to export my data(from variable) into PDF file without using any external libraries or utilities? ...

Approaches to a GUI for a Large C Program

In our Bioinformatics lab we've recently been asked to create a GUI for a program written (and optimized) in C. Any GUI we designed would need to be able to feed input to and receive output from the C program, while also being easily portable to both Windows and Mac. What are ways to go about doing this? ...

Double(s) across different cpu architectures?

Is it OK to send over network double floating point values (adjusted for correct byte order of course) and using them interchangeably on different cpu architectures, specifically i386, mips (couple of different cores), powerpc (e300, e500). No extremely old hardware. Using gcc 4.2.1 as compiler with -Os for all architectures. Supposedl...

Deploying C# (.NET 2.0) application as a portable application?

Hello there, Is it possible to deploy a .NET 2.0 application as a portable executable? So that my program can be ran in a Flash Disk without the .NET Framework 2.0 installed in the target machine. Or maybe is it possible to distribute my program with the required .NET DLLs, so that no framework installation is necessary? I know that th...

How do you structure your reusable libraries?

How do you organize your code so that it can easily be ported across business projects without carrying unnecessary bloat? For example (in .Net), let's say you have the following namespaces: namespace Computers - Hardware - Motherboard - GPU namespace Monitors - Display - Mirrors namespace Peripherals...

Character strings in Fortran: Portable LEN_TRIM and LNBLNK?

I need a portable function/subroutine to locate the position of the last non-blank character in a string. I've found two options: LEN_TRIM and LNBLNK. However, different compilers seem to have different standards. The official documentation for the following compilers suggests that LEN_TRIM is part of the Fortran 95 standard on the f...

Visual Studio 2005 application portability

I am creating an application (VS2005, C++ Forms application) that is supposed to work on many different machines that won't have any version of Visual Studio and I am wondering what I should worry about. I am using the Mysql connector, so apparently the machine running it will need to have some compatible version of MySQL, but appart fro...

C++0x noise, bloat and portability

At first when I saw the upcoming C++0x standard I was delighted, and not that I'm pessimistic, but when thinking of it now I feel somewhat less hopeful. Mainly because of three reasons: a lot of boost bloat (which must cause hopeless compile times?), the syntax seems lengthy (not as Pythonic as I initially might have hoped), and I'm v...

Lightweight, portable C++ fibers, MIT license

I would like to get ahold of a lightweight, portable fiber lib with MIT license (or looser). Boost.Coroutine does not qualify (not lightweight), neither do Portable Coroutine Library nor Kent C++CSP (both GPL). Edit: could you help me find one? :) ...

How to serialize a pointer into an array of ints?

I know that converting a pointer to one int is unsafe, because the pointer can be bigger than the int in some architectures (for instance in x86_64). But what about converting the pointer to several ints, an array of them? If the pointer size is 2 times bigger than int then convert pointer* to int[2]. The number of needed ints then is ...

How to convert a simple .Net console project a into portable exe with Mono and mkbundle?

Hello, I'd like to convert my simple pure .Net 2.0 console utility into a portable exe which I could just put on an USB stick and run without having to worry whether the CLR and framework libraries are installed on a particular machine or not. Stackoverflow already has some information on using Mono and Mkbundle for creating self-con...

__LINE__ equivalent in Java ?

I'm searching a way to include __LINE__ as a compile-time constant in outputted messages. Various solutions seem to exist, but with a big runtime penalty as suggested in __LINE__ in JS and __LINE__ in C#. They are usually always based upon a runtime object StackFrame as log4j. Using the log4j possibility of enabling/disabling on a nee...

Test printf implementation

Hi I would like to have a portable implemenation of my application. However, I have heard that there are some issues with printf from the stdlib on certain machines where it does not behave as intended. For instance, when using the conversion specifier %f then it can happen that on certain architectures the printf implementation includ...

How to make designer generated .Net application settings portable

Hello, I've been looking at modifying the source of the Doppler podcast aggregator with the goal of being able to run the program directly from my mp3 player. Doppler stores application settings using a Visual Studio designer generated Settings class, which by default serializes user settings to the user's home directory. I'd like to...

What's the most cross-platform friendly coding language?

Let's say I want to create FPS game, let's say clone Crysis so everybody understand what type of graphics & performance I'm after. What's the best code to write this game with so it's as easy as possible to port it to all the common platforms? Of course I want the application to feel and be native to the platform. This also means that it...

Cross-platform primitive data types in C++

Unlike Java or C#, primitive data types in C++ can vary in size depending on the platform. For example, int is not guaranteed to be a 32-bit integer. Various compiler environments define data types such as uint32 or dword for this purpose, but there seems to be no standard include file for fixed-size data types. What is the recommended...

Use printf to display off_t, nlink_t, size_t and others

I have been programming an FTP server in my free time. But I have a problem with sending listings of a directory. I use the Unix format, also used by ls drwxr-xr-x 28 kasper kasper 4096 2009-08-14 01:32 Music drwxr-xr-x 4 kasper kasper 4096 2009-09-06 13:52 Pictures drwxr-xr-x 14 kasper kasper 4096 2009-09-09 18:49 Source drwxr-xr-x 2...

How portable is weak linking? #pragma weak my_symbol

Hi, How portable is weak linking? #pragma weak my_symbol I see that question: ow-to-make-weak-linking-work-with-gcc discusses how to get it working. But is there a good way to do this such that gcc is not required? What is the difference between weak linking and guarding the declartion with an #ifdef? #ifndef my_weak_fn void my_w...

Ambiguous template, Code Warrior

The following code compiles in Visual C++ and gcc, but fails with Code Warrior The complaint is that the call to the template is ambiguous -- can't decide between doIt( M* ) and doIt( M const* ), even though in each case, the parameter is unambiguously cost or non-const. Irritatingly, if I supply the second template argument, it decides...

Revert exception specifications behavior under VC++ 9.0

Hello everyone, I'm working on old code that relies heavily on the exception specifications behavior described in the language standard. Namely, calls to std::unexpected() on exception specification violations of the form described below. foo() throw(T) { /*...*/ } Nothrow specifications are indeed guaranteed to not throw, but throw(...