Jump to content
  • Advertisement
Sign in to follow this  
Fishcake

stderr problem

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

hi, im quite new to this c++ game programming. started out last year and im using allegro. im trying to learn how to make tile based game using allegro and found this website : http://www.ccpssolutions.com/agps/agps_p2.html so i tried to compile the source code, but it returned an error : 'stderr' undeclared (first use this function) im not really good at c++ programming so i don't understand what it means, so can anybody help? the "Part I" of the tutorial is working fine.

Share this post


Link to post
Share on other sites
Advertisement
I'm not familiar with allegro but undeclared message as it say, means that linker cannot find definition of command stderr.
stderr is added via #include <stdio.h> at top of the document [smile]

Share this post


Link to post
Share on other sites
Quote:
Original post by streamer
I'm not familiar with allegro but undeclared message as it say, means that linker cannot find definition of command stderr.
stderr is added via #include <stdio.h> at top of the document [smile]


For C++, the correct header is "#include <cstdio>". Note the absence of a ".h" file type suffix.

However, you could also #include <iostream> (again no ".h") and use std::cerr instead.

Share this post


Link to post
Share on other sites
hey, thanks a lot! that problem is gone now, but there's a few more errors :

- 'text_mode' is deprecated
- 'textprintf' is deprecated

anyway the code compiled. just asking what the error means.

Share this post


Link to post
Share on other sites
Quote:
Original post by Fishcake
hey, thanks a lot! that problem is gone now, but there's a few more errors :

- 'text_mode' is deprecated
- 'textprintf' is deprecated

anyway the code compiled. just asking what the error means.


Deprecation is a common feature of software APIs.

When older versions are replaced by newer ones, sometimes new ways of doing things are used. The older ones are then marked "deprecated", which means they are only included for compatibility with old code, and these features should not be depended on when writing new code. Deprecation often, but not always, implies that the old functions, etc will be removed completely at some point in the future when the API developers believe that most code has been "ported" to the newer way of doing things.

However, dues to peoples not unreasonable desire to keep backwards compatibility for long periods of time (for example OS programs that still work under windows XP) these features may never be truly removed.

It would be best to research your API documentation, most sane developers will mention what is the preferred replacements when they deprecate something.

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!