Inquiry Regarding std::ifstream Compatibility in Steinberg VST SDK

Hello VST Community,

I hope this message finds you well. I am currently working on a VST plugin using the Steinberg VST SDK, and I have encountered an issue with using std::ifstream to read binary files within the SDK environment.

Here’s a snippet of the code in question:

std::string get_file_contents(const char* filename)

	std::ifstream in(filename, std::ios::binary);

	if (in)
		std::string contents;
		in.seekg(0, std::ios::end);
		in.seekg(0, std::ios::beg);[0], contents.size());


It appears that std::ifstream might not be working as expected in the context of the VST SDK. I would appreciate any insights or recommendations from the community on alternative methods or best practices for loading and reading binary files in the Steinberg VST SDK environment.

Thank you in advance for your assistance!

Did you check the example implementation in the VST 3 SDK?

1 Like