Hey guys,
Never considered this before (never needed to, really), but does adding project resources end up causing the VS/VC++ compiler/linker to slip in any Windows specific code to the executable? I know certain things definitely will, like Win32 components. I'm, on the other hand, talking about string tables/lists, files, etc. I compiled a console app that I added a resource file and one bitmap to, and skimmed through it in PE Browser to see if anything caught my eye. Didn't really notice anything other than some XML/manifest which I can remove (if needed). Just curious what the implications of using the project resources/tools will be. Anyone know if this can cause problems on other platforms?
C/C++ program resources & VC++...
C/C++ program resources & VC++...
There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. - Jeremy S. Anderson
Re: C/C++ program resources & VC++...
Hello,
It does not. It just includes the resource as one would expect.
It does not. It just includes the resource as one would expect.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
Re: C/C++ program resources & VC++...
Oooh! Great! Thanks!
Nice to know. I was worried I might go do a bunch of stuff and later get the unpleasant surprise of some Windows API-related code getting linked in behind the scenes. Had stuff like that happen to me before, and it's always a pain. Sometimes I think the absolute worst "bugs" aren't even in your code; they're the problems with files/directories, linkers and compiler switches. Can't stand those "WTF moments" where nothing is apparently wrong, then you find out 2 hours later you forgot to check some "magic" box.
Nice to know. I was worried I might go do a bunch of stuff and later get the unpleasant surprise of some Windows API-related code getting linked in behind the scenes. Had stuff like that happen to me before, and it's always a pain. Sometimes I think the absolute worst "bugs" aren't even in your code; they're the problems with files/directories, linkers and compiler switches. Can't stand those "WTF moments" where nothing is apparently wrong, then you find out 2 hours later you forgot to check some "magic" box.
There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. - Jeremy S. Anderson
Re: C/C++ program resources & VC++...
Keep your files under version control. They can't change without you noticing (and approving), that way. (Among several other advantages.)
Every good solution is obvious once you've found it.
Re: C/C++ program resources & VC++...
Yup! Problem is, sometimes you want those changes because you think you're doing it correctly or you don't set things up correctly in the first place. Version control is a great tool, but can't save you from yourself! The programmer is often his own worst enemy and biggest bug producer, though it's always more convenient to blame these dumb computers!
There are two major products that come out of Berkeley: LSD and UNIX. We don't believe this to be a coincidence. - Jeremy S. Anderson