//#include "targetver.h"
#include <SDKDDKVer.h>
#include <stdio.h>
//#include "stdafx.h"
#include <windows.h>
#include "testdll2.h"
#include <iostream>
#include <tchar.h>
//#include <afx.h>
//using namespace std;
///////////////////////////////////////////////////////////////////////////////
// Tell the compiler to put this initialized variable in its own Shared
// section so it is shared by all instances of this application.
#pragma data_seg("Shared")
volatile LONG g_lApplicationInstances = 0;
#pragma data_seg()
// Tell the linker to make the Shared section readable, writable, and shared.
#pragma comment(linker, "/Section:Shared,RWS")
這個代碼是windows核心編程上的一段代碼,我直接放在DLL中編譯提示 warning LNK4039: 用 /SECTION 選項指定的節“Shared”不存在,但是在exe專案中編譯可以通過,問題出在哪呢?
uj5u.com熱心網友回復:
奇怪了,重新建了個空DLL工程,加上上面的代碼,編譯通過了轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/118576.html
標籤:基礎類
上一篇:Python實作楊輝三角演算法
下一篇:C語言中的檔案輸出問題
