Hi, I used this devkit and set up Visual Studio using a custom build rule under windows (the one from the Wiki) however I'm getting linking errors from the SDL library. Here's the build log that Visual Studio generated:
//-------------------------------------------------------------------------------------------------
Creating temporary file "c:\Documents and Settings\Marc\My Documents\Visual Studio 2005\Projects\ads\game\Debug\BAT00001C24443376.bat" with contents
[
@echo off
arm-linux-gcc.exe -c -I"C:\devkitGP2X\include" -o Debug\main.o ".\main.cpp" 2>&1 | sed -e s/(.[a-zA-Z]\+)[0-9]\+):/\1(\2):/
if errorlevel 1 goto VCReportError
goto VCEnd
:VCReportError
echo Project : error PRJ0019: A tool returned an error code from "main.cpp"
exit 1
:VCEnd
]
Creating command line """c:\Documents and Settings\Marc\My Documents\Visual Studio 2005\Projects\ads\game\Debug\BAT00001C24443376.bat"""
Creating temporary file "c:\Documents and Settings\Marc\My Documents\Visual Studio 2005\Projects\ads\game\Debug\BAT00001D24443376.bat" with contents
[
@echo off
arm-linux-gcc.exe Debug\*.o -o "c:\documents and settings\marc\my documents\visual studio 2005\projects\ads\debug\game.gpe" -L"C:\devkitGP2X\lib" -lSDL -lSDLmain -static 2>&1 | sed -e s/(.[a-zA-Z]\+)[0-9]\+):/\1(\2):/
if errorlevel 1 goto VCReportError
goto VCEnd
:VCReportError
echo Project : error PRJ0019: A tool returned an error code from "Linking game.gpe..."
exit 1
:VCEnd
]
Creating command line """c:\Documents and Settings\Marc\My Documents\Visual Studio 2005\Projects\ads\game\Debug\BAT00001D24443376.bat"""
Output Window main.cpp
Linking game.gpe...
Debug\main.o: In function `main':
main.cpp.text+0x84): undefined reference to `__cxa_rethrow'
main.cpp.text+0x158): undefined reference to `__cxa_begin_catch'
main.cpp.text+0x164): undefined reference to `__cxa_end_catch'
main.cpp.text+0x188): undefined reference to `__gxx_personality_sj0'
C:\devkitGP2X\lib\libSDL.a(SDL_syssem.o): In function `SDL_CreateSemaphore':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_syssem.c(103): undefined reference to `sem_init'
C:\devkitGP2X\lib\libSDL.a(SDL_syssem.o): In function `SDL_DestroySemaphore':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_syssem.c(129): undefined reference to `sem_destroy'
C:\devkitGP2X\lib\libSDL.a(SDL_syssem.o): In function `SDL_SemTryWait':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_syssem.c(144): undefined reference to `sem_trywait'
C:\devkitGP2X\lib\libSDL.a(SDL_syssem.o): In function `SDL_SemWait':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_syssem.c(165): undefined reference to `sem_wait'
C:\devkitGP2X\lib\libSDL.a(SDL_syssem.o): In function `SDL_SemValue':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_syssem.c(209): undefined reference to `sem_getvalue'
C:\devkitGP2X\lib\libSDL.a(SDL_syssem.o): In function `SDL_SemPost':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_syssem.c(230): undefined reference to `sem_post'
C:\devkitGP2X\lib\libSDL.a(SDL_sysmutex.o): In function `SDL_CreateMutex':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_sysmutex.c(72): undefined reference to `pthread_mutexattr_init'
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_sysmutex.c(77): undefined reference to `pthread_mutexattr_setkind_np'
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_sysmutex.c(82): undefined reference to `pthread_mutex_init'
C:\devkitGP2X\lib\libSDL.a(SDL_sysmutex.o): In function `SDL_DestroyMutex':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_sysmutex.c(96): undefined reference to `pthread_mutex_destroy'
C:\devkitGP2X\lib\libSDL.a(SDL_sysmutex.o): In function `SDL_mutexP':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_sysmutex.c(133): undefined reference to `pthread_mutex_lock'
C:\devkitGP2X\lib\libSDL.a(SDL_sysmutex.o): In function `SDL_mutexV':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_sysmutex.c(171): undefined reference to `pthread_mutex_unlock'
C:\devkitGP2X\lib\libSDL.a(SDL_systhread.o): In function `RunThread':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(83): undefined reference to `pthread_exit'
C:\devkitGP2X\lib\libSDL.a(SDL_systhread.o): In function `SDL_SYS_CreateThread':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(92): undefined reference to `pthread_attr_init'
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(96): undefined reference to `pthread_attr_setdetachstate'
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(99): undefined reference to `pthread_create'
C:\devkitGP2X\lib\libSDL.a(SDL_systhread.o): In function `SDL_SYS_SetupThread':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(117): undefined reference to `pthread_sigmask'
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(123): undefined reference to `pthread_setcanceltype'
C:\devkitGP2X\lib\libSDL.a(SDL_systhread.o): In function `SDL_ThreadID':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(131): undefined reference to `pthread_self'
C:\devkitGP2X\lib\libSDL.a(SDL_systhread.o): In function `SDL_SYS_WaitThread':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(136): undefined reference to `pthread_join'
C:\devkitGP2X\lib\libSDL.a(SDL_systhread.o): In function `SDL_SYS_KillThread':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(142): undefined reference to `pthread_cancel'
c:/devkitgp2x/bin/../lib/gcc/arm-linux/4.0.2\libgcc_eh.a(unwind-sjlj.o): In function `fc_key_init_once':
: undefined reference to `pthread_cancel'
c:/devkitgp2x/bin/../lib/gcc/arm-linux/4.0.2\libgcc_eh.a(unwind-sjlj.o).data.rel.ro+0x0): undefined reference to `pthread_cancel'
//--------------------------------------------------------------------------------------------------------------
Any ideas?
//-------------------------------------------------------------------------------------------------
Creating temporary file "c:\Documents and Settings\Marc\My Documents\Visual Studio 2005\Projects\ads\game\Debug\BAT00001C24443376.bat" with contents
[
@echo off
arm-linux-gcc.exe -c -I"C:\devkitGP2X\include" -o Debug\main.o ".\main.cpp" 2>&1 | sed -e s/(.[a-zA-Z]\+)[0-9]\+):/\1(\2):/
if errorlevel 1 goto VCReportError
goto VCEnd
:VCReportError
echo Project : error PRJ0019: A tool returned an error code from "main.cpp"
exit 1
:VCEnd
]
Creating command line """c:\Documents and Settings\Marc\My Documents\Visual Studio 2005\Projects\ads\game\Debug\BAT00001C24443376.bat"""
Creating temporary file "c:\Documents and Settings\Marc\My Documents\Visual Studio 2005\Projects\ads\game\Debug\BAT00001D24443376.bat" with contents
[
@echo off
arm-linux-gcc.exe Debug\*.o -o "c:\documents and settings\marc\my documents\visual studio 2005\projects\ads\debug\game.gpe" -L"C:\devkitGP2X\lib" -lSDL -lSDLmain -static 2>&1 | sed -e s/(.[a-zA-Z]\+)[0-9]\+):/\1(\2):/
if errorlevel 1 goto VCReportError
goto VCEnd
:VCReportError
echo Project : error PRJ0019: A tool returned an error code from "Linking game.gpe..."
exit 1
:VCEnd
]
Creating command line """c:\Documents and Settings\Marc\My Documents\Visual Studio 2005\Projects\ads\game\Debug\BAT00001D24443376.bat"""
Output Window main.cpp
Linking game.gpe...
Debug\main.o: In function `main':
main.cpp.text+0x84): undefined reference to `__cxa_rethrow'
main.cpp.text+0x158): undefined reference to `__cxa_begin_catch'
main.cpp.text+0x164): undefined reference to `__cxa_end_catch'
main.cpp.text+0x188): undefined reference to `__gxx_personality_sj0'
C:\devkitGP2X\lib\libSDL.a(SDL_syssem.o): In function `SDL_CreateSemaphore':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_syssem.c(103): undefined reference to `sem_init'
C:\devkitGP2X\lib\libSDL.a(SDL_syssem.o): In function `SDL_DestroySemaphore':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_syssem.c(129): undefined reference to `sem_destroy'
C:\devkitGP2X\lib\libSDL.a(SDL_syssem.o): In function `SDL_SemTryWait':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_syssem.c(144): undefined reference to `sem_trywait'
C:\devkitGP2X\lib\libSDL.a(SDL_syssem.o): In function `SDL_SemWait':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_syssem.c(165): undefined reference to `sem_wait'
C:\devkitGP2X\lib\libSDL.a(SDL_syssem.o): In function `SDL_SemValue':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_syssem.c(209): undefined reference to `sem_getvalue'
C:\devkitGP2X\lib\libSDL.a(SDL_syssem.o): In function `SDL_SemPost':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_syssem.c(230): undefined reference to `sem_post'
C:\devkitGP2X\lib\libSDL.a(SDL_sysmutex.o): In function `SDL_CreateMutex':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_sysmutex.c(72): undefined reference to `pthread_mutexattr_init'
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_sysmutex.c(77): undefined reference to `pthread_mutexattr_setkind_np'
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_sysmutex.c(82): undefined reference to `pthread_mutex_init'
C:\devkitGP2X\lib\libSDL.a(SDL_sysmutex.o): In function `SDL_DestroyMutex':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_sysmutex.c(96): undefined reference to `pthread_mutex_destroy'
C:\devkitGP2X\lib\libSDL.a(SDL_sysmutex.o): In function `SDL_mutexP':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_sysmutex.c(133): undefined reference to `pthread_mutex_lock'
C:\devkitGP2X\lib\libSDL.a(SDL_sysmutex.o): In function `SDL_mutexV':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_sysmutex.c(171): undefined reference to `pthread_mutex_unlock'
C:\devkitGP2X\lib\libSDL.a(SDL_systhread.o): In function `RunThread':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(83): undefined reference to `pthread_exit'
C:\devkitGP2X\lib\libSDL.a(SDL_systhread.o): In function `SDL_SYS_CreateThread':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(92): undefined reference to `pthread_attr_init'
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(96): undefined reference to `pthread_attr_setdetachstate'
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(99): undefined reference to `pthread_create'
C:\devkitGP2X\lib\libSDL.a(SDL_systhread.o): In function `SDL_SYS_SetupThread':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(117): undefined reference to `pthread_sigmask'
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(123): undefined reference to `pthread_setcanceltype'
C:\devkitGP2X\lib\libSDL.a(SDL_systhread.o): In function `SDL_ThreadID':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(131): undefined reference to `pthread_self'
C:\devkitGP2X\lib\libSDL.a(SDL_systhread.o): In function `SDL_SYS_WaitThread':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(136): undefined reference to `pthread_join'
C:\devkitGP2X\lib\libSDL.a(SDL_systhread.o): In function `SDL_SYS_KillThread':
/home/darius/gp2x/sdl/SDL-1.2.9-GP2X/src/thread/SDL_systhread.c(142): undefined reference to `pthread_cancel'
c:/devkitgp2x/bin/../lib/gcc/arm-linux/4.0.2\libgcc_eh.a(unwind-sjlj.o): In function `fc_key_init_once':
: undefined reference to `pthread_cancel'
c:/devkitgp2x/bin/../lib/gcc/arm-linux/4.0.2\libgcc_eh.a(unwind-sjlj.o).data.rel.ro+0x0): undefined reference to `pthread_cancel'
//--------------------------------------------------------------------------------------------------------------
Any ideas?
Last edited by a moderator: