Visual C++ 6.0 bug on Windows 2000? 
Author Message
 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.



Sat, 29 Jun 2002 03:00:00 GMT  
 Visual C++ 6.0 bug on Windows 2000?
MYDATA or MY_DATA.  Make up your mind :)
--
Mickey Williams
Author - Programming Microsoft Windows 2000 Unleashed

[...]

Quote:
> #pragma data_seg("MYDATA" )
[...]
> #pragma comment(linker, "/SECTION:MY_DATA,rws")



Sat, 29 Jun 2002 03:00:00 GMT  
 Visual C++ 6.0 bug on Windows 2000?


Quote:
> MYDATA or MY_DATA.  Make up your mind :)
> --
> Mickey Williams
> Author - Programming Microsoft Windows 2000 Unleashed

Typo -- I used MY_DATA in both places...

Atul


Quote:
> [...]
> > #pragma data_seg("MYDATA" )
> [...]
> > #pragma comment(linker, "/SECTION:MY_DATA,rws")

Sent via Deja.com http://www.deja.com/
Before you buy.


Sun, 30 Jun 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Visual C++ 6.0 attach to process debugger in Windows 2000

2. Visual C++ 6.0 on Windows 2000

3. Visual C++ 6.0 @ Windows 2000

4. Visual C++ Runtime error in Windows XP, but not in Windows 2000

5. Access 2000 and Visual C++ 6.0

6. How to access OutLook 2000 Contacts using Visual C/C++ 6.0

7. How to access OutLook 2000 Contacts using Visual C/C++ 6.0

8. Install of vc c++ 6.0 fails under Windows 2000 sp3

9. BUG REPORT (03 03 2000) in Visual C++ 6 (sp3) : Custom Build Step

10. Visual C++ Combo boxes & Windows 2000

11. Visual C++ Combo boxes & Windows 2000

12. Visual C++ Combo boxes & Windows 2000

 

 
Powered by phpBB® Forum Software