Jump to content
  • Advertisement
Sign in to follow this  
Tom_h-h

resources in code

This topic is 4305 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey, i have been coding for a while now in c++, and love every minute of it, how precise and intricate it is, and how much freedom it affords. I am using visual studio 2005 which is awesome, but i continue to have problems with my resources. I keep getting compile errors because the resources such as bitmaps and icon files do not relate or something. i know VS generates it's own resource header file, but should I create my own, and where should i store the resources in the folder, where the program then has to access them. Sorry is this is quite a difficult problem to answer but if anyone has any advice or tips, or has had the same problem, i would be extremely greatful for help!......as i have kind of hit a brick wall and don't know what to do. Thanks very much!! Tom h h

Share this post


Link to post
Share on other sites
Advertisement
Are you using the express edition or the other edition such as standard? The reason I ask is because of this.

Go ahead and list some of the errors since it may be just syntax, IDs, or a missing header file.

The path that you specify within the resource file will point to where your resources are located.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Hi, no i am not using the express edition, i have the full version.

I have a header file that defines the resources such as

#define IDB_BITMAP1 1001

and the compile error goes something like

Bitmap.obj : error LNK2019: unresolved external symbol __imp__TransparentBlt@44 referenced in function "public: void __thiscall Bitmap::Draw(struct HDC__ *,int,int,int,unsigned long)" (?Draw@Bitmap@@QAEXPAUHDC__@@HHHK@Z)

fatal error LNK1120: 1 unresolved externals

I think it might be something to do with naming them, and whether somewhere in the code it does not link corresctly, i'm sorry if this doesn't help, but i can try and post some more code if that would help

Share this post


Link to post
Share on other sites
ok sweet, so erm how exactly do i make sure i link against msimg32.lib.

sorry if this is an irritation, but thanks so much for helping!!

Share this post


Link to post
Share on other sites
Go to your project settings, under linker/input and add it to the "Additional Dependencies" line.

Share this post


Link to post
Share on other sites
AWESOME!! THANKYOU SOOOOO MUCH!! IT WORKS!!

LOL Still a bit broken in places, but man thankyou so so so much!!

it is sooo kool, i love coding!!

Thankyou so much!!

I'll probably be back when it breaks again, but thats so much!

Take it easy!
Tom

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!