Home > Back-end >  Set in the DLL Shared section is not successful?
Set in the DLL Shared section is not successful?

Time:10-07


//# include "targetver. H"
#include
#include
//# include "stdafx. H"
#include
# include "testdll2. H"
#include
#include

//# include & lt; Afx. H>
//using namespace std;
 

///////////////////////////////////////////////////////////////////////////////


//Tell the compiler to put this the initialized variable in its own Shared
//section so it is Shared by all instances of this application. The
The # pragma data_seg (" Shared ")
Volatile LONG g_lApplicationInstances=0;
# pragma data_seg ()

//Tell the would to make the Shared section readable, writable, and Shared.
# pragma comment (would, "/Section: Shared, RWS")


This code is a piece of code on Windows core programming, I directly in the DLL compiler hint warning LNK4039: use/SECTION options specified in the SECTION "Shared" does not exist, but in exe program compiled by, what's the problem?

CodePudding user response:

Strange, to built an empty DLL project, plus the above code, the compiler through
  • Related