0

I have created a c++ program in Visual Studio 2015 that reads in external CSV files, works on them, then produces an output. I know that in the release folder of the output directory that an .exe file is created, however the .exe will not work correctly without being placed in the same folder as the 3 external CSV files.

Is there a way that I can package the CSV files into the .exe file, so I can have a standalone executable file.

Thanks in advance

5
  • Not sure if this will solve your problem, so posting it as comment, but maybe have a look into resource files: msdn.microsoft.com/de-de/library/7zxb70x7.aspx Commented Jan 29, 2016 at 9:36
  • You can embed your resource files into your executable (if you wish so) and then extract them using FindResource() and LoadResource(). Or, for this and other similar issues ,simply use PathCombine() (of course if you know where those CSV are). Commented Jan 29, 2016 at 9:45
  • Is there a tutorial for this @AdrianoRepetti? I'm in the process of trying to create a resource file, however csv doesn't seem to be a type allowed by visual studio @LiMuBei Commented Jan 29, 2016 at 9:49
  • 1
    Full example (both for embedding and reading): stackoverflow.com/a/2933357/1207195 Commented Jan 29, 2016 at 9:51
  • You may also do like this: stackoverflow.com/questions/57520427/… Commented Nov 1, 2019 at 10:20

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.