![]() |
| Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact |
| ||||||
This is a discussion on Compiling Error... within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Hi again, i've read the manual about sockets on C. I think that i made a socket without error (i ...
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 |
|
Hi again, i've read the manual about sockets on C. I think that i made a socket without error (i hope) but i can't compile it =/. This is the error of the SDK:
Code:
psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall -c -o main.o main.c main.c : In function 'main': main.c(75) : warning: implicit declaration of function 'close' main.c(101) : column 2 : warning: no newline at end of file psp-gcc -I. -IC:/pspdev/psp/sdk/include -O2 -G0 -Wall -L. -LC:/pspdev/psp/sdk/l ib main.o -lpspnet -lpspnet_inet -lpspdebug -lpspdisplay -lpspge -lpspctrl -lp spsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility - lpspuser -lpspkernel -o Sockets.elf psp-fixup-imports Sockets.elf Error, could not fixup imports, stubs out of order. Ensure the SDK libraries are linked in last to correct this error make: *** [Sockets.elf] Error 1 Code:
TARGET = Sockets OBJS = main.o INCDIR = CFLAGS = -O2 -G0 -Wall CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti ASFLAGS = $(CFLAGS) LIBDIR = LDFLAGS = LIBS = -lpspnet -lpspnet_inet EXTRA_TARGETS = EBOOT.PBP PSP_EBOOT_TITLE = Sockets C PSPSDK=$(shell psp-config --pspsdk-path) include $(PSPSDK)/lib/build.mak |
|
|
|
|
|
|
#2 | |||
![]() ![]() Developer
|
Quote:
Quote:
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
|||
|
|
|
|
|
#3 |
|
O_O Amazinggg!!!...
Now it can compile!!! *-*, thank you so much, i see you know about this!... But, how can i activate the wifi connection for connecting to my access point to test my "client"??... Because the socket always says: Code:
Error when creating socket! Closing Application... Code:
...
int sock;
sock = socket(AF_INET, SOCK_STREAM, 0);
if(sock == -1)
{
printf("Error when creating socket!\n");
printf("Closing Application...");
sceKernelDelayThread(time_out); //time_out = 50*1000
sceKernelExitGame();
}
...
Last edited by moz-art; 02-16-2008 at 01:38 PM.. |
|
|
|
|
|
|
#4 | |
![]() ![]() Developer
|
Have you connected to the access point?
Check out the SDK samples for connecting to an access point - samples/net/simple which also uses sockets or samples/utility/netdialog.
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
|
|
|
|
|
|
#5 |
|
I was reading the code, but i don't understand why i have to create a thread for the process to connect an access point. The function wich make all is "connect_to_apctl", but i don't know why i have to invoque it with "new_thread".
To initialize the Inet Modules i have to do pspSdkLoadInetModules(), and it returns 0 (or bigger than, i guest) on succesfully or < 0 on error. Then i have to call the process wich start the WLan, i mean, pspSdkInetInit(), i don't know what returns, i think 1 on succesfully (because de if just do the sentences on true/1), or 0 on error...i'm so confused ...Insert_Witty_Name, could you explain me that?, why i have to call connect_to_apctl with new_thread?, and, could i call it with something simplifiest? |
|
|
|
|
|
|
#6 | |
![]() ![]() Developer
|
For loading on 3.xx firmwares, the new thread isn't needed.
Also, don't use the pspSdk functions to load the modules, instead use sceUtilityLoadNetModule() . If you're on 1.5, then ignore the above - you need kernel mode to load the modules, but user mode for the rest of the program, hence the thread.
__________________
![]() Check out my homebrew & C tutorials at http://insomniac.0x89.org/ Coder formerly known as Insomniac197 Quote:
|
|
|
|
|
|
|
#7 |
|
This is more clearest, thank you =P...
I'll try to do for 3.xx with sceUtilityLoadNetModule() ;...now i know why had to convert to 1.50 the eboot.pbp compiled with the pspsdk. So, i hope i can do this =), thank you again, i will post the result... |
|
|
|
|
![]() |
| Tags |
| compiling , error |
| Thread Tools | |
|
|