c++ - VS 2005 在不更改任何文件的情况下重建项目

标签 c++ windows visual-studio visual-studio-2005

这是一个非常奇怪的问题。有一天,每次我在调试器中启动我的项目时,它都会开始重建,即使我没有更改代码。 IE。我会去 Build->Build Solution,然后 Debug->Start Debugging,当我尝试开始调试时它会重建。显示了它重新编译的具体文件(省略了源代码,只是函数定义):

标题:

#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
// ...

}

这是一个 DLL。谁能告诉我为什么这需要不断重建?调试的时候很烦人。

谢谢

最佳答案

一种可能性是时间戳问题。你能检查一下文件上的时间,看看它们的修改日期是否在未来的某个时间点吗?

关于c++ - VS 2005 在不更改任何文件的情况下重建项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1112126/

相关文章:

Github for Windows 忽略 .gitignore Visual Studio

c++ - 为什么没有删除事件的功能?

c++ - cdb/windbg 是否具有与 autoexp.dat 等效的功能?

C++ Visual Studio 编译错误

windows - 在批处理脚本中生成带有时间戳的唯一文件名

java - 在默认浏览器中打开异常

windows - 我需要 Go 语言运行时来运行已编译的 Go 应用程序吗?

c# - VS2022配置Azure keyvault看不到本地secrets.json

c++ - 用 C++ 中的文件指针替换 stdout 和 stdin?

c++ - clang 3.5 : Detecting a gobal function doesn't exist using SFINAE