digitalmars.D.learn - Started to get 'Previous Definition Different' linking errors when
- MrSmith (41/41) May 19 2013 I am using Derelict for my GUI project and after moving to the
- MrSmith (2/2) May 19 2013 I have also tried to use previous versions of Derelict and
- evilrat (8/10) May 20 2013 you use old lib compiled with older dmd? or using same compiler
- evilrat (2/5) May 20 2013 wait, are you using 2.063 beta?
- MrSmith (4/5) May 21 2013 No, dmd 2.062.
I am using Derelict for my GUI project and after moving to the newest version i am getting following errors. These errors are occuring in debug mode only. Here is the log from Xamarin studio: Building: guitest (Debug) Performing main compilation... Current dictionary: C:\Documents\Projects\voxel\guitest C:\D\dmd2\windows\bin\dmd.exe -debug -gc "main.d" "fpshelper.d" "..\deps\lib\DerelictGLFW3.lib" "..\deps\lib\DerelictGL3.lib" "..\deps\lib\DerelictUtil.lib" "..\deps\lib\DerelictFI.lib" "..\deps\lib\DerelictFT.lib" "C:\Documents\Projects\voxel\dlib\bin\Debug\dlibd.lib" "C:\Documents\Projects\voxel\gui\bin\guid.lib" "C:\Documents\Projects\voxel\lib\Debug\libUtilsd.lib" "C:\Documents\Projects\voxel\lib\Debug\libCore.lib" "-IC:\D\dmd2\src\druntime\import" "-IC:\D\dmd2\src\phobos" "-I..\.." "-I..\deps" "-IC:\Documents\Projects\voxel\core" "-IC:\Documents\Projects\voxel\utils" "-IC:\Documents\Projects\voxel\gui" "-IC:\Documents\Projects\voxel\dlib" "-odobj\Debug" "-ofC:\Documents\Projects\voxel\guitest\bin\guitestd.exe" OPTLINK (R) for Win32 Release 8.00.12 Copyright (C) Digital Mars 1989-2010 All rights reserved. http://www.digitalmars.com/ctg/optlink.html C:\Documents\Projects\voxel\lib\Debug\libCore.lib(object) Offset 0570FH Record Type 0091 Error 1: Previous Definition Different : _D42C:\D\dmd2\src\druntime\import\object.di.4812__ModuleInfoZ C:\Documents\Projects\voxel\lib\Debug\libCore.lib(object) Offset 05815H Record Type 00C3 Error 1: Previous Definition Different : _D42C:\D\dmd2\src\druntime\import\object.di.487__arrayZ C:\Documents\Projects\voxel\lib\Debug\libCore.lib(object) Offset 05847H Record Type 00C3 Error 1: Previous Definition Different : _D42C:\D\dmd2\src\druntime\import\object.di.488__assertFiZv C:\Documents\Projects\voxel\lib\Debug\libCore.lib(object) Offset 05879H Record Type 00C3 Error 1: Previous Definition Different : _D42C:\D\dmd2\src\druntime\import\object.di.4815__unittest_failFiZv --- errorlevel 4
May 19 2013
I have also tried to use previous versions of Derelict and versions of my library.
May 19 2013
On Sunday, 19 May 2013 at 11:45:10 UTC, MrSmith wrote:I have also tried to use previous versions of Derelict and versions of my library.you use old lib compiled with older dmd? or using same compiler version you update derelict? anyway here is little tips: 1) every time you update ur dmd do full rebuild since some internals of the phobos API may frequently change. 2) do full rebuild anything that was used lib X before and after it's updated.
May 20 2013
On Monday, 20 May 2013 at 07:16:57 UTC, evilrat wrote:On Sunday, 19 May 2013 at 11:45:10 UTC, MrSmith wrote:I have tried to rebuild all libraries that i use. Even tried to build the project on newly created VM, but result is the same. Now i decided to try exlxlude files from LibCore until the problem disappears, to find the file that causes problem. Thanks for your answer!I have also tried to use previous versions of Derelict and versions of my library.you use old lib compiled with older dmd? or using same compiler version you update derelict? anyway here is little tips: 1) every time you update ur dmd do full rebuild since some internals of the phobos API may frequently change. 2) do full rebuild anything that was used lib X before and after it's updated.
May 20 2013
On Monday, 20 May 2013 at 11:09:53 UTC, MrSmith wrote:Now i decided to try exlxlude files from LibCore until the problem disappears, to find the file that causes problem. Thanks for your answer!I found where is a bug. It is old magic bug that a have magically fixed in the past. But seems that it wont be fixed. I had writeln statement in my code which was used to display all uniforms of the shader program. It can't be removed. When i remove it, the error from this topic occurs. Then i have replaced it with this writef("",uniforms); And then i had somehow commented it out. Until now. Now it seems that after total rebuild this bug has came out again. So, just for now i've put stub writeln at the place. It is magic!!
May 20 2013
On Monday, 20 May 2013 at 11:44:59 UTC, MrSmith wrote:I had writeln statement in my code which was used to display all uniforms of the shader program. It can't be removed. When i remove it, the error from this topic occurs.do you have referenced projects in xamarin? if so, any time you change something in one of such projects you need to rebuild whole solution, that one of many reasons why i don't use xamarin/mono-d
May 20 2013
On Monday, 20 May 2013 at 12:42:50 UTC, evilrat wrote:do you have referenced projects in xamarin? if so, any time you change something in one of such projects you need to rebuild whole solution, that one of many reasons why i don't use xamarin/mono-dYes, i have. This moment has started to annoy me. I think MonoDevelop has this feature, isn't it? Maybe i should use Visual-D. But this is not important at this moment. Maybe it is a compiler bug? When i will have enough time, i will try to distinguish the code which causes the problem into some small piece of code.
May 20 2013
On Monday, 20 May 2013 at 13:07:06 UTC, MrSmith wrote:On Monday, 20 May 2013 at 12:42:50 UTC, evilrat wrote:this is maybe caused by wrong linker usage, after all mono-d is primarily developed for linux? oh i see you also use -gc, in some cases it can add PITA. simple example is ctfe enums. try compile without -gc and -g, if this would work then it's really linker or compiler bug. monodevelop/xamarin is the same crap just after rebranding, it it mimics visual studio behavior, and i can confirm that in visual-d reference projects works fine, and you also has a debugger unlike mono-d O_- the only disappointing fact is that mono-d has the best code completion so far :( but really for my projects size this is not a big issue.do you have referenced projects in xamarin? if so, any time you change something in one of such projects you need to rebuild whole solution, that one of many reasons why i don't use xamarin/mono-dYes, i have. This moment has started to annoy me. I think MonoDevelop has this feature, isn't it? Maybe i should use Visual-D. But this is not important at this moment. Maybe it is a compiler bug? When i will have enough time, i will try to distinguish the code which causes the problem into some small piece of code.
May 20 2013
On Sunday, 19 May 2013 at 11:37:54 UTC, MrSmith wrote:I am using Derelict for my GUI project and after moving to the newest version i am getting following errors. These errors are occuring in debug mode only.wait, are you using 2.063 beta?
May 20 2013
On Tuesday, 21 May 2013 at 01:55:34 UTC, evilrat wrote:wait, are you using 2.063 beta?No, dmd 2.062. Similar problem here http://forum.dlang.org/thread/rlphljyhtcikzllrgvze forum.dlang.org
May 21 2013