zoukankan      html  css  js  c++  java
  • VS2010 常用功能代码段

    1.VS编译生成事件时复制文件

    1 xcopy $(TargetPath)$(SolutionDir)SDK\Debug\ /y
    2 xcopy $(TargetDir)$(TargetName).lib $(SolutionDir)SDK\Debug\ /y
    3 xcopy $(ProjectDir)DetectorSDK.h $(SolutionDir)SDK\ /y

    2.导出DLL头文件与CPP文件

    //dll_test.h
    #ifndef _DLL_TEST_INCLUDE_
    #define _DLL_TEST_INCLUDE_
    
    #ifndef TEST_SDK_API
    #define TEST_SDK_API extern "C" __declspec(dllimport) 
    #endif
    
    TEST_SDK_API int __stdcall add(int x, int y);
    
    #endif
    
    /*---------------------------------------*/
    //dll_test.cpp
    #define TEST_SDK_API extern "C" __declspec(dllexport)
    #include "dll_test.h"
    
    int __stdcall add(int x, int y)
    {
        return x+y;
    }

     定义def文件dll_test.def

    LIBRARY
    EXPORTS
    add @1

     2013年1月17日 在MFC调用DLL误告警问题:这个问题是由于DLL中定义了全局对象类,解决这个问题的办法是全局对象均以指针方式,则MFC就不出现内存泄漏告警了。

  • 相关阅读:
    MFC单文档中进行plc点云显示
    modbus发送和接收
    测试左移和测试右移
    2021软件测试笔试题
    202106月份总结测试开发面试题
    KuaiShou面试题
    阿拉伯数学手写体。
    GeminiScrollbar
    vue-core-video-player
    webpack
  • 原文地址:https://www.cnblogs.com/qiantz/p/2642003.html
Copyright © 2011-2022 走看看