Skip to main content
gamedev.net
🔒 Locked

Embedding data into executable

Started by wforl 0 replies 500+ views
Original Post
wforl
wforl
Under Visual Studio 2008, how do I creat a library file which embeds data (text data) that other projects can use? Basically, I want to embed into the library file a number of text files, which projects using the library can then open and read. Making it easier to distribute the .lib without having to also distribute the text files.

As a test, I created a library project, and added a text file as a resource (6Mb so I could easily see if things were working by the output file size). Building this produces a library file of around 6Mb, so I know that works. But when I add this library file to another project as an additional dependency, the output executible is only 40Kb, so it doesnt seem to be embedding the data. I figure this is due to the linking stage only taking from the lib what it needs. So how do I go about forcing the data to be embeded?

Or maybe there is a better way?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.