# BinaryData.h and .cpp - what are they? how to use them?

**URL:** <https://forum.juce.com/t/binarydata-h-and-cpp-what-are-they-how-to-use-them/2361>\
**Category:** General JUCE discussion\
**Created:** [November 29, 2007, 3:24pm UTC](https://forum.juce.com/t/binarydata-h-and-cpp-what-are-they-how-to-use-them/2361 "2007-11-29T15:24:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![laserbeak](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/laserbeak/32/1765_2.png) [@laserbeak](https://forum.juce.com/u/laserbeak)\
**Post date:** [November 29, 2007, 3:24pm UTC](https://forum.juce.com/t/binarydata-h-and-cpp-what-are-they-how-to-use-them/2361/1 "2007-11-29T15:24:15Z")

</div>

Hi,  
Trying to edit BinaryData.h, well i did, to replace cello\_wav and cello\_wavSize with two things of my own. but do i have to change something in the .cpp file too?

am i supposed to be generating binary data? how? the .cpp is all numbers of arrays.

and also what does cello\_wavSize’s value represent? size in kb? bytes? bits? length in msec?

-edit-  
what’s the purpose of the BinaryData namespace anyway? will i need it if i were to make a program similar to the demo?

---

<div class="post-metadata">

**Author:** ![haydxn](https://avatars.discourse-cdn.com/v4/letter/h/5fc32e/32.png) [@haydxn](https://forum.juce.com/u/haydxn)\
**Post date:** [November 29, 2007, 3:40pm UTC](https://forum.juce.com/t/binarydata-h-and-cpp-what-are-they-how-to-use-them/2361/2 "2007-11-29T15:40:19Z")

</div>

they’re files created by BinaryBuilder - a juce built tool for converting binary data into source code, allowing you to embed files in your application. The files you want to embed are converted into those arrays; the sizes of the arrays are stored in the size variables. And the namespace is there to keep it all neat.

Just grab it from the juce downloads on the main site. It’s pretty self explanatory (it’s a command line tool though, so you’ll want to try it out using a command line, e.g. Start-\>Run-\>CMD)

---

<div class="post-metadata">

**Author:** ![laserbeak](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/laserbeak/32/1765_2.png) [@laserbeak](https://forum.juce.com/u/laserbeak)\
**Post date:** [November 29, 2007, 4:04pm UTC](https://forum.juce.com/t/binarydata-h-and-cpp-what-are-they-how-to-use-them/2361/3 "2007-11-29T16:04:11Z")

</div>

ahh ok, i was editing the BinaryData.h file by hand and changing all instances of cello\_wav to my file name 😛 thanks 🙂

---

<div class="post-metadata">

**Author:** ![laserbeak](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/laserbeak/32/1765_2.png) [@laserbeak](https://forum.juce.com/u/laserbeak)\
**Post date:** [November 29, 2007, 4:13pm UTC](https://forum.juce.com/t/binarydata-h-and-cpp-what-are-they-how-to-use-them/2361/4 "2007-11-29T16:13:53Z")

</div>

can’t seem to build it, anyone know the linker setting to get rid of this? \_malloc already defined in LIBCMT.lib(malloc.obj)

edit:  
/nodefaultlib:libcmt.lib

---

<div class="post-metadata">

**Author:** ![laserbeak](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/laserbeak/32/1765_2.png) [@laserbeak](https://forum.juce.com/u/laserbeak)\
**Post date:** [November 29, 2007, 5:21pm UTC](https://forum.juce.com/t/binarydata-h-and-cpp-what-are-they-how-to-use-them/2361/5 "2007-11-29T17:21:13Z")

</div>

ahhh cool 🙂 i’ll definately have to remember this gadget!!:twisted:  
thanks!!

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [May 12, 2017, 10:05am UTC](https://forum.juce.com/t/binarydata-h-and-cpp-what-are-they-how-to-use-them/2361/6 "2017-05-12T10:05:43Z")

</div>


