cross-platform

Size of int in C on different architectures

I am aware that the specification of the C language does not dictate the exact size of each integer type (e.g., int). What I am wondering is: Is there a way in C (not C++) to define an integer type with a specific size that ensures it will be the same across different architectures? Like: typedef int8 <an integer with 8 bits> typedef i...

Cross language C# and Java development

Can you give me some advice on how to best ensure that two applications (one in C#, the other in Java) will be compatible and efficient in exchanging data? Are there any gotchas that you have encountered? The scenario is point to point, one host is a service provider and the other is a service consumer. ...

Cross-platform, open-source development framework that needs 3d graphics

I'm thinking of developing a game-like piece of software. It will probably require a bit of OpenGL, MIDI input, and math. I'd like to eventually sell the software, so it needs to be installable on PCs with different OSes. And I don't want to have to spend a lot of time on memory management and other low-level details. My question is ...

C memory management for Cross-platform VM.

Hi all, I asked a question about C-type sizes which I get a pretty good answer but I realized that I may not formulate the question very well to be useful for my purpose. My background was from Computer Engineer before moves to Software Engineer so I like computer architectures and always thinking about making VM. I've just finished an ...

How can I figure out which architecture I'm compiling for in GCC?

I want to write code that compiles easily for either 32 or 64 bit linux under gcc. I guess I'm looking for something like #ifdef IA32 subl $0x4, %esp #endif #ifdef X86_64 subl $0x4, %rsp #endif ...

What's the simplest cross-platform way to pop up graphical dialogs in Python?

I want the simplest possible way to pop up simple dialogs in Python scripts. Ideally, the solution would: Work on Windows, OS X, Gnome, KDE Look like a native dialog on any OS Require minimal code To pop up a simple standard dialog should require only minimal code. Essentially you're just saying "Pop up a standard dialog with this ...

Cross platform programming question (file I/O)

I have a C++ class that looks a bit like this: class BinaryStream : private std::iostream { public: explicit BinaryStream(const std::string& file_name); bool read(); bool write(); private: Header m_hdr; std::vector<Row> m_rows; } This class reads and writes data in a binary form...

Cross-Platform Programming Language with a decent gui toolkit?

For the program idea I have, it requires that the software be written in one binary that is executeable by all major desktop platforms, meaning it needs an interpreted language or a language within a JVM. Either is fine with me, but the programming language has to balance power & simplicity (e.g. Python) I know of wxPython but I have re...

Free cross-platform tools for web development

This question is geared towards a group of newly hired developers that need to adopt into a minimal learning curve, maximum development/programming/management effort. Some of the developers have senior level experience and will be mentoring the junior developers. My question is I would like a solid set of tools that can run on any system...

URI Escape C++ wstring

I am looking for a good way to do a URI Escape in C++ that would be reasonable for a cross platform project. I would like a function that would take a string like this: L"jiayou加油" And return: L"jiayou%E5%8A%A0%E6%B2%B9" I looked at using some thing like this, with minor modifacations to use wchar_t. However that would require con...

Cross-Platform equivalent to windows events

I'm trying to port some Windows code to Linux, ideally through platform-independent libraries (eg boost), however I'm not sure how to port this bit of event code. The bit of code involves two threads (lets call them A and B). A wants to do something that only B can, so it sends B a message, then waits for B to say its done. In windows t...

CMake: how to add compiler flags to non-default compiler

Hello I want to build a project with intel compiler. With default gcc I usually run: cmake -DCMAKE_CXX_FLAGS=-I/some/path /path/to/project And this works fine. cmake -DCMAKE_CXX_COMPILER=icpc -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_FLAGS=-I/some/path /path/to/project When I try to use non-default compiler it does not path CMAKE_CXX_...

Python: Platform independent way to modify PATH environment variable

Is there a way to modify the PATH environment variable in a platform independent way using python? Something similar to os.path.join()? ...

Where is Boost.Process?

I need to execute a program and retrieve its stdout output in c++. I'd like my code to be cross-platform too. Having recently discovered the wonderful world of the Boost c++ libraries for all your cross platform needs, I figured I'd just go to boost.org and read up on the documentation of Boost.Process. Much to my surprise, it wasn't th...

Python app distribution cross-platform

I want to distribute my app on OSX (using py2app) and as a Debian package. The structure of my app is like: app/ debian/ <lots of debian related stuff> scripts/ app app/ __init__.py app.py mod1/ __init__.py a.py mod2/ _...

SWT Cross-Platform Enter Detection

Hi, I have a global filter (Display.addFilter) in SWT in which I want to detect Enter key. In Windows, pressing Enter generates SWT.CR in 'keyCode' part of KeyListener event. Is this assumption safe for all platforms, or should I check if keyCode == SWT.CR || keyCode == SWT.LF? Thanks. ...

Using Qt to make an almost native Windows Application?

I love that Qt is cross-platform but I want to make an application that will call into some Windows specific .dll's. Kinda like Google Chrome does with the glass on Windows Vista/7 (I know Chrome isn't written using the Qt framework just thought it was a good example). How can I do this in Qt? Is it feasible? ...

Is there a Java utility which will convert a String path to use the correct File separator char?

I have developed a number of classes which manipulate files in Java. I am working on a Linux box, and have been blissfully typing new File("path/to/some/file");. When it came time to commit I realised some of the other developers on the project are using Windows. I would now like to call a method which can take in a String of the form "/...

Compiling windows binaries from Ubuntu?

I am doing a cross-platform C (not ++) game with both linux (main) and windows (alternate) binaries. Until now I used devcpp to compile in windows, but I have trouble getting some libraries to work right, and I heard it is possible to compile a windows binary from withing Linux. However, I don't know where to get started. The game uses ...

Cross platform audio analysis library

I'm looking for a cross-platform library that allows me to analyze the waveform of a sound file. It needs to be able to at least have the ability to query the amplitude for a given sample, and it would be nice if it could do frequency detection. ...