
Visual C++ 6.0 bug on Windows 2000?
Hi folks,
I was trying to compile the following program using Visual C++ 6.0 with
service pack # 3 (or whatever it's called) on Windows 2000 Professional
(release candidate) and got the following warning from the linker:
warning LNK4039: section "MY_DATA" specified with /SECTION option does
not exist
Program:
#include <windows.h>
#pragma data_seg("MYDATA" )
static HINSTANCE g_hInstance;
#pragma data_seg()
#pragma comment(linker, "/SECTION:MY_DATA,rws")
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,
LPSTR lpszCommandLine,int nCmdShow)
{
return(0);
Quote:
}
It really doesn't get simpler than that, and the most surprising part
is that the program compiles on a friend's Win95 machine w/o problems
(!!!). Unfortunately, I don't have a dual boot machine to see if it
works on Win95 and not on Windows 2000 on the same machine, and was
wondering if any of you have run into this problem before. Using
the "/section:MY_DATA,rws" linker switch produces the same results.
Running dumpbin / summary on the binary reveals that the MY_DATA
segment was not generated as expected.
Note that I tried compiling the program as a DLL w/ the same results...
Atul
Sent via Deja.com http://www.*-*-*.com/
Before you buy.