PSP Hacks - Forums

Go Back   PSP Hacks - Forums > PSP Community > PSP Programming & Development

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 06-02-2009, 04:22 PM
pspjoke's Avatar
pspjoke pspjoke is offline
Programmer
PSP Guru
 

Join Date: Mar 2008
Location: U.S.
Posts: 1,820
pspjoke is a name known to allpspjoke is a name known to allpspjoke is a name known to allpspjoke is a name known to allpspjoke is a name known to allpspjoke is a name known to all
Default linker errors.. not includeing the right lib?>?

so im attempting to compile my uno game for the psp.
but i get this

Code:
1>------ Rebuild All started: Project: sdl test, Configuration: Debug Win32 ------
1>Performing Makefile project actions
1>psp-gcc -I. -IC:/pspsdk/psp/sdk/include -O2 -G0 -Wall -IC:/pspsdk/psp/psp/include/SDL -Dmain=SDL_main  -D_PSP_FW_VERSION=150  -L. -LC:/pspsdk/psp/sdk/lib   sdltest.o -LC:/pspsdk/psp/psp/lib -lSDLmain -lSDL -lm -lGL -lpspvfpu -LC:/pspsdk/psp/psp/sdk/lib -lpspdebug -lpspgu -lpspctrl -lpspge -lpspdisplay -lpsphprm -lpspsdk -lpsprtc -lpspaudio -lc -lpspuser -lpsputility -lpspkernel -lpspnet_inet  -lpspdebug -lpspdisplay -lpspge -lpspctrl -lpspsdk -lc -lpspnet -lpspnet_inet -lpspnet_apctl -lpspnet_resolver -lpsputility -lpspuser -lpspkernel -o sdltest.elf
1>sdltest.o: In function `LoadImages()':
1>sdltest.cpp:(.text+0x848): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
1>sdltest.cpp:(.text+0x85c): undefined reference to `std::string::_Rep::_S_empty_rep_storage'
1>sdltest.cpp:(.text+0x860): undefined reference to `std::string::_Rep::_S_empty_rep_storage'
1>sdltest.cpp:(.text+0x884): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
1>sdltest.cpp:(.text+0x8bc): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
1>sdltest.cpp:(.text+0x8f4): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
1>sdltest.cpp:(.text+0x92c): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
1>sdltest.cpp:(.text+0x964): undefined reference to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
1>sdltest.o:sdltest.cpp:(.text+0x99c): more undefined references to `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)' follow
1>sdltest.o: In function `LoadImages()':
1>sdltest.cpp:(.text+0x1548): undefined reference to `std::string::_Rep::_M_destroy(std::allocator<char> const&)'
1>sdltest.cpp:(.text+0x1564): undefined reference to `std::string::_Rep::_M_destroy(std::allocator<char> const&)'
1>sdltest.cpp:(.text+0x1580): undefined reference to `std::string::_Rep::_M_destroy(std::allocator<char> const&)'
1>sdltest.cpp:(.text+0x159c): undefined reference to `std::string::_Rep::_M_destroy(std::allocator<char> const&)'
1>sdltest.cpp:(.text+0x15b8): undefined reference to `std::string::_Rep::_M_destroy(std::allocator<char> const&)'
1>sdltest.o:sdltest.cpp:(.text+0x15d4): more undefined references to `std::string::_Rep::_M_destroy(std::allocator<char> const&)' follow
1>sdltest.o: In function `Player::Draw(std::deque<Card, std::allocator<Card> >*, int)':
1>sdltest.cpp:(.text+0x1d50): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.text+0x1da8): undefined reference to `operator delete(void*)'
1>sdltest.o: In function `Deal(std::vector<Player, std::allocator<Player> >*, std::deque<Card, std::allocator<Card> >*, std::deque<Card, std::allocator<Card> >*)':
1>sdltest.cpp:(.text+0x2408): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.text+0x245c): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.text+0x2498): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.text+0x24e8): undefined reference to `operator new(unsigned int)'
1>sdltest.o: In function `Shuffle(std::deque<Card, std::allocator<Card> >*)':
1>sdltest.cpp:(.text+0x2804): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.text+0x281c): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.text+0x2848): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.text+0x2860): undefined reference to `operator delete(void*)'
1>sdltest.o: In function `SetupDeck(std::deque<Card, std::allocator<Card> >*)':
1>sdltest.cpp:(.text+0x2c9c): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.text+0x2d10): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.text+0x2dc0): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.text+0x2e38): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.text+0x2eb4): undefined reference to `operator new(unsigned int)'
1>sdltest.o:sdltest.cpp:(.text+0x2f28): more undefined references to `operator new(unsigned int)' follow
1>sdltest.o: In function `SDL_main':
1>sdltest.cpp:(.text+0x48a4): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.text+0x48bc): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.text+0x4924): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.text+0x493c): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.text+0x495c): undefined reference to `operator delete(void*)'
1>sdltest.o:sdltest.cpp:(.text+0x4988): more undefined references to `operator delete(void*)' follow
1>sdltest.o: In function `SDL_main':
1>sdltest.cpp:(.text+0x4acc): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.text+0x4c54): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.text+0x4c6c): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.text+0x4c8c): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.text+0x4d3c): undefined reference to `std::__throw_bad_alloc()'
1>sdltest.o: In function `std::_Deque_base<Card, std::allocator<Card> >::_M_initialize_map(unsigned int)':
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt11_Deque_baseI4CardSaIS0_EE17_M_initialize_mapEj+0x6c): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt11_Deque_baseI4CardSaIS0_EE17_M_initialize_mapEj+0xa0): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt11_Deque_baseI4CardSaIS0_EE17_M_initialize_mapEj+0x134): undefined reference to `std::__throw_bad_alloc()'
1>sdltest.o: In function `std::deque<Card, std::allocator<Card> >::_M_reallocate_map(unsigned int, bool)':
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt5dequeI4CardSaIS0_EE17_M_reallocate_mapEjb+0xc4): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt5dequeI4CardSaIS0_EE17_M_reallocate_mapEjb+0x10c): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt5dequeI4CardSaIS0_EE17_M_reallocate_mapEjb+0x1d8): undefined reference to `std::__throw_bad_alloc()'
1>sdltest.o: In function `std::deque<Card, std::allocator<Card> >::_M_new_elements_at_front(unsigned int)':
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt5dequeI4CardSaIS0_EE24_M_new_elements_at_frontEj+0xe0): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt5dequeI4CardSaIS0_EE24_M_new_elements_at_frontEj+0x128): undefined reference to `std::__throw_length_error(char const*)'
1>sdltest.o: In function `std::deque<Card, std::allocator<Card> >::erase(std::_Deque_iterator<Card, Card&, Card*>)':
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt5dequeI4CardSaIS0_EE5eraseESt15_Deque_iteratorIS0_RS0_PS0_E+0x3a4): undefined reference to `operator delete(void*)'
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt5dequeI4CardSaIS0_EE5eraseESt15_Deque_iteratorIS0_RS0_PS0_E+0x3e0): undefined reference to `operator delete(void*)'
1>sdltest.o: In function `void std::deque<Card, std::allocator<Card> >::_M_insert_aux<std::_Deque_iterator<Card, Card const&, Card const*> >(std::_Deque_iterator<Card, Card&, Card*>, std::_Deque_iterator<Card, Card const&, Card const*>, std::_Deque_iterator<Card, Card const&, Card const*>, unsigned int)':
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt5dequeI4CardSaIS0_EE13_M_insert_auxISt15_Deque_iteratorIS0_RKS0_PS5_EEEvS4_IS0_RS0_PS0_ET_SC_j+0x4b8): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt5dequeI4CardSaIS0_EE13_M_insert_auxISt15_Deque_iteratorIS0_RKS0_PS5_EEEvS4_IS0_RS0_PS0_ET_SC_j+0x1268): undefined reference to `std::__throw_length_error(char const*)'
1>sdltest.o: In function `void std::deque<Card, std::allocator<Card> >::_M_range_insert_aux<std::_Deque_iterator<Card, Card const&, Card const*> >(std::_Deque_iterator<Card, Card&, Card*>, std::_Deque_iterator<Card, Card const&, Card const*>, std::_Deque_iterator<Card, Card const&, Card const*>, std::forward_iterator_tag)':
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt5dequeI4CardSaIS0_EE19_M_range_insert_auxISt15_Deque_iteratorIS0_RKS0_PS5_EEEvS4_IS0_RS0_PS0_ET_SC_St20forward_iterator_tag+0x1fc): undefined reference to `operator new(unsigned int)'
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt5dequeI4CardSaIS0_EE19_M_range_insert_auxISt15_Deque_iteratorIS0_RKS0_PS5_EEEvS4_IS0_RS0_PS0_ET_SC_St20forward_iterator_tag+0x484): undefined reference to `std::__throw_length_error(char const*)'
1>sdltest.o: In function `std::deque<Card, std::allocator<Card> >::operator=(std::deque<Card, std::allocator<Card> > const&)':
1>sdltest.cpp:(.gnu.linkonce.t._ZNSt5dequeI4CardSaIS0_EEaSERKS2_+0x154): undefined reference to `operator delete(void*)'
1>collect2: ld returned 1 exit status
1>C:\pspsdk\bin\make: *** [sdltest.elf] Error 1
1>C:/pspsdk/bin/rm -f sdltest.elf  sdltest.o PARAM.SFO EBOOT.PBP EBOOT.PBP kxploit
1>Build log was saved at "file://d:\My Documents\Visual Studio 2008\Projects\sdl test\Debug\BuildLog.htm"
1>sdl test - 0 error(s), 0 warning(s)
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
makefile
Code:
TARGET = sdltest
OBJS = sdltest.o

INCDIR = 
CFLAGS = -O2 -G0 -Wall
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti
ASFLAGS = $(CFLAGS)

LIBDIR =
LDFLAGS =
STDLIBS= lstdc++ -lstd
EXTRA_TARGETS = EBOOT.PBP
#EXTRA_CLEAN = my-clean

PSP_EBOOT_TITLE = SDL Test v1.1
PSP_DIR_NAME = SDLTEST

PSPSDK=$(shell psp-config --pspsdk-path)
PSPBIN = $(PSPSDK)/../bin
CFLAGS += $(shell $(PSPBIN)/sdl-config --cflags)
LIBS += $(shell $(PSPBIN)/sdl-config --libs)
include $(PSPSDK)/lib/build.mak

# Use "make pc" to build a copy of sdltest that runs on your PC.
#pc:
#        gcc -o sdltest-pc sdltest.c `sdl-config --cflags` `sdl-config --libs`

#my-clean:
#    rm -rf $(TARGET) $(TARGET)% sdltest-pc
i figured that libstdc++ would have had the references of std::(anything).
..aparently not tho. also the other thing.. clueless about that
__________________
http://levoneprojects.net23.net/

++rep me if i helped you please.
Ahh, shit. Stupidity is on the rise again.
went legit Oct. 31, 09'
piracy is wrong, please don't do it.


Last edited by pspjoke; 06-02-2009 at 04:25 PM.
Reply With Quote
  #2  
Old 06-02-2009, 05:07 PM
pspjoke's Avatar
pspjoke pspjoke is offline
Programmer
PSP Guru
 

Join Date: Mar 2008
Location: U.S.
Posts: 1,820
pspjoke is a name known to allpspjoke is a name known to allpspjoke is a name known to allpspjoke is a name known to allpspjoke is a name known to allpspjoke is a name known to all
Default

nvm i got it..
EDIT:

well im not an expert of makefiles, but i fixed it by moving -lstdc++ to the LIBS section...
you would think DUH you stupid noob... but i saw STDLIBS and it threw my brain off so...
__________________
http://levoneprojects.net23.net/

++rep me if i helped you please.
Ahh, shit. Stupidity is on the rise again.
went legit Oct. 31, 09'
piracy is wrong, please don't do it.

Reply With Quote
  #3  
Old 06-02-2009, 11:19 PM
ZiNgABuRgA's Avatar
ZiNgABuRgA ZiNgABuRgA is offline
Has green username Moderator
PSP Titan
 

Join Date: Sep 2006
Location: 4CHIN
Posts: 11,069
ZiNgABuRgA has a spectacular aura aboutZiNgABuRgA has a spectacular aura about
Default

Use can use any name you like, but remember it's somewhat like variable substitution (so it has to be consistent with what's passed on the command line to gcc)...
Reply With Quote
Reply

 



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:13 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
©