Cross-platform Development Part 1: Few tools and libraries to get started with

Continuing from Getting started, here we will see some of the basic tools and libraries that one should be acquainted with to make the cross platform development fun and easy (while respecting the audience request to consider non-Windows platforms also). One of the most challenging parts of cross-platform development is ensuring portability/correctness across all the…

0

Getting started with Cross-platform development

They say if you do not eat, drink, sleep C/C++ – then the chances are you are not a real developer. Is it? May be, may be not. But certainly if you have not done cross-platform development or design, you cannot claim to be a good architect or developer. Is cross-platform development really so special?…

3

Alsa Driver for JDKMidi with RtMidi on Linux using C++0x Futures

One of the questions that I come across developers asking frequently is “what is the best C++ MIDI library”. It often goes unanswered unequivocally. The reason being, despite the presence of numerous C++ MIDI libraries out there, there is no single library that meets all the requirements of a music programmer. Often developers end up having…

1

Tracking C++ variable state changes

Tracking class variables’ state changes can be tricky, especially if we are using too many asynchronous constructs. This is especially true for game and graphic application scenarios where hundreds and perhaps even thousands of object fly around changing their values in who knows which thread. (Who is forcing that character position into that map corner…

0

How to create and manipulate Terabyte size Arrays with Win32API

If you are looking for a way of creating and accessing very large arrays, arrays that can handle content in the order of Tera Bytes, then probably you might find the File Mapping techniques useful for that purpose. File mapping is the association of a file’s contents with a portion of the virtual address space…

1

Multiplication Circuit for Prime Factorization

Deriving a multiplication circuit for the Prime Factorization problem is trivial if you know how to convert the arithmetic and relational expressions into propositional logic. Below I will show few expressions and their corresponding CNF formulation. Converting Arithmetic and Relational expressions to Propositional Logic Here symbols such as x, y, z, a, b, c etc……

1

How to check if my code is executing inside a Managed App or Native App?

If you check the CRT source code (inside VC\crt\src\crt0.c) you can find an interesting function check_managed_app() that returns 1 if managed app, 0 if not based on the COM Runtime Descriptor in the Image Data Directory of the PE or PE+ header. You can generalize it to test if you are running as part of…

1

Well-designed libraries

It is very rare that we come across a well-designed library every day, and even rare that we get a chance to work on them on daily basis. While it is hard to define what makes any given library “well-designed”, it is rather easy to identify what is not. However, there are few exceptionally good…

1

Remove Data-dependencies

Are you planning to remove data-dependencies in your logic? You might find the below useful. Statement Block Constant Time Equivalent x++; if(x >= MAX_SIZE) x = 0; x = ( x + 1 ) % MAX_SIZE; x–; if(x < 0) x = MAX_SIZE – 1; x = (x + MAX_SIZE – 1) % MAX_SIZE; x…

1

Having hard time marshalling parameters from C++ to .Net?

If you are finding it difficult to send parameters from C++ to .Net, try if you can use the following class: ——————————————————————————————————————————– #ifndef __PARAMETERS_H_A1B7ECCA_1691_43d0_ACDD_EBE1208005F9#define __PARAMETERS_H_A1B7ECCA_1691_43d0_ACDD_EBE1208005F9#include <Comdef.h>#ifdef _DEBUG  #define NO_ERROR_CHECKING FALSE //Use Error Checking for Debug Versions (throws Exception from Constructor !!)#else  #define NO_ERROR_CHECKING TRUE //Turn-off Error Checking for Release Versions#endif#ifndef _MFC_VER //Check if this is…

1