2009-07-10 24 views
0

これは本当に奇妙な問題です。ある日、私のプロジェクトはコードを変更していなくても、私がデバッガで起動するたびに再構築を始めました。すなわち、私はビルド - >ビルドソリューション、次にデバッグ - >デバッグを開始すると、デバッグを開始しようとすると再構築されます。VS 2005はファイルを変更せずにプロジェクトを再構築します

ザヘッダ:

#ifdef IPC_USE_DLL 
    #ifdef IPC_EXPORTS 
    #define IPC_API __declspec(dllexport) 
    #else 
    #define IPC_API __declspec(dllimport) 
    #endif 
#else 
    #define IPC_API 
#endif 

#include <windows.h> 
#include <winsock2.h> 
#include <ws2tcpip.h> 
#include <iphlpapi.h> 
#include <stdio.h> 

#include <string> 

namespace Ipc { 

    /** Class provides basic network functionality, connecting, etc. 
    */ 
    class IPC_API NetworkUtilities 
    { 
    public: 
     //! Attempts to connect to the specified port/address. 
     static int connectToServer(const std::string& port, const std::string& address, SOCKET& serverConnection); 
     //! Attempts to initiate a server on the specified port. 
     static int initiateServer(const std::string& port, SOCKET& serverSocket); 
     //! Assuming the passed socket is a valid socket, the function waits the specified amount of time for a connection. 
     /** Returns: NTWK_SUCCESS, NTWK_WSA_ERROR, NTWK_TIMEOUT, NTWK_INVALID_PEER_ADDRESS, NTWK_INVALID_SOCKET. 
     */ 
     static int waitForClient(SOCKET& serverSocket, SOCKET& clientSocket, const std::string address, unsigned timeOut = 0); 
    }; 

    //! Various error codes 
    IPC_API enum { 

    }; 
} 

CPP:

#include "StdAfx.h" 
#include "NetworkUtilities.h" 

namespace Ipc { 

// Implementation of functions from header 
// ... 

} 

これはDLLであることが示されている再コンパイル特定ファイル(ソースコード、単に関数定義を省略します)。誰もがこれがいつも再構築する必要がある理由を教えてもらえますか?デバッグ中は非常に刺激的です。

ありがとうございました

答えて

3

タイムスタンプの問題が考えられます。あなたはファイルの時間をチェックして、それらの修正された日付が将来ある時点にあるかどうか確認できますか?

+0

ありがとうございます!私は問題は私が2台のコンピュータで開発していると思うし、おそらく時間が間違っている、それは間違いなく問題だからだ。 – DeusAduro

関連する問題