c++.mfc - Compile error with MFC and 8.12
- Bruce Adelsman <badelsman BOGUSwavefront.com> May 08 2001
- Jan Knepper <jan smartsoft.cc> May 08 2001
- Bruce Adelsman <badelsman BOGUSwavefront.com> May 08 2001
- "Walter" <walter digitalmars.com> May 08 2001
- Bruce Adelsman <badelsman BOGUSwavefront.com> May 08 2001
- "Walter" <walter digitalmars.com> May 08 2001
- Bruce Adelsman <badelsman BOGUSwavefront.com> May 08 2001
- Jan Knepper <jan smartsoft.cc> May 08 2001
- "Walter" <walter digitalmars.com> May 08 2001
- Jan Knepper <jan smartsoft.cc> May 08 2001
- Bruce Adelsman <badelsman BOGUSwavefront.com> May 09 2001
- Jan Knepper <jan smartsoft.cc> May 08 2001
Guys, I fresh installed Symantec 7.5 yesterday and compiled a test project of mine. It compiled and run just fine. I downloaded the 8.12 drop-in and installed it today. Now when I try to recompile the project, I get this error: sc -cpp -Ae -mn -C -o+space -WA -S -3 -a8 -c -H -HO- -D_X86_=1 -D_MT=1 -HF.\stdafx.SYM -o.\stdafx.PCO stdafx.h Error: C:\SC\BIN\..\mfc\include\32-bit\afxv_w32.h(202): initializer or function body for dllimport not allowed Lines Processed: 113815 Errors: 1 Warnings: 0 Build failed Any ideas? -Bruce
May 08 2001
Bruce, This is correct! (You must be a serious MFC user!) Walter has a patch for this problem. Don't worry, be Kneppie! Jan Bruce Adelsman wrote:Guys, I fresh installed Symantec 7.5 yesterday and compiled a test project of mine. It compiled and run just fine. I downloaded the 8.12 drop-in and installed it today. Now when I try to recompile the project, I get this error: sc -cpp -Ae -mn -C -o+space -WA -S -3 -a8 -c -H -HO- -D_X86_=1 -D_MT=1 -HF.\stdafx.SYM -o.\stdafx.PCO stdafx.h Error: C:\SC\BIN\..\mfc\include\32-bit\afxv_w32.h(202): initializer or function body for dllimport not allowed Lines Processed: 113815 Errors: 1 Warnings: 0 Build failed Any ideas? -Bruce
May 08 2001
Jan, Thanks for the quick update. I checked the web site but didn't see any info on an MFC patch. I'll watch for a note from Walter. Thanks, -Bruce P.S. Serious MFC user? Nah, just coming back to an old project after a 2+ year hiatus. Jan Knepper wrote:Bruce, This is correct! (You must be a serious MFC user!) Walter has a patch for this problem. Don't worry, be Kneppie! Jan Bruce Adelsman wrote:Guys, I fresh installed Symantec 7.5 yesterday and compiled a test project of mine. It compiled and run just fine. I downloaded the 8.12 drop-in and installed it today. Now when I try to recompile the project, I get this error: sc -cpp -Ae -mn -C -o+space -WA -S -3 -a8 -c -H -HO- -D_X86_=1 -D_MT=1 -HF.\stdafx.SYM -o.\stdafx.PCO stdafx.h Error: C:\SC\BIN\..\mfc\include\32-bit\afxv_w32.h(202): initializer or function body for dllimport not allowed Lines Processed: 113815 Errors: 1 Warnings: 0 Build failed Any ideas? -Bruce
May 08 2001
Ok, 8.15 is up there now. -Walter Bruce Adelsman wrote in message <3AF839EC.F793B08F BOGUSwavefront.com>...Jan, Thanks for the quick update. I checked the web site but didn't see any
on an MFC patch. I'll watch for a note from Walter. Thanks, -Bruce P.S. Serious MFC user? Nah, just coming back to an old project after a 2+ year hiatus. Jan Knepper wrote:Bruce, This is correct! (You must be a serious MFC user!) Walter has a patch for this problem. Don't worry, be Kneppie! Jan Bruce Adelsman wrote:Guys, I fresh installed Symantec 7.5 yesterday and compiled a test project of mine. It compiled and run just fine. I downloaded the 8.12 drop-in and installed it today. Now when I try
recompile the project, I get this error: sc -cpp -Ae -mn -C -o+space -WA -S -3 -a8 -c -H -HO- -D_X86_=1 -D_MT=1 -HF.\stdafx.SYM -o.\stdafx.PCO stdafx.h Error: C:\SC\BIN\..\mfc\include\32-bit\afxv_w32.h(202): initializer or function body for dllimport not allowed Lines Processed: 113815 Errors: 1 Warnings: 0 Build failed Any ideas? -Bruce
May 08 2001
Walter wrote:Ok, 8.15 is up there now. -Walter
Walter, Hmm, looks like you only upgraded the full package. I was using the Symantec drop-in support, which appears to still be the 8.12 package. I browsed the ftp server and found dm815x.zip? I rolled the dice and downloaded that and replaced the sccpn.exe and sdx.lib files from the 8.12 drop-in. No luck though, same error. Any chance you can make an 8.15 drop-in package? Or tell me the files to copy over from the dm815c.zip package? Thanks! -Bruce
May 08 2001
The scppn.exe 8.1b5 is what I would put in a Symantec drop-in package. Try running: scppn and see if it says 8.1b5, because Jan ran into the same problem you did and 8.1b5 fixed it. -Walter Bruce Adelsman wrote in message <3AF86760.A04DACF9 BOGUSwavefront.com>...Walter wrote:Ok, 8.15 is up there now. -Walter
Walter, Hmm, looks like you only upgraded the full package. I was using the
drop-in support, which appears to still be the 8.12 package. I browsed the ftp server and found dm815x.zip? I rolled the dice and
that and replaced the sccpn.exe and sdx.lib files from the 8.12 drop-in.
luck though, same error. Any chance you can make an 8.15 drop-in package? Or tell me the files to
over from the dm815c.zip package? Thanks! -Bruce
May 08 2001
Walter, Here's what I get from an MS-DOS prompt..... C:\WINDOWS>scppn Digital Mars C/C++ Compiler Version 8.1B5n Copyright (C) Digital Mars 2000-2001. All Rights Reserved. Written by Walter Bright www.digitalmars.com C:\WINDOWS>sc Digital Mars Compiler Version 8.0B1n Copyright (C) Digital Mars 2000-2001. All Rights Reserved. Written by Walter Bright www.digitalmars.com SC is a one-step program to compile and link C++, C and ASM files. Usage ([] means optional, ... means zero or more): SC file... [flags...] [ respfile] The failure again... sc -cpp -Ae -mn -C -o+space -WA -S -3 -a8 -c -H -HO- -D_X86_=1 -D_MT=1 -HF.\stdafx.SYM -o.\stdafx.PCO stdafx.h Error: C:\SC\BIN\..\mfc\include\32-bit\afxv_w32.h(202): initializer or function body for dllimport not allowed Lines Processed: 113815 Errors: 1 Warnings: 0 Build failed And here is the section of the header file is is complaining about.... #ifndef _MAC // FreeResource is not required except on Mac platforms #undef FreeResource inline BOOL WINAPI FreeResource(HGLOBAL) { return TRUE; } // UnlockResource is not required except on Mac platforms #undef UnlockResource inline int WINAPI UnlockResource(HGLOBAL) { return 0; } #endif The 'inline BOOL WINAPI ...' statement is line 202. Note that I am using the mfc include files that came with Symantec 7.5, is there some known issue with those? Is 'sc' not invoking 'scppn' under the covers? Thanks, -Bruce Walter wrote:The scppn.exe 8.1b5 is what I would put in a Symantec drop-in package. Try running: scppn and see if it says 8.1b5, because Jan ran into the same problem you did and 8.1b5 fixed it. -Walter
May 08 2001
This is weird! The version I use says the exact same thing, but compiles MFC 4.21 just fine. Which version of MFC are you using by the way??? Jan Bruce Adelsman wrote:Walter, Here's what I get from an MS-DOS prompt..... C:\WINDOWS>scppn Digital Mars C/C++ Compiler Version 8.1B5n Copyright (C) Digital Mars 2000-2001. All Rights Reserved. Written by Walter Bright www.digitalmars.com C:\WINDOWS>sc Digital Mars Compiler Version 8.0B1n Copyright (C) Digital Mars 2000-2001. All Rights Reserved. Written by Walter Bright www.digitalmars.com SC is a one-step program to compile and link C++, C and ASM files. Usage ([] means optional, ... means zero or more): SC file... [flags...] [ respfile] The failure again... sc -cpp -Ae -mn -C -o+space -WA -S -3 -a8 -c -H -HO- -D_X86_=1 -D_MT=1 -HF.\stdafx.SYM -o.\stdafx.PCO stdafx.h Error: C:\SC\BIN\..\mfc\include\32-bit\afxv_w32.h(202): initializer or function body for dllimport not allowed Lines Processed: 113815 Errors: 1 Warnings: 0 Build failed And here is the section of the header file is is complaining about.... #ifndef _MAC // FreeResource is not required except on Mac platforms #undef FreeResource inline BOOL WINAPI FreeResource(HGLOBAL) { return TRUE; } // UnlockResource is not required except on Mac platforms #undef UnlockResource inline int WINAPI UnlockResource(HGLOBAL) { return 0; } #endif The 'inline BOOL WINAPI ...' statement is line 202. Note that I am using the mfc include files that came with Symantec 7.5, is there some known issue with those? Is 'sc' not invoking 'scppn' under the covers? Thanks, -Bruce Walter wrote:The scppn.exe 8.1b5 is what I would put in a Symantec drop-in package. Try running: scppn and see if it says 8.1b5, because Jan ran into the same problem you did and 8.1b5 fixed it. -Walter
May 08 2001
<Slap on forehead> I think I know what the trouble is, Bruce must be using the dll version! I'll see if I can get that uploaded. Jan Knepper wrote in message <3AF89978.DD837D0D smartsoft.cc>...This is weird! The version I use says the exact same thing, but compiles MFC 4.21 just
Which version of MFC are you using by the way??? Jan Bruce Adelsman wrote:Walter, Here's what I get from an MS-DOS prompt..... C:\WINDOWS>scppn Digital Mars C/C++ Compiler Version 8.1B5n Copyright (C) Digital Mars 2000-2001. All Rights Reserved. Written by Walter Bright www.digitalmars.com C:\WINDOWS>sc Digital Mars Compiler Version 8.0B1n Copyright (C) Digital Mars 2000-2001. All Rights Reserved. Written by Walter Bright www.digitalmars.com SC is a one-step program to compile and link C++, C and ASM files. Usage ([] means optional, ... means zero or more): SC file... [flags...] [ respfile] The failure again... sc -cpp -Ae -mn -C -o+space -WA -S -3 -a8 -c -H -HO- -D_X86_=1 -D_MT=1 -HF.\stdafx.SYM -o.\stdafx.PCO stdafx.h Error: C:\SC\BIN\..\mfc\include\32-bit\afxv_w32.h(202): initializer or
body for dllimport not allowed Lines Processed: 113815 Errors: 1 Warnings: 0 Build failed And here is the section of the header file is is complaining about.... #ifndef _MAC // FreeResource is not required except on Mac platforms #undef FreeResource inline BOOL WINAPI FreeResource(HGLOBAL) { return TRUE; } // UnlockResource is not required except on Mac platforms #undef UnlockResource inline int WINAPI UnlockResource(HGLOBAL) { return 0; } #endif The 'inline BOOL WINAPI ...' statement is line 202. Note that I am using
mfc include files that came with Symantec 7.5, is there some known issue
those? Is 'sc' not invoking 'scppn' under the covers? Thanks, -Bruce Walter wrote:The scppn.exe 8.1b5 is what I would put in a Symantec drop-in package.
running: scppn and see if it says 8.1b5, because Jan ran into the same problem you did
8.1b5 fixed it. -Walter
May 08 2001
<g> Yeah! That would help! I do not think I *ever* upgraded one without the other... I don't wanna get confused... Neither does the compiler... <g> Don't worry, be Kneppie! Jan Walter wrote:<Slap on forehead> I think I know what the trouble is, Bruce must be using the dll version! I'll see if I can get that uploaded. Jan Knepper wrote in message <3AF89978.DD837D0D smartsoft.cc>...This is weird! The version I use says the exact same thing, but compiles MFC 4.21 just
Which version of MFC are you using by the way??? Jan Bruce Adelsman wrote:Walter, Here's what I get from an MS-DOS prompt..... C:\WINDOWS>scppn Digital Mars C/C++ Compiler Version 8.1B5n Copyright (C) Digital Mars 2000-2001. All Rights Reserved. Written by Walter Bright www.digitalmars.com C:\WINDOWS>sc Digital Mars Compiler Version 8.0B1n Copyright (C) Digital Mars 2000-2001. All Rights Reserved. Written by Walter Bright www.digitalmars.com SC is a one-step program to compile and link C++, C and ASM files. Usage ([] means optional, ... means zero or more): SC file... [flags...] [ respfile] The failure again... sc -cpp -Ae -mn -C -o+space -WA -S -3 -a8 -c -H -HO- -D_X86_=1 -D_MT=1 -HF.\stdafx.SYM -o.\stdafx.PCO stdafx.h Error: C:\SC\BIN\..\mfc\include\32-bit\afxv_w32.h(202): initializer or
body for dllimport not allowed Lines Processed: 113815 Errors: 1 Warnings: 0 Build failed And here is the section of the header file is is complaining about.... #ifndef _MAC // FreeResource is not required except on Mac platforms #undef FreeResource inline BOOL WINAPI FreeResource(HGLOBAL) { return TRUE; } // UnlockResource is not required except on Mac platforms #undef UnlockResource inline int WINAPI UnlockResource(HGLOBAL) { return 0; } #endif The 'inline BOOL WINAPI ...' statement is line 202. Note that I am using
mfc include files that came with Symantec 7.5, is there some known issue
those? Is 'sc' not invoking 'scppn' under the covers? Thanks, -Bruce Walter wrote:The scppn.exe 8.1b5 is what I would put in a Symantec drop-in package.
running: scppn and see if it says 8.1b5, because Jan ran into the same problem you did
8.1b5 fixed it. -Walter
May 08 2001
Walter, Cool, the new 8.15 plug-in did indeed fix the problem. Must've been the DLL, as you said. Thank you! Minor nit: The 8.15 plug-in package uncompresses to the directory name dm812. Thanks again, -Bruce Walter wrote:<Slap on forehead> I think I know what the trouble is, Bruce must be using the dll version! I'll see if I can get that uploaded.
May 09 2001
Bruce Adelsman wrote:P.S. Serious MFC user? Nah, just coming back to an old project after a 2+ year hiatus.
Hiatus?
May 08 2001