You are not logged in.
Pages: 1
When i complete the compile of desmume cvs, the log show three warnings:
------ Build started: Project: DeSmuME, Configuration: Debug Win32 ------
Compiling...
wifi.c
tileView.c
thumb_instructions.c
SPU.c
snddx.c
saves.c
ROMReader.c
render3D.c
palView.c
OGLRender.c
oamView.c
NDSSystem.c
c:\downloads\desmume\src\ndssystem.c(202) : warning C4996: 'strdup' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\string.h(205) : see declaration of 'strdup'
Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details.'
MMU.c
memView.c
mc.c
c:\downloads\desmume\src\mc.c(190) : warning C4047: '=' : 'char *' differs in levels of indirection from 'int'
matrix.c
mapView.c
main.c
IORegView.c
GPU.c
Generating Code...
Compiling...
ginfo.c
fs-windows.c
FirmConfig.c
FIFO.c
disView.c
Disassembler.c
debug.c
c:\downloads\desmume\src\debug.c(36) : warning C4996: 'strdup' was declared deprecated
c:\program files\microsoft visual studio 8\vc\include\string.h(205) : see declaration of 'strdup'
Message: 'The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _strdup. See online help for details.'
CWindow.c
cp15.c
ConfigKeys.c
cflash.c
bios.c
armcpu.c
arm_instructions.c
Generating Code...
Build log was saved at "file://c:\Downloads\desmume\src\windows\Debug\BuildLog.htm"
DeSmuME - 0 error(s), 3 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
The emulator runs, apparently, okay, but i wanted to know:
These warnings are nomal?
It's possible to solve these problems? How?
I can use the emulator without problems referring to they in future?
It's just this. Bye.
Offline
These warnings are pretty much normal.You need to switch to C mode in the project settings, though, or if you implemented some C++ stuff in it just replace all of the "strdup" instances to "_strdup".
This also occurs in strcpy, strcat and many other C++ deprecated string functions (strcpy_s, _sprintf, and so on are the "new" C++ conforming functions).
Hope it helps.
If you are reading this signature, you SERIOUSLY need to get a life.
Offline
Okay. I fix the problem with strdup, but this:
mc.c
c:\downloads\desmume\src\mc.c(190) : warning C4047: '=' : 'char *' differs in levels of indirection from 'int'
How solve?
Offline
Replies 2. Views 126.
Somebody there?
Offline
Why should you need to solve those warnings ?
Offline
Shash
What I wanted to know is if these warnings can generate errors in the emulator in the future. They can?
Offline
The warning C4047 is because the header file string.h has not been included at the top of the mc.c file. Therefore there is no prototype for the strdup function so Visual C++ makes one up. This is a bit naughty and string.h should be included. If you do add #include <string.h> at the top of the file and you will get the same warning as the other two.
To remove the warning C4996: 'strdup' was declared deprecated warning is not quite as simple as replacing strdup with _strdup. The source files are used on all platforms and under Linux Desmume is compiled with a plain old C compiler so _strdup would not be understood. You could do something like:
#ifdef __cplusplus
#define STRDUP_FN _strdup
#else
#define STRDUP_FN strdup
#endif
and replace strdup with STRDUP_FN.
Offline
Pages: 1