Logo Hardware.com.br
Leciano Araujo
Leciano Arau... Novo Membro Registrado
7 Mensagens 0 Curtidas

Preciso de ajuda com meu codigo (esta dando alguns erros)(C++/C)

#1 Por Leciano Arau... 19/01/2016 - 18:18
Estou fazendo um motor de síntese de voz em C++ com a IDE code Blocks e me deparei com alguns problemas (Erros) que até agora não consigo resolver
aki a parte do codigo que esta dando erro: Nome do codigo VS4u.h


//--------------------------------------------------------------
// Synthesis Vocal World
//--------------------------------------------------------------

[HASHTAG]#ifndef[/HASHTAG] _VS4U_H_
[HASHTAG]#define[/HASHTAG] _VS4U_H_

[HASHTAG]#define[/HASHTAG] M_PI (3.14159265358979323846)

[HASHTAG]#define[/HASHTAG] VS4U_MAX_PATH strcpy_s(260)

[HASHTAG]#define[/HASHTAG] VS4U_PBSIZE (65536)

[HASHTAG]#define[/HASHTAG] PRINT_TIME
[HASHTAG]#define[/HASHTAG] PRINT_OPTION


typedef struct{

char inputWaveFile[VS4U_MAX_PATH];
char outputWaveFile[VS4U_MAX_PATH];
char frqFile[VS4U_MAX_PATH];
char vsfrqFile[VS4U_MAX_PATH];
char vspFile[VS4U_MAX_PATH];

int noteNum;
double offset;
double reqLength;
double fixedLength;
double endBlank;
double fixSpeed;

double volume;
double modulation;
double tempo;
int nPitchBend;
int pitchBend[VS4U_PBSIZE];

int noFormantFlg;
int genderFactor;
int pitchShift;
int pitchShift2;
int peekCmp;
int lowPassfilter;
int breathiness;
int brightness;
int clearness;
int outputVshpFlg;
int reGenerateFrqFlg;
int disablePitchShift;


short *tmpWaveData;
int tmpSample;
int tmpSmpFreq;
} VS4UOPTION;


typedef struct{
double freq;
double dyn;
} FREQDATA;


double LimitDoubleValue( double value, double min, double max );
int LimitIntValue( int value, int min, int max );
void AddExtStr( char *dstStr, int dstSize, char *extStr );
int CheckFileExist( char *fileName );


int Vs4uGetOption( int argc, char *argv[], VS4UOPTION *option );
int Vs4uCnvNoteNum( char *nnStr );
int Vs4uSetFlgOption( char *flgStr, VS4UOPTION *option );
int Vs4uDecodeBase64( char *str );
int Vs4uSetPitchBendOption( char *argv[], VS4UOPTION *option );
void Vs4uPrintOption( VS4UOPTION *option );


int Vs4uStep1( VS4UOPTION *option );
HVSPRJ Vs4uLoadProject( VS4UOPTION *option );
int Vs4uSetTimeStretchPrm( HVSPRJ hVsprj, VS4UOPTION *option );
int Vs4uLoadFrqFile( HVSPRJ hVsprj, VS4UOPTION *option );
int Vs4uCalcAveragePit( HVSPRJ hVsprj, VS4UOPTION *option );
int Vs4uSetPitPrm( HVSPRJ hVsprj, VS4UOPTION *option );


int Vs4uStep2( VS4UOPTION *option );
int Vs4uLowPassFilter( VS4UOPTION *option );
int Vs4uVolume( VS4UOPTION *option );
int Vs4uOutputWaveFile( VS4UOPTION *option );

[HASHTAG]#endif[/HASHTAG] /* _VS4U_H_ */


Erros:
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u.h|21|error: 'strcpy_s' was not declared in this scope|
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u.h|22|error: 'strcpy_s' was not declared in this scope|
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u.h|23|error: 'strcpy_s' was not declared in this scope|
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u.h|24|error: 'strcpy_s' was not declared in this scope|
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u.h|25|error: 'strcpy_s' was not declared in this scope|
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Nome do Codigo: vs4u_common


//--------------------------------------------------------------
// Synthesis Vocal World
//--------------------------------------------------------------

[HASHTAG]#include[/HASHTAG]
[HASHTAG]#include[/HASHTAG]
[HASHTAG]#include[/HASHTAG]
[HASHTAG]#include[/HASHTAG]
[HASHTAG]#include[/HASHTAG]
[HASHTAG]#include[/HASHTAG]
[HASHTAG]#include[/HASHTAG]

[HASHTAG]#include[/HASHTAG] "vslib.h"
[HASHTAG]#include[/HASHTAG] "vs4u.h"



double LimitDoubleValue( double value, double min, double max )
{
if( value < min ){
value = min;
}
else if( value > max ){
value = max;
}
return value;
}

int LimitIntValue( int value, int min, int max )
{
if( value < min ){
value = min;
}
else if( value > max ){
value = max;
}
return value;
}


void AddExtStr( char *dstStr, int dstSize, char *extStr )
{
int len = strlen( dstStr );


for( int i=len-1; i>=0; i-- ){
if( dstStr == '\\' ){
break;
}
if( dstStr == '.' ){
dstStr = '_';
break;
}
}


strcat_s( dstStr, dstSize, extStr );
}


int CheckFileExist( char *fileName )
{
int existFlg = 0;
FILE *fp;

fopen_s( &fp, fileName, "rb" );
if ( fp != NULL ){
fclose( fp );
existFlg = 1;
}

return existFlg;
}

Erros:
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u_common.cpp|58|error: 'strcat_s' was not declared in this scope|
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u_common.cpp|67|error: 'fopen_s' was not declared in this scope|

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Foto de todos os arquivos do codigo fonte: http://prntscr.com/9s8giq

Já não sei mais o que fazer
Se alguem puder me ajudar ficarei muito agradecido
Contatos:
Skype: leandro.araujo165
Email: [email]lecianodjcreations@gmail.com[/email]
Leciano Araujo
Leciano Arau... Novo Membro Registrado
7 Mensagens 0 Curtidas
#3 Por Leciano Arau...
19/01/2016 - 19:47
Obrigado eu não sabia que esse site tinha isso (sou super novo aki)
Bom aki o codigo que esta dando erro

Nome do arquivo: vs4u.h
[code=C++]/*

//--------------------------------------------------------------
// Synthesis Vocal World
//--------------------------------------------------------------

#ifndef _VS4U_H_
#define _VS4U_H_

#define M_PI (3.14159265358979323846)

#define VS4U_MAX_PATH strcpy_s(260)

#define VS4U_PBSIZE (65536)

#define PRINT_TIME
#define PRINT_OPTION


typedef struct{

char inputWaveFile[VS4U_MAX_PATH];
char outputWaveFile[VS4U_MAX_PATH];
char frqFile[VS4U_MAX_PATH];
char vsfrqFile[VS4U_MAX_PATH];
char vspFile[VS4U_MAX_PATH];

int noteNum;
double offset;
double reqLength;
double fixedLength;
double endBlank;
double fixSpeed;

double volume;
double modulation;
double tempo;
int nPitchBend;
int pitchBend[VS4U_PBSIZE];

int noFormantFlg;
int genderFactor;
int pitchShift;
int pitchShift2;
int peekCmp;
int lowPassfilter;
int breathiness;
int brightness;
int clearness;
int outputVshpFlg;
int reGenerateFrqFlg;
int disablePitchShift;


short *tmpWaveData;
int tmpSample;
int tmpSmpFreq;
} VS4UOPTION;


typedef struct{
double freq;
double dyn;
} FREQDATA;


double LimitDoubleValue( double value, double min, double max );
int LimitIntValue( int value, int min, int max );
void AddExtStr( char *dstStr, int dstSize, char *extStr );
int CheckFileExist( char *fileName );


int Vs4uGetOption( int argc, char *argv[], VS4UOPTION *option );
int Vs4uCnvNoteNum( char *nnStr );
int Vs4uSetFlgOption( char *flgStr, VS4UOPTION *option );
int Vs4uDecodeBase64( char *str );
int Vs4uSetPitchBendOption( char *argv[], VS4UOPTION *option );
void Vs4uPrintOption( VS4UOPTION *option );


int Vs4uStep1( VS4UOPTION *option );
HVSPRJ Vs4uLoadProject( VS4UOPTION *option );
int Vs4uSetTimeStretchPrm( HVSPRJ hVsprj, VS4UOPTION *option );
int Vs4uLoadFrqFile( HVSPRJ hVsprj, VS4UOPTION *option );
int Vs4uCalcAveragePit( HVSPRJ hVsprj, VS4UOPTION *option );
int Vs4uSetPitPrm( HVSPRJ hVsprj, VS4UOPTION *option );


int Vs4uStep2( VS4UOPTION *option );
int Vs4uLowPassFilter( VS4UOPTION *option );
int Vs4uVolume( VS4UOPTION *option );
int Vs4uOutputWaveFile( VS4UOPTION *option );

#endif /* _VS4U_H_ */


*/[/code]

e os erros são esses:
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u.h|21|error: 'strcpy_s' was not declared in this scope|
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u.h|22|error: 'strcpy_s' was not declared in this scope|
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u.h|23|error: 'strcpy_s' was not declared in this scope|
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u.h|24|error: 'strcpy_s' was not declared in this scope|
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u.h|25|error: 'strcpy_s' was not declared in this scope|


O segundo codigo é esse e o nome do arquivo é : vs4u_common.cpp
[code=C++]/*


//--------------------------------------------------------------
// Synthesis Vocal World
//--------------------------------------------------------------

#include
#include
#include
#include
#include
#include
#include

#include "vslib.h"
#include "vs4u.h"



double LimitDoubleValue( double value, double min, double max )
{
if( value < min ){
value = min;
}
else if( value > max ){
value = max;
}
return value;
}

int LimitIntValue( int value, int min, int max )
{
if( value < min ){
value = min;
}
else if( value > max ){
value = max;
}
return value;
}


void AddExtStr( char *dstStr, int dstSize, char *extStr )
{
int len = strlen( dstStr );


for( int i=len-1; i>=0; i-- ){
if( dstStr[i] == '\\' ){
break;
}
if( dstStr[i] == '.' ){
dstStr[i] = '_';
break;
}
}


strcat_s( dstStr, dstSize, extStr );
}


int CheckFileExist( char *fileName )
{
int existFlg = 0;
FILE *fp;

fopen_s( &fp, fileName, "rb" );
if ( fp != NULL ){
fclose( fp );
existFlg = 1;
}

return existFlg;
}


*/[/code]
Erros:
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u_common.cpp|58|error: 'strcat_s' was not declared in this scope|
C:\Users\Le\Desktop\Synthesis Vocal World\vs4u_common.cpp|67|error: 'fopen_s' was not declared in this scope|

Foto de todos os arquivos do codigo fonte: http://prntscr.com/9s8giq
© 1999-2024 Hardware.com.br. Todos os direitos reservados.
Imagem do Modal