cross-platform

SWT-like GUI toolkit for C

Hello, do you know any cross-platform gui toolkit like swt for C (using default widgets in each operating system = right pics on eclipse.org/swt) ? There is an implementation of swt for D language called DWT but I need it for C or C++. Thanks. ...

What is a cross-platform way to get the current directory?

I need a cross-platform way to get the current working directory (yes, getcwd does what I want). I thought this might do the trick: #ifdef _WIN32 #include <direct.h> #define getcwd _getcwd // stupid MSFT "deprecation" warning #elif #include <unistd.h> #endif #include <string> #include <iostream> using namespace std; int mai...

How return a std::string from C's "getcwd" function

Sorry to keep hammering on this, but I'm trying to learn :). Is this any good? And yes, I care about memory leaks. I can't find a decent way of preallocating the char*, because there simply seems to be no cross-platform way. const string getcwd() { char* a_cwd = getcwd(NULL,0); string s_cwd(a_cwd); free(a_cwd); return s_...

How can I set up a git repository on windows, and then push to/pull from it on Mac OSX

I'm trying to set up a Windows-based web server, but do the development work on Mac OSX. I installed freeSSHd and msysGit on the Windows server, and set up a repository where I want it. I also have git on my Mac and set up a repo there too. When I try to clone, pull from, or push to the windows repo via SSH, it gives me an error, "fata...

Cross-platform HTML application options

I'd like to develop a stand-alone desktop application targeting Windows (XP through 7) and Mac (Tiger through Snow Leopard), and if possible iPhone and Android. In order to make it all work with as much common code as possible (and because it's the only thing I'm good at), I'd like to handle the main logic with HTML and JS. Using Adobe A...

Is there a C++ graphing library?

Is there a C++ graphing library that can display visual graphs (such as hyperbolas and parabolas and linear equations) based on the equation it is given and that is cross platform? Or am I just asking for too much... ...

Organization of linking to external libraries in C++

In a cross-platform (Windows, FreeBSD) C++ project I'm working on, I am making use of two external libraries, Protocol Buffers and ZeroMQ. In both projects, I am tracking the latest development branch, so these libraries are recompiled / replaced often. For a development scenario, where is the best place to keep libprotobuf.{a,lib} and ...

Cannot run an executable binary file on another Linux System??

I'm using Ubuntu 10.04 and Qt4.6, and I've created an executable binary file on my own computer through QtCreator. Now I want to put my executable file on CentOS 5, but it seems that this executable file cannot run on CentOS. The error message is bash: ./[filename]: cannot execute binary file Now I know this comes from 32-bits and ...

Java Maximum File Size

Is there an cross-platform way to determine the maximum file size of the host OS in Java? ...

Programmatically obtain DNS servers of host

Using C++, I would like to obtain the DNS servers being used by a host for three operating systems: OS X, FreeBSD, and Windows. I'd like confirmation that the approaches below are indeed best practice, and if not, a superior alternative. OS X: already answered; updated link at developer.apple.com Windows: GetNetworkParms FreeBSD: /etc...

Calculating the pixel size of a string with Python

I have a Python script which needs to calculate the exact size of arbitrary strings displayed in arbitrary fonts in order to generate simple diagrams. I can easily do it with Tkinter. import Tkinter as tk import tkFont root = tk.Tk() canvas = tk.Canvas(root, width=300, height=200) canvas.pack() (x,y) = (5,5) text = "yellow world" fonts ...

Can I use boost library for crossplatform application executing?

Is there any WinAPI WinExec analog in boost (c++) libraries? I need to run executable from my program, and pass parameters to it. Should I use any other cross-platform libraries for this, or handle myself what OS my program is compiled for? ...

C#/CopyFile: Cross-platform code with Progress

Hi everyone, Please suggest me a C# cross-platform solution to copy a File with progress. The method should be able to copy the file on Mono as well on .NET. P.S. Most of the solutions here refers to CopyFileEx (which uses PInvoked and I am not sure if this will works on a Mono) P.S.S. Many thanks in advance! -- Murat ...

Are there any simple, stupid, module based, cross-platform, c++ projects that I can check out of a repository?

I'm looking for one just to get a general idea of how a standard C++ project should be properly setup. (If that's possible... :-p) Here are my requirements for this project: module-based (has libraries/modules that compile into a main program module) compiles cross-platform I'd like to do this so that I can get a hold on the basics ...

C++: Platform independent game lib?

Hi, I want to write a serious 2D game, and it would be nice if I have a version for Linux and one for Windows (and eventually OSX). Java is fantastic because it is platform independent. But Java is too slow to write a serious game. So, I thought to write it in C++. But C++ isn't very cross-platform friendly. I can find game libraries fo...

Is there any C\C++ Cross-platform library for sharing data between app's?

Is there any C\C++ Cross-platform library for sharing data between app's? ...

What's the advantage of an Adobe AIR app over a traditional desktop app?

I'm pretty familiar with using Adobe Flex & AS3, and compared with writing apps in JS/HTML I think it's very cool. However, since AIR is essentially a non-browser version of Flex with benefits like local storage, it seems to be competing as a cross-platform desktop application platform... and in that space it's much less mature than more...

Control Debug Level in C++ Library - Linux

Hi all, I have a C++ library, which is used in both Linux and Windows. I want to enable the user to control the debug level (0 - no debug, 1 - only critical errors ... 5 - informative debug information). The debug log is printed to a text file. In Windows, I can do it using a registry value (DWORD DebugLevel). What can be a good repl...

C: cross-platform RS232 serial library?

Hi folks, I am looking for an open source cross-platform library for working with the serial port in C, something along the lines of the awesome pyserial library (Unfortunately I have to use C for this application) I have only found this one: http://www.teuniz.net/RS-232/ and that doesn't seem to have mention OSX compatibility. Any re...

reading floating-point numbers with 1.#QNAN values in python

Hello, Does anyone know of a python string-to-float parser that can cope with MSVC nan numbers (1.#QNAN)? Currently I'm just using float(str) which at least copes with "nan". I'm using a python script to read the output of a C++ program (runs under linux/mac/win platforms) and the script barfs up when reading these values. (I did alread...