digitalmars.D - D+Ubuntu+SDL_image said undefined reference
- alisue (20/20) Dec 29 2009 Hi. I'm new to D and I tried to use D with SDL_image(actually SDL_mixer ...
- alisue (10/10) Dec 29 2009 alisue Wrote:
- Michael P. (3/16) Dec 29 2009 How come you are not using something like rebuild or DSSS? This would he...
- Trass3r (2/3) Dec 29 2009 don't forget xfBuild ;)
- alisue (8/12) Dec 29 2009 Well... Because I haven't heard about them. I knew 'rebuild' and 'DSSS' ...
- Travis Boucher (6/23) Dec 30 2009 http://www.dsource.org/projects
- Jacob Carlborg (2/14) Dec 30 2009
- Clay Smith (7/24) Dec 30 2009 The easier D build system I've found is CDC, its simple and probably the...
Hi. I'm new to D and I tried to use D with SDL_image(actually SDL_mixer as well) but it doesn't work. I used SDL header of D on "D - porting (http://shinh.skr.jp/d/porting.html)" and I could build simple SDL application(Only using SDL, not with SDL_image) in Ubuntu. However when I use SDL_image or SDL_mixer, i got message like below: -------------------------------------------------------------------------- $ gdc -c hello.d -ISDL $ gdc -ohello hello.o -lSDL -lSDL_image hello.o: In function `_Dmain': hello.d:(.text+0x54): undefined reference to `IMG_GetError' hello.d:(.text+0x159): undefined reference to `SDL_BlitSurface' collect2: ld returned 1 exit status -------------------------------------------------------------------------- The message said 'IMG_GetError/SDL_BlitSurface' doesn't defined in lib however when I use C++, I could compile and run the program. And when I commented out 'IMG_GetError' and 'SDL_BlitSurface' in my source code, I could compile even I use 'IMG_Load' function which is in SDL_image :-( How can I fix this program. I have no idea. Can anyone help me? thanks. Env: Ubuntu 9.10 32bit & 64bit gdc 4.2.4 Installed: libsdl-1.2-dev libsdl-image1.2-dev p.s. I could build them on Mac OS X Snow Leopard with DMD. Using SDL.framework and SDL_image.framework.
Dec 29 2009
alisue Wrote: Wow. Solved. What I did is that compile SDL_video.d and SDL_image.d like: ------------------------------------------------------------------ $ gdc -c hello.d -ISDL $ gdc -c SDL/SDL_image.d -ISDL $ gdc -c SDL/SDL_video.d -ISDL $ gdc -ohello hello.o SDL_image.o SDL_video.o -lSDL -lSDL_image ----------------------------------------------------------------------- Having no idea but work :-)
Dec 29 2009
alisue Wrote:alisue Wrote: Wow. Solved. What I did is that compile SDL_video.d and SDL_image.d like: ------------------------------------------------------------------ $ gdc -c hello.d -ISDL $ gdc -c SDL/SDL_image.d -ISDL $ gdc -c SDL/SDL_video.d -ISDL $ gdc -ohello hello.o SDL_image.o SDL_video.o -lSDL -lSDL_image ----------------------------------------------------------------------- Having no idea but work :-)How come you are not using something like rebuild or DSSS? This would help having to avoid things like this. Also, why did you decide not to use Derelict?
Dec 29 2009
Michael P. schrieb:How come you are not using something like rebuild or DSSS?don't forget xfBuild ;)
Dec 29 2009
Trass3r Wrote:Michael P. schrieb:Well... Because I haven't heard about them. I knew 'rebuild' and 'DSSS' but I thought it might be too old (For Mac OS X 10.4.... I use Mac OS X 10.6 and Most of time when I try to use package for Mac OS X 10.4 they doesn't take a effort) So I just decide to use Ant(for now using Makefile but in future) and build all of .d file in src directory and manually link to lib. I knew it stupid but could't find the way. What is the best way to do it. Is DSSS not too old? or xfBuild???? P.S. Well... Where can I find some tutorial things? I found some but too old and can't compile. P.S. Derelict... seem good I'll try.How come you are not using something like rebuild or DSSS?don't forget xfBuild ;)
Dec 29 2009
alisue wrote:Trass3r Wrote:http://www.dsource.org/projects The 3 big ones I personally use are dsss, gtkd and derelict. Both gtkd an derelict do runtime linking (ie. dlopen()) and both work well under winderz as well (I test some of my crap in windows once in a while with minimal code changes, just some build cruft).Michael P. schrieb:Well... Because I haven't heard about them. I knew 'rebuild' and 'DSSS' but I thought it might be too old (For Mac OS X 10.4.... I use Mac OS X 10.6 and Most of time when I try to use package for Mac OS X 10.4 they doesn't take a effort) So I just decide to use Ant(for now using Makefile but in future) and build all of .d file in src directory and manually link to lib. I knew it stupid but could't find the way. What is the best way to do it. Is DSSS not too old? or xfBuild???? P.S. Well... Where can I find some tutorial things? I found some but too old and can't compile. P.S. Derelict... seem good I'll try.How come you are not using something like rebuild or DSSS?don't forget xfBuild ;)
Dec 30 2009
On 12/30/09 04:14, alisue wrote:Trass3r Wrote:DSSS works with Mac OS X 10.5 at lest.Michael P. schrieb:Well... Because I haven't heard about them. I knew 'rebuild' and 'DSSS' but I thought it might be too old (For Mac OS X 10.4.... I use Mac OS X 10.6 and Most of time when I try to use package for Mac OS X 10.4 they doesn't take a effort)How come you are not using something like rebuild or DSSS?don't forget xfBuild ;)So I just decide to use Ant(for now using Makefile but in future) and build all of .d file in src directory and manually link to lib. I knew it stupid but could't find the way. What is the best way to do it. Is DSSS not too old? or xfBuild???? P.S. Well... Where can I find some tutorial things? I found some but too old and can't compile. P.S. Derelict... seem good I'll try.
Dec 30 2009
alisue wrote:Trass3r Wrote:The easier D build system I've found is CDC, its simple and probably the most portable as well. http://www.dsource.org/projects/cdc dsource.org/projects/derelict There is also Dreadmoon.com, which provides a full linux distro suited for D ;)Michael P. schrieb:Well... Because I haven't heard about them. I knew 'rebuild' and 'DSSS' but I thought it might be too old (For Mac OS X 10.4.... I use Mac OS X 10.6 and Most of time when I try to use package for Mac OS X 10.4 they doesn't take a effort) So I just decide to use Ant(for now using Makefile but in future) and build all of .d file in src directory and manually link to lib. I knew it stupid but could't find the way. What is the best way to do it. Is DSSS not too old? or xfBuild???? P.S. Well... Where can I find some tutorial things? I found some but too old and can't compile. P.S. Derelict... seem good I'll try.How come you are not using something like rebuild or DSSS?don't forget xfBuild ;)
Dec 30 2009