View previous topic :: View next topic |
Author |
Message |
Sakar
Joined: 21 May 2011 Posts: 1
|
Posted: Sat May 21, 2011 11:39 am Post subject: Undefined Symbols in CodeBlocks |
|
|
Hello, I'm using Code::Blocks to get started with D. However, I am having trouble linking my code which uses Derelict.
My code:
Code: | import derelict.opengl.gl;
void main()
{
DerelictGL.load();
} |
The output log is below
Quote: | J:\D\Derelict2\lib\DerelictGL.lib(gl)
Error 42: Symbol Undefined __d_throw@4
J:\D\Derelict2\lib\DerelictGL.lib(gl)
Error 42: Symbol Undefined _D3std6string4findFAaAaZi
J:\D\Derelict2\lib\DerelictGL.lib(gl)
Error 42: Symbol Undefined _D3std6string9toStringzFAaZPa
J:\D\Derelict2\lib\DerelictGL.lib(gl)
Error 42: Symbol Undefined _D6object6Object8opEqualsMFC6ObjectZi
J:\D\Derelict2\lib\DerelictGL.lib(gl)
Error 42: Symbol Undefined _D9ClassInfo6__vtblZ
J:\D\Derelict2\lib\DerelictGL.lib(gl)
Error 42: Symbol Undefined _D6object6Object5printMFZv
J:\D\Derelict2\lib\DerelictGL.lib(gl)
Error 42: Symbol Undefined _D6object6Object8toStringMFZAa
J:\D\Derelict2\lib\DerelictUtil.lib(exception)
Error 42: Symbol Undefined _D6object9Exception5_ctorMFAaZC9Exception
J:\D\Derelict2\lib\DerelictUtil.lib(exception)
Error 42: Symbol Undefined _D6object9Exception8toStringMFZAa
J:\D\Derelict2\lib\DerelictUtil.lib(exception)
Error 42: Symbol Undefined _D6object9Exception5printMFZv
J:\D\Derelict2\lib\DerelictUtil.lib(loader)
Error 42: Symbol Undefined _D3std6string6striprFAaZAa
J:\D\Derelict2\lib\DerelictUtil.lib(loader)
Error 42: Symbol Undefined _D3std6string5splitFAaAaZAAa
J:\D\Derelict2\lib\DerelictUtil.lib(loader)
Error 42: Symbol Undefined _D3std6string6striplFAaZAa |
I'm unsure why it can't find the symbols. I built the Derelict2 source and am using D2. The library and .di files are setup in the project settings.
Any help is very appreciated |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sat May 21, 2011 11:31 pm Post subject: |
|
|
It's finding the Derelict libraries just fine. That's why you see the full path to each library. The missing symbols in those error messages are all Phobos functions that Derelict uses internally. It appears your DMD installation is misconfigured. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
mweber1488
Joined: 10 Jun 2008 Posts: 15
|
Posted: Fri Feb 03, 2012 9:51 am Post subject: |
|
|
I have been having a similar issue (using windows). I am getting the following link errors in codeblocks and with just a simple batch file.
Code: | C:\dmd2\src\derelict\lib\DerelictUtil.lib(loader)
Error 42: Symbol Undefined _D3std6string9toStringzFAyaZPya
C:\dmd2\src\derelict\lib\DerelictUtil.lib(array)
Error 42: Symbol Undefined _D3std3utf12UtfException6__ctorMFAyaAwXC3std3utf12Ut
fException
C:\dmd2\src\derelict\lib\DerelictUtil.lib(array)
Error 42: Symbol Undefined _D3std3utf12UtfException7__ClassZ
C:\dmd2\src\derelict\lib\DerelictUtil.lib(string)
Error 42: Symbol Undefined _D3std3uni10toUniLowerFwZw
C:\dmd2\src\derelict\lib\DerelictUtil.lib(string)
Error 42: Symbol Undefined _D3std3utf6decodeFNexAaKkZw
--- errorlevel 5 |
If put the phobos library onto the command line I now get:
Code: | C:\dmd2\src\derelict\lib\DerelictUtil.lib(loader)
Error 42: Symbol Undefined _D3std6string9toStringzFAyaZPya
--- errorlevel 1 | I have tried to recreate this myself but both versions of toStringz compiles fine in my test code as long as I include phobos on the command line. |
|
Back to top |
|
|
aldacron
Joined: 05 May 2004 Posts: 1322 Location: Seoul, South Korea
|
Posted: Sat Feb 04, 2012 3:19 am Post subject: |
|
|
Nothing I can do about these sorts of linker errors other than to advise you to make sure your environment is configured properly. You should never have to add phobos to the command line. If you have multiple installations of DMD, that could be where the root of the problem lies. _________________ The One With D | The One With Aldacron | D Bits |
|
Back to top |
|
|
|