Author Topic: Migration Problems  (Read 7175 times)

Offline Riddly

  • Single posting newcomer
  • *
  • Posts: 3
Migration Problems
« on: January 26, 2008, 08:18:48 pm »
I am used to programming in Xubuntu Linux with Anjuta... however, circumstances have forced me into Windows XP... as Anjuta isn't available for Windows, I decided to get Code Blocks; among other things maybe I'll take it back with me. Anyways, I'm trying to build my project which has dependencies on SDL, SDL_Image, SDL_Gfx, and Box2d. Now I've tried take care of this myself, but despite my efforts I have ended up with the following error message:
Quote
undefined reference to 'SDL_strlcpy'
undefined reference to 'SDL_GetError'
undefined reference to 'SDL_SetModuleHandle'
undefined reference to 'SDL_strlcpy'
undefined reference to 'SDL_strlcat'
undefined reference to 'SDL_strlcpy'
undefined reference to 'SDL_strlcat'
undefined reference to 'SDL_strlcpy'
I know that there are no problems with Box2d... I am very sure of that. So if anyone could point me to a guide or tell me what I did wrong or something?

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Migration Problems
« Reply #1 on: January 26, 2008, 09:57:02 pm »
Assuming that you have setup the link libraries correctly, keep in mind that libraries link order matters.
Be patient!
This bug will be fixed soon...

Offline Riddly

  • Single posting newcomer
  • *
  • Posts: 3
Re: Migration Problems
« Reply #2 on: January 28, 2008, 12:29:04 am »
I have setup the link libraries correctly as far as I can tell, and appon reading your message corrected the order, as far as I can tell, but I still cant get it to work, getting the new message...
Quote
Project   : SDL Application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\Owner\Desktop\src\
--------------------------------------------------------------------------------
Switching to target: default
Linking console executable: SDLapp.exe
.objs\main.o:main.cc:(.text+0x261): undefined reference to `_imp__rotozoomSurface'
.objs\main.o:main.cc:(.text+0x28f): undefined reference to `_imp__rotozoomSurfaceXY'
.objs\main.o:main.cc:(.text+0x2e2): undefined reference to `_imp__zoomSurface'
.objs\main.o:main.cc:(.text+0x52f): undefined reference to `_imp__SDL_initFramerate'
.objs\main.o:main.cc:(.text+0x5ba): undefined reference to `b2World::b2World(b2AABB const&, b2Vec2 const&, bool)'
.objs\main.o:main.cc:(.text+0x6b2): undefined reference to `b2World::CreateBody(b2BodyDef const*)'
.objs\main.o:main.cc:(.text+0x7ef): undefined reference to `b2World::CreateBody(b2BodyDef const*)'
.objs\main.o:main.cc:(.text+0x8be): undefined reference to `b2World::CreateBody(b2BodyDef const*)'
.objs\main.o:main.cc:(.text+0x98d): undefined reference to `b2World::CreateBody(b2BodyDef const*)'
.objs\main.o:main.cc:(.text+0x9bc): undefined reference to `IMG_Load'
.objs\main.o:main.cc:(.text+0x9ea): undefined reference to `IMG_Load'
.objs\main.o:main.cc:(.text+0xa18): undefined reference to `IMG_Load'
.objs\main.o:main.cc:(.text+0xa46): undefined reference to `IMG_Load'
.objs\main.o:main.cc:(.text+0xb1c): undefined reference to `_imp__boxRGBA'
.objs\main.o:main.cc:(.text+0xb47): undefined reference to `b2World::Step(float, int)'
.objs\main.o:main.cc:(.text+0xcee): undefined reference to `_imp__SDL_framerateDelay'
.objs\main.o:main.cc:(.text+0xd1c): undefined reference to `b2World::~b2World()'
.objs\main.o:main.cc:(.text+0xd5b): undefined reference to `b2World::~b2World()'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

Offline Belgabor

  • Multiple posting newcomer
  • *
  • Posts: 90
Re: Migration Problems
« Reply #3 on: February 02, 2008, 06:47:23 am »
Is SDL compiled as a static or as a dynamic lib?

Offline Riddly

  • Single posting newcomer
  • *
  • Posts: 3
Re: Migration Problems
« Reply #4 on: February 02, 2008, 03:25:49 pm »
I dunno... whatever the SDL site supplies it as... probably dynamic...

Offline Belgabor

  • Multiple posting newcomer
  • *
  • Posts: 90
Re: Migration Problems
« Reply #5 on: February 02, 2008, 04:59:27 pm »
Hm, then it looks like you missed to link a lib. You could try to search for the missing symbols inside the library files of SDL. Unfortunately the explorer serach inside function doesn't work properly for binary files anymore on XP, in win2000 it worked correctly (and the threaded search of CB crashes it if you try to search in .a). So you'll need some other utility to perform the search (grep in msys works for example).

Offline surfinbird

  • Single posting newcomer
  • *
  • Posts: 8
Re: Migration Problems
« Reply #6 on: February 02, 2008, 04:59:49 pm »
most likely a library is missing, try to find the missing functions in the reference manual, find out in which library they are put and check if you have added this library in your linker options (make sure you did it both for release and debug targets)