www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - a linking error very hard to understand and solve...

reply Jean-Yves Vion-Dury <jean-yves.vion-dury naverlabs.com> writes:
Dear colleagues,
I cannot solve this compilation issue; the message is ambiguous, 
in this sense that one of the proposed sulution (line 81) is 
apparently the one exposed as problematic...

Any help much appreciated...
best,
Jean-Yves (and thanks to all contributors)

src\stores.d(178): Error: none of the overloads of 'spawnFiber' 
are callable using argument types (void delegate(LRMSFiber f), 
string, uint, string), candidates are:
src\fiberManager.d(77):        
fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) op)
src\fiberManager.d(81):        
fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) op, 
string name)
src\fiberManager.d(85):        
fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) op, 
string name, uint maxMsg)
src\fiberManager.d(89):        
fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) op, 
string name, uint maxMsg, string ioch)

--- errorlevel 1
Nov 02
next sibling parent reply user1234 <user1234 12.nl> writes:
On Thursday, 2 November 2017 at 11:13:34 UTC, Jean-Yves Vion-Dury 
wrote:
 Dear colleagues,
 I cannot solve this compilation issue; the message is 
 ambiguous, in this sense that one of the proposed sulution 
 (line 81) is apparently the one exposed as problematic...
I suppose you meant 89 ?
 Any help much appreciated...
 best,
 Jean-Yves (and thanks to all contributors)

 src\stores.d(178): Error: none of the overloads of 'spawnFiber' 
 are callable using argument types (void delegate(LRMSFiber f), 
 string, uint, string), candidates are:
 [...]
 src\fiberManager.d(89):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op, string name, uint maxMsg, string ioch)

 --- errorlevel 1
Nov 02
parent Jean-Yves Vion-Dury <jean-yves.vion-dury naverlabs.com> writes:
On Thursday, 2 November 2017 at 11:50:58 UTC, user1234 wrote:
 On Thursday, 2 November 2017 at 11:13:34 UTC, Jean-Yves 
 Vion-Dury wrote:
 Dear colleagues,
 I cannot solve this compilation issue; the message is 
 ambiguous, in this sense that one of the proposed sulution 
 (line 81) is apparently the one exposed as problematic...
I suppose you meant 89 ?
yes, indeed sorry
 Any help much appreciated...
 best,
 Jean-Yves (and thanks to all contributors)

 src\stores.d(178): Error: none of the overloads of 
 'spawnFiber' are callable using argument types (void 
 delegate(LRMSFiber f), string, uint, string), candidates are:
 [...]
 src\fiberManager.d(89):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op, string name, uint maxMsg, string ioch)

 --- errorlevel 1
Nov 02
prev sibling next sibling parent reply Biotronic <simen.kjaras gmail.com> writes:
On Thursday, 2 November 2017 at 11:13:34 UTC, Jean-Yves Vion-Dury 
wrote:
 src\stores.d(178): Error: none of the overloads of 'spawnFiber' 
 are callable using argument types (void delegate(LRMSFiber f), 
 string, uint, string), candidates are:
 src\fiberManager.d(77):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op)
 src\fiberManager.d(81):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op, string name)
 src\fiberManager.d(85):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op, string name, uint maxMsg)
 src\fiberManager.d(89):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op, string name, uint maxMsg, string ioch)
Is LRMSFiber the same type in all these cases? That is, do you have a type called LRMSFiber in more than one file? -- Biotronic
Nov 02
parent reply Jean-Yves Vion-Dury <jean-yves.vion-dury naverlabs.com> writes:
On Thursday, 2 November 2017 at 11:54:51 UTC, Biotronic wrote:

 Is LRMSFiber the same type in all these cases? That is, do you 
 have a type called LRMSFiber in more than one file?
Yes, it appears first in an interface (inside a module/file) definition and second in a class definition (inside another module/file)... does it matter ?
 --
   Biotronic
Nov 02
parent =?UTF-8?Q?Ali_=c3=87ehreli?= <acehreli yahoo.com> writes:
On 11/02/2017 05:54 AM, Jean-Yves Vion-Dury wrote:
 On Thursday, 2 November 2017 at 11:54:51 UTC, Biotronic wrote:
 
 Is LRMSFiber the same type in all these cases? That is, do you have a 
 type called LRMSFiber in more than one file?
Yes, it appears first in an interface (inside a module/file) definition and second in a class definition (inside another module/file)... does it matter ?
From the point of view of the type system, it's a coincidence that they have the same name but they are different types. Ali
Nov 02
prev sibling next sibling parent Joakim <dlang joakim.fea.st> writes:
On Thursday, 2 November 2017 at 11:13:34 UTC, Jean-Yves Vion-Dury 
wrote:
 Dear colleagues,
 I cannot solve this compilation issue; the message is 
 ambiguous, in this sense that one of the proposed sulution 
 (line 81) is apparently the one exposed as problematic...

 Any help much appreciated...
 best,
 Jean-Yves (and thanks to all contributors)

 src\stores.d(178): Error: none of the overloads of 'spawnFiber' 
 are callable using argument types (void delegate(LRMSFiber f), 
 string, uint, string), candidates are:
 src\fiberManager.d(77):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op)
 src\fiberManager.d(81):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op, string name)
 src\fiberManager.d(85):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op, string name, uint maxMsg)
 src\fiberManager.d(89):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op, string name, uint maxMsg, string ioch)

 --- errorlevel 1
This is not a linking error, it is a D compiler error message. Is it possible you have a template constraint on the function at line 89 that's causing it not to match? I've seen a similar problem lately with std.conv.to on AArch64 that I need to dig into.
Nov 02
prev sibling parent bauss <jj_1337 live.dk> writes:
On Thursday, 2 November 2017 at 11:13:34 UTC, Jean-Yves Vion-Dury 
wrote:
 Dear colleagues,
 I cannot solve this compilation issue; the message is 
 ambiguous, in this sense that one of the proposed sulution 
 (line 81) is apparently the one exposed as problematic...

 Any help much appreciated...
 best,
 Jean-Yves (and thanks to all contributors)

 src\stores.d(178): Error: none of the overloads of 'spawnFiber' 
 are callable using argument types (void delegate(LRMSFiber f), 
 string, uint, string), candidates are:
 src\fiberManager.d(77):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op)
 src\fiberManager.d(81):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op, string name)
 src\fiberManager.d(85):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op, string name, uint maxMsg)
 src\fiberManager.d(89):        
 fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) 
 op, string name, uint maxMsg, string ioch)

 --- errorlevel 1
Please post the full function definition of "fiberManager.FiberManager.spawnFiber(void delegate(LRMSFiber) op, string name, uint maxMsg, string ioch)" as well the call-side.
Nov 02