Oppure

Loading
Questo topic e' stato chiuso dal moderatore.
18/10/14 19:16
c0rv00
Ho creato un programmino con le socket in c in ambiente eclipse.

Ho linkato la libreria libws2_32.a ma esce questo errore.


21:14:07 **** Rebuild of configuration Debug for project INFO_CAM ****
Info: Internal Builder is used for build
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o "src\INFO_CAM.o" "..\src\INFO_CAM.c"
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o "src\numero_parola.o" "..\src\numero_parola.c"
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o "src\mysock.o" "..\src\mysock.c"
..\src\mysock.c: In function 'RispostaServer':
..\src\mysock.c:65:27: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
memset(msg, 'Ho creato un programmino con le socket in c in ambiente eclipse.

Ho linkato la libreria libws2_32.a ma esce questo errore.


21:14:07 **** Rebuild of configuration Debug for project INFO_CAM ****
Info: Internal Builder is used for build
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o "src\INFO_CAM.o" "..\src\INFO_CAM.c"
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o "src\numero_parola.o" "..\src\numero_parola.c"
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o "src\mysock.o" "..\src\mysock.c"
..\src\mysock.c: In function 'RispostaServer':
..\src\mysock.c:65:27: warning: argument to 'sizeof' in 'memset' call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess]
memset(msg, '{parsed_message}', sizeof(msg));
^
gcc -o INFO_CAM.exe "src\numero_parola.o" "src\mysock.o" "src\INFO_CAM.o" -llibws2_32.a
/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/…: cannot find -llibws2_32.a
collect2.exe: error: ld returned 1 exit status

21:14:10 Build Finished (took 3s.840ms)
----------------------------------------------------------------------------------------------------------------------------
Ho addato anche il percorso con l'opzione -LC:\mingw\lib\ ma mi da lo stesso risultato
ho controllato che il file stesse effettivamente in quella cartelle e c'è.

sto impazzendo non riesco proprio a trovare soluzioni sul web e quindi ho deciso di provare con voi grazie.
:k:', sizeof(msg));
^
gcc -o INFO_CAM.exe "src\numero_parola.o" "src\mysock.o" "src\INFO_CAM.o" -llibws2_32.a
/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/…: cannot find -llibws2_32.a
collect2.exe: error: ld returned 1 exit status

21:14:10 Build Finished (took 3s.840ms)
----------------------------------------------------------------------------------------------------------------------------
Ho addato anche il percorso con l'opzione -LC:\mingw\lib\ ma mi da lo stesso risultato
ho controllato che il file stesse effettivamente in quella cartelle e c'è.

sto impazzendo non riesco proprio a trovare soluzioni sul web e quindi ho deciso di provare con voi grazie.
:k:
aaa
18/10/14 19:24
c0rv00
RISOLTO: la libreria va introdotta senza suffisso .a e senza prefisso lib

:hail: :k:
aaa