PDA

View Full Version : errori codeblocks C


andros94
28-08-2011, 10:18
usanco code blocks e compilando un sorgente in c trovato in rete ma ricevo questi errori :

||warning: command line option "-std=c++0x" is valid for C++/ObjC++ but not for C|
||warning: command line option "-std=c++98" is valid for C++/ObjC++ but not for C|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|366|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'WCHAR'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|367|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|368|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'WCHAR'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|369|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|430|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'CHAR'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|431|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'const'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|475|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PNZTCH'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|476|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'PCNZTCH'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|851|error: #error Must define a target architecture.|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|1202|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|1205|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'EXCEPTION_ROUTINE'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|1212|error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|12880|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnt.h|13305|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winbase.h|2936|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winbase.h|2939|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winbase.h|2942|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winbase.h|3054|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winbase.h|3057|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winbase.h|3060|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winbase.h|3063|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winuser.h|3183|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnls.h|1381|error: expected declaration specifiers or '...' before 'PCNZCH'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnls.h|1383|error: expected declaration specifiers or '...' before 'PCNZCH'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnls.h|1392|error: expected declaration specifiers or '...' before 'PCNZWCH'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winnls.h|1394|error: expected declaration specifiers or '...' before 'PCNZWCH'|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winreg.h|1243|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winreg.h|1257|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\objbase.h|865|error: pasting "(" and "__drv_nop" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\oaidl.h|445|error: pasting "/" and "/" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\oaidl.h|445|error: expected specifier-qualifier-list before '/' token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\oaidl.h|460|error: pasting "/" and "/" does not give a valid preprocessing token|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\propidl.h|638|error: array type has incomplete element type|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\propidl.h|644|error: array type has incomplete element type|
C:\Users\utente\Desktop\codeblock\pl\main.c||In function 'hook':|
C:\Users\utente\Desktop\codeblock\pl\main.c|54|warning: pointer targets in passing argument 1 of 'GetWindowsDirectoryA' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winbase.h|8735|note: expected 'LPSTR' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c|55|warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\stdio.h|262|note: expected 'char *' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c|56|warning: pointer targets in passing argument 1 of 'fopen' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\stdio.h|169|note: expected 'const char *' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c|59|warning: pointer targets in passing argument 2 of 'CopyFileA' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winbase.h|9770|note: expected 'LPCSTR' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c|61|warning: pointer targets in passing argument 3 of 'ShellExecuteA' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\shellapi.h|71|note: expected 'LPCSTR' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c|67|warning: pointer targets in passing argument 5 of 'RegSetValueExA' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winreg.h|936|note: expected 'const BYTE *' but argument is of type 'char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c||In function 'ItsTheTime':|
C:\Users\utente\Desktop\codeblock\pl\main.c|94|warning: implicit declaration of function 'FirstSession'|
C:\Users\utente\Desktop\codeblock\pl\main.c||In function 'FirstSession':|
C:\Users\utente\Desktop\codeblock\pl\main.c|112|warning: pointer targets in passing argument 1 of 'fopen' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\stdio.h|169|note: expected 'const char *' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c||In function 'SessionLoad':|
C:\Users\utente\Desktop\codeblock\pl\main.c|169|warning: pointer targets in passing argument 1 of 'fopen' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\stdio.h|169|note: expected 'const char *' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c|173|warning: comparison between signed and unsigned integer expressions|
C:\Users\utente\Desktop\codeblock\pl\main.c||In function 'SessionDelete':|
C:\Users\utente\Desktop\codeblock\pl\main.c|194|warning: pointer targets in passing argument 1 of 'fopen' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\stdio.h|169|note: expected 'const char *' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c||In function 'smtp':|
C:\Users\utente\Desktop\codeblock\pl\main.c|260|warning: pointer targets in passing argument 1 of 'gethostbyname' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\winsock.h|855|note: expected 'const char *' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c|274|warning: pointer targets in passing argument 1 of 'atoi' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\stdlib.h|304|note: expected 'const char *' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c|281|warning: pointer targets in passing argument 1 of 'receivedata' differ in signedness|
C:\Users\utente\Desktop\codeblock\pl\main.c|228|note: expected 'char *' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c|282|warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\stdio.h|262|note: expected 'char *' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c|283|warning: pointer targets in passing argument 1 of 'strlen' differ in signedness|
c:\mingw\bin\..\lib\gcc\mingw32\4.5.2\..\..\..\..\include\string.h|49|note: expected 'const char *' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c|283|warning: pointer targets in passing argument 1 of 'senddata' differ in signedness|
C:\Users\utente\Desktop\codeblock\pl\main.c|208|note: expected 'char *' but argument is of type 'unsigned char *'|
C:\Users\utente\Desktop\codeblock\pl\main.c|284|warning: pointer targets in passing argument 1 of 'receivedata' differ in signedness|
C:\Users\utente\Desktop\codeblock\pl\main.c|228|note: expected 'char *' but argument is of type 'unsigned char *'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 20 warnings ===|



nel codice sono incluusi questi file
#include<windows.h>
#include<winsock.h>

sinceramente non capisco il significato di questi errori...

andros94
30-08-2011, 16:17
up

AnonimoVeneziano
30-08-2011, 16:27
Mmm, se provi a compilarlo come un file c++ ti da gli stessi errori?

andros94
31-08-2011, 16:15
diversi, ma sempre riferiti agli stessi file

Freaxxx
31-08-2011, 16:25
compila da riga di comando usando gcc con la flag verbose attivata