www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D SFML2 derelict

reply "strongdrink" <strongdrinkdev gmail.com> writes:
(First, sorry for not using code tags.. please let me know how to 
do them) :)

Hey guys, I am fairly new to the D language... and am trying to 
compile a small D SFML2 program. I installed derelict and such 
already...


CEST 2012 x86_64 GNU/Linux

import derelict.sfml2.system;

int main() {
         return 0;
}


hello.o:(.data+0x10): undefined reference to 
`_D8derelict5sfml26system12__ModuleInfoZ'
collect2: error: ld returned 1 exit status
--- errorlevel 1


It looks like it didn't link the libs properly or something.

compiled with:
dmd hello.d

Thanks for any help
Jul 03 2012
next sibling parent "Mike Parker" <aldacron gmail.com> writes:
On Tuesday, 3 July 2012 at 14:10:42 UTC, strongdrink wrote:
 (First, sorry for not using code tags.. please let me know how 
 to do them) :)

 Hey guys, I am fairly new to the D language... and am trying to 
 compile a small D SFML2 program. I installed derelict and such 
 already...


 CEST 2012 x86_64 GNU/Linux

 import derelict.sfml2.system;

 int main() {
         return 0;
 }


 hello.o:(.data+0x10): undefined reference to 
 `_D8derelict5sfml26system12__ModuleInfoZ'
 collect2: error: ld returned 1 exit status
 --- errorlevel 1


 It looks like it didn't link the libs properly or something.

 compiled with:
 dmd hello.d

 Thanks for any help
dmd hello.d -L-lDerelictSFML -L-lDerelictUtil -L-ldl Then before you can use sFML System you need to call DerelictSFMLSystem.load(). This holds true for any Derelict binding you use (DerelictSFMLWindow.load(), DerelictGL3.load() and so on). Also, Derelict questions should be directed to the Derelict forum: http://www.dsource.org/forums/viewforum.php?f=19
Jul 03 2012
prev sibling parent Trass3r <un known.com> writes:
 compiled with:
 dmd hello.d
rdmd hello.d
Jul 05 2012