C/C++ program resources & VC++...

Programming, for all ages and all languages.
Post Reply
ATC
Member
Member
Posts: 45
Joined: Sun Jan 24, 2010 9:27 am

C/C++ program resources & VC++...

Post by ATC »

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?
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
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: C/C++ program resources & VC++...

Post by neon »

Hello,

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();}
ATC
Member
Member
Posts: 45
Joined: Sun Jan 24, 2010 9:27 am

Re: C/C++ program resources & VC++...

Post by ATC »

Oooh! Great! :D 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. :lol:
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
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: C/C++ program resources & VC++...

Post by Solar »

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.
ATC
Member
Member
Posts: 45
Joined: Sun Jan 24, 2010 9:27 am

Re: C/C++ program resources & VC++...

Post by ATC »

Yup! :wink: 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! :lol: The programmer is often his own worst enemy and biggest bug producer, though it's always more convenient to blame these dumb computers! :wink:
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
Post Reply