The thing to do in dealing with long lists of errors (such as the list that confronts you) is to deal with the very first error. Often, when that first error is fixed, the rest just disappear.
The first error is:
C:\Perl\bin\Remote-Connection\afxv_w32.h(178) : error C2371: 'HKEY' :
+redefinition; different basic types C:\Program Files\Microsoft Visual
+ Studio 8\VC\PlatformSDK\include\windef.h(246) : see declaration of '
+HKEY'
It looks to me that, at line 178 of C:\Perl\bin\Remote-Connection\afxv_w32.h, HKEY is being redefined, and your compiler is upset about that. So ... try to fix that first.
One thing I've just noticed from your first post in this thread is that you've assigned LD => '$(CC)'. I think that's rather unusual for a Microsoft compiler. Normally I'm used to seeing link assigned to LD. I don't know much about C++, and I don't think this has anything to do with the immediate problem, but it's something to bear in mind if you experience linking errors later on.
Cheers, Rob | [reply] [d/l] [select] |
I had put all the VC++ header files in my project folder.
when i run the command nmake i get the foolowing error msg:
C:\Perl\bin\Remote-Connection\afxv_w32.h(178) : error C2371: 'HKEY' :
+redefinition; different basic types C:\Program Files\Microsoft Visual
+ Studio 8\VC\PlatformSDK\include\windef.h(246) : see declaration of '+HKEY' .
But if i dont have any Vcc++ dependent header file in my project folder and try to execute the same follwing error msg pops up
C:\Perl\bin\Remote-Connection>nmake
cp lib/Remote/Connection.pm blib\lib\Remote\Connection.pm
C:\Perl\bin\perl.exe C:\Perl\lib\ExtUtils\xsubpp -typemap C:\Perl\lib\ExtUtils\typemap -typemap typemap Connection.xs > Connection.xsc && C:\Perl\bin\perl.exe -MExtUtils::Command -e mv Connection.xsc Connection.c
cl -TP -c -I. -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE-DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_I
MPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX -MD -Zi -DNDEBUG -O1 -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" "-IC:\Perl\lib\CORE"
Connection.c
Connection.c
c:\perl\bin\remote-connection\const-c.inc(52) : warning C4060: switch statement contains no 'case' or 'default' labels C:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\afx.h(24) : fatal error C1189: #error : Building MFC application with /MDd (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MDd
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
| [reply] |
Something I would have mentioned in my last post if I had thought of it: With the 'cl' compiler, you'll need to let the compiler know that the source files are C++ (assuming they are, in fact written in C++). You can do that by setting CC to cl -TP
As an alternative to that, renaming Connection.c to Connection.cpp might also work. Otherwise, cl will regard the source as being C code, and probably report numerous syntax errors.
Cheers, Rob | [reply] [d/l] [select] |