Jump to content
  • Advertisement
Sign in to follow this  
Habba

Error C2065: "undeclared identifier"

This topic is 4851 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

this line of code gives me the error: AddFontResourceEx("FLATBN__.TTF",FR_PRIVATE,0); And here's the description of the error: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/c2065.asp As I undestand it the problem is that my compiler (Visual C++ 6) can't find declarition for that function. It's declared in wingdi.h, which is included in windows.h. I included windows.h and added gdi32.lib to my linking list. It's not working. Got any ideas?

Share this post


Link to post
Share on other sites
Advertisement
Have a look at this: Using the Windows Headers. This should help you solving the problem, since this function is only defined starting with Windows 2000, according to the Platform SDK documentation.

Edit: Don't have the VC 6 headers by hand, but you may need the latest headers that are included in the Platform SDK. You serach in WinGDI.h for AddFontResourceEx and you should see if it is defined at all (guarded by #if (_WIN32_WINNT >= 0x0500)).

Share this post


Link to post
Share on other sites
Quote:
Original post by Sparhawk42
Where is FR_PRIVATE declared?
Are they declared in some namespace?


FR_PRIVATE is also declared in wingdi.h, right next to the function. Both of them gives me the error.

Share this post


Link to post
Share on other sites
Have you tried to define _WIN32_WINNT to be 0x0500 either in stdafx.h (if you use precompiled headers), before including the very first header or in the compiler settings tab?

Share this post


Link to post
Share on other sites
Quote:
Original post by VolkerG
Have you tried to define _WIN32_WINNT to be 0x0500?


I tried that couple of times and finally it worked. This was the source of problems. Thank you both very much for your troubles.

Although I've programmed new for several years, I'm still quite a beginner with C++. It's so... complicated, compared to Visual Basic, Java, PERL, javascript...

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!