代码之家  ›  专栏  ›  技术社区  ›  DeusAduro

VS2005在不更改任何文件的情况下重建项目

  •  0
  • DeusAduro  · 技术社区  · 16 年前

    标题:

    #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 {
    
        };
    }
    

    #include "StdAfx.h"
    #include "NetworkUtilities.h"
    
    namespace Ipc {
    
    // Implementation of functions from header
    // ...
    
    }
    

    这是一个动态链接库。有人能告诉我为什么这需要不断地重建吗?调试时很烦人。

    谢谢

    1 回复  |  直到 16 年前
        1
  •  3
  •   JaredPar    16 年前

    一种可能是发行时间戳。你能检查一下文件上的时间,看看它们的修改日期是否在将来的某个时候吗?