dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: Stdout undeclared identifier

  1. #1
    Join Date
    Dec 2017
    Posts
    41

    Stdout undeclared identifier

    I'm trying to compile cpuminer in visual studio 2017 and I'm getting the error:

    error C2065: 'stdout': undeclared identifier

    At line:

    vfprintf(stdout, f, ap);


    I have included the headers:

    #include <stdio.h>
    #include <stdlib.h>

  2. #2
    Join Date
    Nov 2018
    Posts
    10

    Re: Stdout undeclared identifier

    Does your source file end in .c or .cpp?

    It should be .c, if you're writing C code.

  3. #3
    2kaud's Avatar
    2kaud is online now Super Moderator Power Poster
    Join Date
    Dec 2012
    Location
    England
    Posts
    6,677

    Re: Stdout undeclared identifier

    stin, stdout & stderr are defined as part of stdio.h. What header files are included before these? Is the error line the first/only line that references stdout?
    All advice is offered in good faith only. All my code is tested (unless stated explicitly otherwise) with the latest version of Microsoft Visual Studio (using the supported features of the latest standard) and is offered as examples only - not as production quality. I cannot offer advice regarding any other c/c++ compiler/IDE or incompatibilities with VS. You are ultimately responsible for the effects of your programs and the integrity of the machines they run on. Anything I post, code snippets, advice, etc is licensed as Public Domain https://creativecommons.org/publicdomain/zero/1.0/ and can be used without reference or acknowledgement. Also note that I only provide advice and guidance via the forums - and not via private messages!

    C++17 Compiler: Microsoft VS2019 (16.1.0)

  4. #4
    Join Date
    Feb 2017
    Posts
    429

    Re: Stdout undeclared identifier

    Quote Originally Posted by binary2 View Post
    I'm trying to compile cpuminer in visual studio 2017 and I'm getting the error:
    Where did you get the source code to cpuminer?

    https://en.bitcoin.it/wiki/Cpu_Miner

    If it's at Github it's a C program developed on Linux and you will need MinGW to build it on Windows.

    https://github.com/jgarzik/cpuminer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)