Using GCC and C++11 on both Windows and Debian for armhf.
I need to check the version string of an executable to see if my app have to update itself.
My "Version string" is made in this way:
#define VersionFileCap "-[+@+]-"
const char VersioneFile[] = { VersionFileCap MYAPP_VERSION "," __DATE__ VersionFileCap };
and i can see it in the compiled binary.
My plan is to search for the VersionFileCaps and then manage the found string. To do this I'm about to use the code in the answer to this question but it loads the whole file in memory, and this is worrying me as my executable can easily become more than 50MB.
So i wonder if there's a way to make the string be compiled at the beginning of the binary, so i could just load part of the file and find it faster.
Is it possible by just using some preprocessing/compiler magic parameters?