Problem! - Borland C for Windows v3.1 
Author Message
 Problem! - Borland C for Windows v3.1

: I have Borland c/c++ for DOS/WIN ver 3.1. I have written a small program using an output function "cprinf".
: When I compile and run it in the windows version I get the following Linker Warning:
:       "Call to function 'printf' with no prototype"

: However when I do the same using the DOS version and the same source file it works fine, no error wornings.
: I made sure the #include <conio.h> statement is present with my other headers.

: Anyone have any ideas?
: Is it common to find this type of problem with this version?
: Is it better to stick with the dos version?

: Thanks for your input,

: Ron

        Here's your problem Ron.  I too have BC++ 3.1 so I dug up the
header file for <conio.h> and here are the relevant declarations:

#if !defined(_Windows)

[numerous other declarations deleted]

int         _Cdecl cprintf( const char *__format, ... );

[numerous other declarations deleted]

#endif  /* !_Windows */

So, cprintf is only declared if _Windows is NOT declared.  This is
obviously necessary in Windows since cprintf writes directly to video
memory and that might have undesireable effects in the windows environment.

--



Tue, 08 Jul 1997 09:36:17 GMT  
 Problem! - Borland C for Windows v3.1

Quote:


>Subject: Problem! - Borland C for Windows v3.1
>Date: Thu, 19 Jan 95 20:54:23 GMT
>I have Borland c/c++ for DOS/WIN ver 3.1. I have written a small program using
>an output function "cprinf".
>When I compile and run it in the windows version I get the following Linker
>Warning:
>        "Call to function 'printf' with no prototype"
>However when I do the same using the DOS version and the same source file it
>works fine, no error wornings.
>I made sure the #include <conio.h> statement is present with my other headers.
>Anyone have any ideas?
>Is it common to find this type of problem with this version?
>Is it better to stick with the dos version?
>Thanks for your input,
>Ron

In windows you use wsprintf or wvsprintf


Wed, 09 Jul 1997 01:26:59 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Windows programming in Borland C++ v3.0

2. compiler memory problems with Borland C++ v3.1

3. Possible 32-bit problem with Borland C++ v3.1

4. Borland C V3 Linking Problems - Segment _TEXT Exceeds 64K

5. Help: Beginner problem with Novell SDK and Borland C++ v3.1

6. Borland C/C++ v3 problem

7. Borland C++ v3.1 Lan install problem

8. Borland C v3.0 and 640x480x256 video mode

9. NEED LIBRARYS TO BORLAND C++ V3.1

10. Lost - tchelp.tch for Borland C v3.1

11. Borland C++ v3.0 bug?

12. Help with HUGE array...Borland TC DOS v3.0

 

 
Powered by phpBB® Forum Software