Menu

Please help

jim
2005-07-04
2012-09-26
  • jim

    jim - 2005-07-04

    I get this error when I try to compile my dll. C:\Dev-Cpp\Makefile.win [Build Error] No rule to make target "../Documents', needed byProject1.dll'. Stop. This is a dll I got off of a website that compiles in other compilers with no problem could you be so kind to tell me what is wrong?
    /
    Filename : whuser.cpp
    Author(s) : winholdem development
    Date : 2004-JUN-25
    Copyright : (c) 2004 HixoxiH Software
    History :
    /

    define WHUSER_EXPORTS

    include "stdafx.h"

    include "whuser.h"

    include <windows.h>

    /////////////////////////////////////
    //card macros

    define RANK(c) ((c>>4)&0x0f)

    define SUIT(c) ((c>>0)&0x0f)

    define ISCARDBACK(c) (c==0xff)

    define ISUNKNOWN(c) (c==0)

    /////////////////////////////////////

    ////////////////////////////////////
    //consecutive states
    holdem_state m_holdem_state[256];
    unsigned char m_ndx;
    ////////////////////////////////////

    pfgws_t m_pget_winholdem_symbol;

    double process_query( const char* pquery )
    {
    if (pquery==NULL)
    return 0;

    //////////////////////////////////////
    //test symbols dll$test0 - dll$test9//
    //////////////////////////////////////
    if (strncmp(pquery,&quot;dll$test&quot;,8)==0)
        return (pquery[8]-'0');
    
    //dll$alli logic here
    //dll$rais logic here
    //dll$call logic here
    //dll$play logic here
    
    return 0;
    

    }

    double process_state( holdem_state pstate )
    {
    if (pstate!=NULL)
    m_holdem_state[ (++m_ndx)&0xff ] =
    pstate;

    return 0;
    

    }

    /////////////////////////////////////////////////////
    //WINHOLDEM RUNTIME ENTRY POINT
    /////////////////////////////////////////////////////
    WHUSER_API double process_message
    (
    const char pmessage, //type
    const void
    param //data
    )
    {
    if (pmessage==NULL)
    {
    return 0;
    }

    if (param==NULL)
    {
        return 0;
    }
    
    if (strcmp(pmessage,&quot;state&quot;)==0)
    {
        return process_state( (holdem_state*)param );
    }
    
    if (strcmp(pmessage,&quot;query&quot;)==0)
    {
        return process_query( (const char*)param );
    }
    
    if (strcmp(pmessage,&quot;pfgws&quot;)==0)
    {   
        m_pget_winholdem_symbol = (pfgws_t)param;
        return 0;
    }
    
    return 0;
    

    }
    /////////////////////////////////////////////////////

    /////////////////////////////////
    //DLLMAIN
    /////////////////////////////////
    BOOL APIENTRY DllMain
    (
    HANDLE hModule ,
    DWORD ul_reason_for_call ,
    LPVOID lpReserved
    )
    {
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
    case DLL_THREAD_ATTACH:
    case DLL_THREAD_DETACH:
    case DLL_PROCESS_DETACH:
    break;
    }
    return TRUE;
    }
    /////////////////////////////////

    /
    Filename : whuser.h
    Author(s) : winholdem development
    Date : 2004-JUN-25
    Copyright : (c) 2004 HixoxiH Software
    History :
    /

    ifndef whuser_h

    define whuser_h

    ifdef WHUSER_EXPORTS

    define WHUSER_API __declspec(dllexport)

    else

    define WHUSER_API __declspec(dllimport)

    endif

    struct holdem_player
    {
    char m_name[16] ; //player name if known
    double m_balance ; //player balance
    double m_currentbet ; //player current bet
    unsigned char m_cards[2] ; //player cards

    unsigned char   m_name_known    : 1 ;   //0=no 1=yes
    unsigned char   m_balance_known : 1 ;   //0=no 1=yes
    unsigned char   m_fillerbits    : 6 ;   //filler bits
    unsigned char   m_fillerbyte        ;   //filler bytes
    

    };

    struct holdem_state
    {
    char m_title[64] ; //table title
    double m_pot[10] ; //total in each pot

    unsigned char   m_cards[5]          ;   //common cards
    
    unsigned char   m_is_playing    : 1 ;   //0=sitting-out, 1=sitting-in
    unsigned char   m_is_posting    : 1 ;   //0=autopost-off, 1=autopost-on
    unsigned char   m_fillerbits    : 6 ;   //filler bits
    
    unsigned char   m_fillerbyte        ;   //filler byte
    unsigned char   m_dealer_chair      ;   //0-9
    
    holdem_player   m_player[10]        ;   //player records
    

    };

    typedef double (process_message_t)(const char message, const void* param );

    WHUSER_API double process_message( const char message, const void param );

    typedef double (pfgws_t)( int c, const char psym, bool& iserr );

    endif

     
    • Wayne Keen

      Wayne Keen - 2005-07-05

      Could you post the other two elements of the basic 3 please? (Covered in the FAQ thread in this forum)

      Wayne

       
    • jim

      jim - 2005-07-05

      Ther other two elements? These are complete files.

       
    • Wayne Keen

      Wayne Keen - 2005-07-05

      The other two elements of the "basic 3", which I stated in my previous post are discussed in the FAQ thread in this forum. (The very first section).

      Did you check out the FAQ thread before you posted your question?

      Wayne

       
    • jim

      jim - 2005-07-05

      Wow you obviously don't know the answer to my question,. I poster the error, and the complete files. If you can find the answer, in the post you referred to, I will happily eat my words because it's just not there.

       
    • Wayne Keen

      Wayne Keen - 2005-07-06

      OK, here is the basic 3

      (1) The exact version of Dev you are using. You did NOT post that. Some features of the compiler are version specific, so I need to know that.

      (2) An example program - you did post that.

      (3) You full compile log. That tells me what and how you linked things etc.

      Wayne

       
    • jim

      jim - 2005-07-06

      Wayne, I'm sorry I didn't understand what the basic three meant.Also, as I read that, I realized that my title of the thread was bad too. I am using version 4.9.9.2 with windows xp. My complete file log is this.Compiler: Default compiler
      Building Makefile: "C:\Dev-Cpp\Makefile.win"
      Executing make...
      make.exe -f "C:\Dev-Cpp\Makefile.win" all
      make.exe: *** No rule to make target &quot;../Documents', needed byProject1.dll'. Stop.

      Execution terminated

       
      • Wayne Keen

        Wayne Keen - 2005-07-06

        OK, cool.

        Now, is some of your code stored in a place like "My Documents"? It looks like you are getting something messed up in the parsing.

        Directories with spaces in their path, like "My Documents" can sometimes mess up the works.

        Wayne

         
        • Wayne Keen

          Wayne Keen - 2005-07-06

          I am not far from taking my cold to bed, so if I don't respond it is not neccessarly because I am too stupid to do so, however, that possibility can NEVER be ruled out. ;)

          Wayne

           
    • jim

      jim - 2005-07-06

      I got it compied Wayne.Thanks for your help. The only thing I did differently was I put the files in the dev-cpp folder.

       
      • Wayne Keen

        Wayne Keen - 2005-07-06

        SUPER! Very good work!

        Wayne

         

Log in to post a comment.