OSX GCC, 'dispatch_block_t' has not been declared, invalid typedef 2014-11-23
In OSX 10.10 Yosemite the
header file contains code that can be processed by clang but not GCC. The specific error that GCC 4.9 (via homebrew) produces is:
THERE AND BACK AGAIN
- A DYNAMICS TALE
--Hammad Mazhar--
In OSX 10.10 Yosemite the
header file contains code that can be processed by clang but not GCC. The specific error that GCC 4.9 (via homebrew) produces is:
clang-format is a program similar to astyle that cleans up and formats C++ code.
Currently there is support for integration with:
As of 2015-2-24 the following editors are supported
Using the automator service method described below is only necessary if you would like to be able to use clang-format for any program using a system wide keyboard shortcut.
On OSX clang is one of the default compilers supported but the version of clang on OSX does not come with clang-format. There are two options for installing:
See related homebrew pull request here
Note that as of 2014-12-03 clang-format is part the main homebrew repository, see here.
With this option you can copy clang-format to your /usr/local/bin directory (or a location located in your path)
Download clang binaries link
Extract and copy clang-format
This post will cover a simple way to compress simulation data in memory using ZLib. The goal is to write out compressed data directly without having to deal with binary data formats.
I do a lot of rendering with PovRay which means that I need to store comma separated ascii files because that is the only data format supported. The problem is that when I’m saving data for millions of objects the files can become several hundred MB in size.
I propose one solution where all simulation data is stored compressed and a simple program can be used to decompress it and write it out as povray compatible files when needed.
My data is stored in a std::stringstream which I normally stream out to a file. I would like to directly compress this stream and when I need the data, decompress it back into a string.
This guide will describe how to set up a build environment to compile chrono on several different arm platforms, Arch linux in general, Windows and OSX.
based on an ARM5 architecture: Pogoplug V4
based on an ARM6 architecture: Raspberry Pi
based on an ARM7 architecture: Galaxy Nexus
Intel i7-5960X Running Windows 8.1 and Arch Linux
Intel iMac running OSX 10.9 or 10.10 iMac (20-inch, Early 2009)
Bullet Physics is a great library for adding physics to a game, it can also be used purely as a collision detection tool. I wanted to document the simplest way to set bullet up for collision detection, and then get the contact information back from bullet.
There is nothing special about the code, but I wanted to have it here for my own reference