Поиск  Пользователи  Правила 
Закрыть
Логин:
Пароль:
Забыли свой пароль?
Войти
 
Страницы: 1
RSS
Visual C++ 6.0 syntax error
 
Вот листинг ошибок:
Compiling...
IAX.C
g:\work\projects\alarit\libiax2\src\iax.c(12) : warning C4005: 'WIN32' : macro redefinition
        unknown(0) : see previous definition of 'WIN32'
g:\work\coding\vc98\include\string.h(28) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\process.h(30) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\excpt.h(36) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\stdarg.h(36) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\windef.h(30) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\winbase.h(39) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\wingdi.h(37) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\winuser.h(28) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\winnls.h(22) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\wincon.h(26) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\winver.h(17) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\winreg.h(25) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\winnetwk.h(28) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\dde.h(16) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\ddeml.h(17) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\dlgs.h(245) : error C2061: syntax error : identifier 'BYTE'
g:\work\coding\vc98\include\dlgs.h(246) : error C2061: syntax error : identifier 'bGreen'
g:\work\coding\vc98\include\dlgs.h(246) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\dlgs.h(247) : error C2061: syntax error : identifier 'bBlue'
g:\work\coding\vc98\include\dlgs.h(247) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\dlgs.h(248) : error C2061: syntax error : identifier 'bExtra'
g:\work\coding\vc98\include\dlgs.h(248) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\dlgs.h(249) : error C2059: syntax error : '}'
g:\work\coding\vc98\include\lzexpand.h(9) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\mmsystem.h(40) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\nb30.h(20) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\rpc.h(23) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\shellapi.h(48) : error C2059: syntax error : 'string'
g:\work\coding\vc98\include\winperf.h(53) : error C2061: syntax error : identifier 'WCHAR'
g:\work\coding\vc98\include\winperf.h(54) : error C2061: syntax error : identifier 'LittleEndian'
g:\work\coding\vc98\include\winperf.h(54) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(55) : error C2061: syntax error : identifier 'Version'
g:\work\coding\vc98\include\winperf.h(55) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(57) : error C2061: syntax error : identifier 'Revision'
g:\work\coding\vc98\include\winperf.h(57) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(59) : error C2061: syntax error : identifier 'TotalByteLength'
g:\work\coding\vc98\include\winperf.h(59) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(60) : error C2061: syntax error : identifier 'HeaderLength'
g:\work\coding\vc98\include\winperf.h(60) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(61) : error C2061: syntax error : identifier 'NumObjectTypes'
g:\work\coding\vc98\include\winperf.h(61) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(63) : error C2061: syntax error : identifier 'DefaultObject'
g:\work\coding\vc98\include\winperf.h(63) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(68) : error C2061: syntax error : identifier 'SystemTime'
g:\work\coding\vc98\include\winperf.h(68) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(70) : error C2061: syntax error : identifier 'PerfTime'
g:\work\coding\vc98\include\winperf.h(70) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(72) : error C2061: syntax error : identifier 'PerfFreq'
g:\work\coding\vc98\include\winperf.h(72) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(74) : error C2061: syntax error : identifier 'PerfTime100nSec'
g:\work\coding\vc98\include\winperf.h(74) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(76) : error C2061: syntax error : identifier 'SystemNameLength'
g:\work\coding\vc98\include\winperf.h(76) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(77) : error C2061: syntax error : identifier 'SystemNameOffset'
g:\work\coding\vc98\include\winperf.h(77) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(80) : error C2059: syntax error : '}'
g:\work\coding\vc98\include\winperf.h(91) : error C2061: syntax error : identifier 'DWORD'
g:\work\coding\vc98\include\winperf.h(99) : error C2061: syntax error : identifier 'DefinitionLength'
g:\work\coding\vc98\include\winperf.h(99) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(107) : error C2061: syntax error : identifier 'HeaderLength'
g:\work\coding\vc98\include\winperf.h(107) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(111) : error C2061: syntax error : identifier 'ObjectNameTitleIndex'
g:\work\coding\vc98\include\winperf.h(111) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(113) : error C2061: syntax error : identifier 'ObjectNameTitle'
g:\work\coding\vc98\include\winperf.h(113) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(116) : error C2061: syntax error : identifier 'ObjectHelpTitleIndex'
g:\work\coding\vc98\include\winperf.h(116) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(118) : error C2061: syntax error : identifier 'ObjectHelpTitle'
g:\work\coding\vc98\include\winperf.h(118) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(121) : error C2061: syntax error : identifier 'DetailLevel'
g:\work\coding\vc98\include\winperf.h(121) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(125) : error C2061: syntax error : identifier 'NumCounters'
g:\work\coding\vc98\include\winperf.h(125) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(128) : error C2061: syntax error : identifier 'DefaultCounter'
g:\work\coding\vc98\include\winperf.h(128) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(132) : error C2061: syntax error : identifier 'NumInstances'
g:\work\coding\vc98\include\winperf.h(132) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(144) : error C2061: syntax error : identifier 'CodePage'
g:\work\coding\vc98\include\winperf.h(144) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(147) : error C2061: syntax error : identifier 'PerfTime'
g:\work\coding\vc98\include\winperf.h(147) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(149) : error C2061: syntax error : identifier 'PerfFreq'
g:\work\coding\vc98\include\winperf.h(149) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(151) : error C2059: syntax error : '}'
g:\work\coding\vc98\include\winperf.h(465) : error C2061: syntax error : identifier 'DWORD'
g:\work\coding\vc98\include\winperf.h(466) : error C2061: syntax error : identifier 'CounterNameTitleIndex'
g:\work\coding\vc98\include\winperf.h(466) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(469) : error C2061: syntax error : identifier 'CounterNameTitle'
g:\work\coding\vc98\include\winperf.h(469) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(472) : error C2061: syntax error : identifier 'CounterHelpTitleIndex'
g:\work\coding\vc98\include\winperf.h(472) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(475) : error C2061: syntax error : identifier 'CounterHelpTitle'
g:\work\coding\vc98\include\winperf.h(475) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(478) : error C2061: syntax error : identifier 'DefaultScale'
g:\work\coding\vc98\include\winperf.h(478) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(481) : error C2061: syntax error : identifier 'DetailLevel'
g:\work\coding\vc98\include\winperf.h(481) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(483) : error C2061: syntax error : identifier 'CounterType'
g:\work\coding\vc98\include\winperf.h(483) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(484) : error C2061: syntax error : identifier 'CounterSize'
g:\work\coding\vc98\include\winperf.h(484) : error C2059: syntax error : ';'
g:\work\coding\vc98\include\winperf.h(484) : fatal error C1003: error count exceeds 100; stopping compilation
Error executing cl.exe.
Creating browse info file...
BSCMAKE: error BK1506 : cannot open file '.\Debug\IAX.SBR': No such file or directory
Error executing bscmake.exe.

libiaxx.dll - 103 error(s), 1 warning(s)


Почему ВСЕ ошибки на header'ы Visual C ?????????
 
Возможно , для имени своего макроса ты использовал
зарезервированное поле - типа 'WIN32'
 
Не использовал зарезервированные.
Задавайте вопросы, какую надо дополнительную информацию выдать, дело горит.
 
Покажи строчки с первой по 13-ую из файла: g:\work\projects\alarit\libiax2\src\iax.c
 
#define     WIN32

#ifdef     WIN32

#include <string.h>
#include <process.h>
#include <windows.h>
#include <winsock.h>
#include <time.h>
#include <stdlib.h>
#include <malloc.h>
#include <stdarg.h>
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
#include <errno.h>
#include <winpoop.h>

#else

#include <netdb.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/time.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/select.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <time.h>

#ifndef MACOSX
#include <malloc.h>
#include <error.h>
#endif

#endif

#ifdef __cplusplus
extern "C" { //Закрывается в конце
#endif

extern "C"
{
     int __cdecl iax_send_text(struct iax_session *session, char *text);
struct iax_session * __cdecl iax_session_new(void);
}

#include "frame.h"
#include "iax2.h"
#include "iax2-parser.h"
#include "iax-client.h"
#include "md5.h"

/* Define socket options for IAX2 sockets, based on platform
* availability of flags */
#ifdef WIN32
#define IAX_SOCKOPTS 0
#else
#ifdef MACOSX
#define IAX_SOCKOPTS MSG_DONTWAIT
#else  /* Linux and others */
#define IAX_SOCKOPTS MSG_DONTWAIT | MSG_NOSIGNAL
#endif
#endif
 
Я надеюсь , ты под винды компилишь ? :-)
Последний кусок у меня заработал вот так :

#if defined (WIN32)
#define IAX_SOCKOPTS 0
#elif (MACOSX)
#define IAX_SOCKOPTS MSG_DONTWAIT
#else
#define IAX_SOCKOPTS MSG_DONTWAIT | MSG_NOSIGNAL
#endif
 
Откуда тут MACOSX взялся???
 
Приложение мультиплатформенное =)
Страницы: 1
Читают тему