Software Assemblies
asked on
Using Visual Studio 6 writing a C program and getting errors
--------------------Config uration: StockCharter - Win32 Release------------------- -
Compiling...
StdAfx.cpp
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\objbas e.h(435) : error C2664: 'memcmp' : cannot convert parameter 1 from 'const struct _GUID *' to 'void *'
Conversion loses qualifiers
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\objbas e.h(459) : error C2664: 'memcmp' : cannot convert parameter 1 from 'const struct _GUID *' to 'void *'
Conversion loses qualifiers
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(68) : error C2733: second C linkage of overloaded function '_memccpy' not allowed
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(68) : see declaration of '_memccpy'
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(69) : error C2733: second C linkage of overloaded function 'memchr' not allowed
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(69) : see declaration of 'memchr'
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(70) : error C2733: second C linkage of overloaded function '_memicmp' not allowed
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(70) : see declaration of '_memicmp'
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(76) : error C2733: second C linkage of overloaded function 'memcmp' not allowed
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(76) : see declaration of 'memcmp'
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(77) : error C2733: second C linkage of overloaded function 'memcpy' not allowed
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(77) : see declaration of 'memcpy'
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(85) : error C2733: second C linkage of overloaded function 'memccpy' not allowed
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(85) : see declaration of 'memccpy'
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(86) : error C2733: second C linkage of overloaded function 'memicmp' not allowed
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory .h(86) : see declaration of 'memicmp'
Error executing cl.exe.
Creating browse info file...
StockCharter.exe - 9 error(s), 0 warning(s)
Compiling...
StdAfx.cpp
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\objbas
Conversion loses qualifiers
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\objbas
Conversion loses qualifiers
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\memory
Error executing cl.exe.
Creating browse info file...
StockCharter.exe - 9 error(s), 0 warning(s)
ASKER
how would I solve this issue?
ASKER
if this is C program why is it picking up C++ errors?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
by the way vs 6 is from 1998 and was released before first c++ standard (c++98). if you want to have a c program, you much better would use visual studio 2017 community which is 19 years younger and for free. it still has an excellent ansi-c compiler.
Sara
Sara
>> if this is C program why is it picking up C++ errors?
Why do you think they are C++ errors?
>> how would I solve this issue?
Well, you have a const/non-const mismatch and so you'll either have to make one argument const or the other non-const. Without being able to see the code (as I've asked you to provide), we can't really say much more without resorting to telepathy or asking our spirit guides. :)
Why do you think they are C++ errors?
>> how would I solve this issue?
Well, you have a const/non-const mismatch and so you'll either have to make one argument const or the other non-const. Without being able to see the code (as I've asked you to provide), we can't really say much more without resorting to telepathy or asking our spirit guides. :)
Why do you think they are C++ errors?
stdafx.cpp is a wizard-generated c++ source which has only one (include) statement: #include "stdafx.h"
the extension .cpp is a reasonable indication that stdafx.cpp is compiled by using the c++ compiler. nevertheless vs studio settings would allow to compile even a source named stdafx.cpp with ansi-c compiler if all headers included by stdafx.h can be included as c headers as well. however, this can't work if the generated stdafx.h source included headers with some inline functions which are not compliant with strict ansi c syntax.
Sara
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\objbas
Conversion loses qualifiers
C:\Program Files (x86)\Microsoft Visual Studio\VC98\INCLUDE\objbas
This error suggests you have a mismatched with constness. Have you looked at this to see why?
Also, seeing the code would help.