digitalmars.D.learn - undefined reference - Derelict2
- sergeiV (23/23) May 05 2012 After succesful building of the Derelict libraries using: 'make
- sergeiV (5/28) May 05 2012 Solved, missed -of:
- sergeiV (7/43) May 05 2012 This is ofcourse enough:
- Jacob Carlborg (4/9) May 06 2012 I don't know, you should not need to specify the -of flag.
- Stanislav Blinov (5/10) May 07 2012 This is on Linux? Shouldn't it be something like
- sergeiV (6/8) May 07 2012 Thnx, this works.
- Trass3r (1/4) May 07 2012 You may try to use --chatty and compare the output.
- Mike Parker (4/10) May 07 2012 Well, it does. With all of the imports in a single directory, you don't
After succesful building of the Derelict libraries using: 'make -flinux.mak DC=dmd', I am unable to compile the provided example code: http://svn.dsource.org/projects/derelict/branches/Derelict2/doc/index.html They look like linker problems to me. rdmd test.d -Iinclude/Derelict2/import/ test.o:(.data+0x10): undefined reference to `_D8derelict6openal2al12__ModuleInfoZ' test.o:(.data+0x18): undefined reference to `_D8derelict6opengl2gl12__ModuleInfoZ' test.o: In function `_Dmain': test.d:(.text._Dmain+0x3d): undefined reference to `_D8derelict6openal2al10DerelictALC8derelict6openal2al16DerelictALLoader' test.d:(.text._Dmain+0x61): undefined reference to `_D8derelict6opengl2gl10DerelictGLC8derelict6opengl2gl16DerelictGLLoader' collect2: ld returned 1 exit status --- errorlevel 1 gdc gave an different kind of error: include/Derelict2/import/derelict/util/compat.di:64: Error: identifier 'c_long' is not defined Using a makefile generated errors similar to those for (r)dmd. dmd 2.059 derelict2 630
May 05 2012
On Saturday, 5 May 2012 at 23:42:36 UTC, sergeiV wrote:After succesful building of the Derelict libraries using: 'make -flinux.mak DC=dmd', I am unable to compile the provided example code: http://svn.dsource.org/projects/derelict/branches/Derelict2/doc/index.html They look like linker problems to me. rdmd test.d -Iinclude/Derelict2/import/ test.o:(.data+0x10): undefined reference to `_D8derelict6openal2al12__ModuleInfoZ' test.o:(.data+0x18): undefined reference to `_D8derelict6opengl2gl12__ModuleInfoZ' test.o: In function `_Dmain': test.d:(.text._Dmain+0x3d): undefined reference to `_D8derelict6openal2al10DerelictALC8derelict6openal2al16DerelictALLoader' test.d:(.text._Dmain+0x61): undefined reference to `_D8derelict6opengl2gl10DerelictGLC8derelict6opengl2gl16DerelictGLLoader' collect2: ld returned 1 exit status --- errorlevel 1 gdc gave an different kind of error: include/Derelict2/import/derelict/util/compat.di:64: Error: identifier 'c_long' is not defined Using a makefile generated errors similar to those for (r)dmd. dmd 2.059 derelict2 630Solved, missed -of: rdmd -Iinclude/Derelict2/import/ -Linclude/Derelict2/lib/libDerelictAL.a -Linclude/Derelict2/lib/libDerelictUtil.a -ofderelict_test test.d
May 05 2012
On Sunday, 6 May 2012 at 01:23:48 UTC, sergeiV wrote:On Saturday, 5 May 2012 at 23:42:36 UTC, sergeiV wrote:This is ofcourse enough: rdmd -Iinclude/Derelict2/import/ -oftest test.d (rdmd -Iinclude/Derelict2/import/ test.d FAILS) Could anybody explain why an output file specification is necessary? Or is this a bug?After succesful building of the Derelict libraries using: 'make -flinux.mak DC=dmd', I am unable to compile the provided example code: http://svn.dsource.org/projects/derelict/branches/Derelict2/doc/index.html They look like linker problems to me. rdmd test.d -Iinclude/Derelict2/import/ test.o:(.data+0x10): undefined reference to `_D8derelict6openal2al12__ModuleInfoZ' test.o:(.data+0x18): undefined reference to `_D8derelict6opengl2gl12__ModuleInfoZ' test.o: In function `_Dmain': test.d:(.text._Dmain+0x3d): undefined reference to `_D8derelict6openal2al10DerelictALC8derelict6openal2al16DerelictALLoader' test.d:(.text._Dmain+0x61): undefined reference to `_D8derelict6opengl2gl10DerelictGLC8derelict6opengl2gl16DerelictGLLoader' collect2: ld returned 1 exit status --- errorlevel 1 gdc gave an different kind of error: include/Derelict2/import/derelict/util/compat.di:64: Error: identifier 'c_long' is not defined Using a makefile generated errors similar to those for (r)dmd. dmd 2.059 derelict2 630Solved, missed -of: rdmd -Iinclude/Derelict2/import/ -Linclude/Derelict2/lib/libDerelictAL.a -Linclude/Derelict2/lib/libDerelictUtil.a -ofderelict_test test.d
May 05 2012
On 2012-05-06 03:43, sergeiV wrote:This is ofcourse enough: rdmd -Iinclude/Derelict2/import/ -oftest test.d (rdmd -Iinclude/Derelict2/import/ test.d FAILS) Could anybody explain why an output file specification is necessary? Or is this a bug?I don't know, you should not need to specify the -of flag. -- /Jacob Carlborg
May 06 2012
On Sunday, 6 May 2012 at 01:23:48 UTC, sergeiV wrote:Solved, missed -of: rdmd -Iinclude/Derelict2/import/ -Linclude/Derelict2/lib/libDerelictAL.a -Linclude/Derelict2/lib/libDerelictUtil.a -ofderelict_test test.dThis is on Linux? Shouldn't it be something like rdmd -Iinclude/Derelict2/import -L-Linclude/Derelict2/lib -L-lDerelictAL -L-lDerelictUtil -L-ldl test.d ?
May 07 2012
rdmd -Iinclude/Derelict2/import -L-Linclude/Derelict2/lib -L-lDerelictAL -L-lDerelictUtil -L-ldl test.dThnx, this works. Though I was under the impression that the new Derelict2 hierarchy / d interface files in Derelict2/import reduced the neccesity for command line arguments, that is a Derelict related question. Condsider this solved.
May 07 2012
Though I was under the impression that the new Derelict2 hierarchy / d interface files in Derelict2/import reduced the neccesity for command line arguments, that is a Derelict related question.You may try to use --chatty and compare the output.
May 07 2012
On 5/7/2012 8:53 PM, sergeiV wrote:Well, it does. With all of the imports in a single directory, you don't need to specify multiple import directories. But you will always need to link with the libraries. The import directory doesn't affect that.rdmd -Iinclude/Derelict2/import -L-Linclude/Derelict2/lib -L-lDerelictAL -L-lDerelictUtil -L-ldl test.dThnx, this works. Though I was under the impression that the new Derelict2 hierarchy / d interface files in Derelict2/import reduced the neccesity for command line arguments, that is a Derelict related question.
May 07 2012