[scilab-Users] Link error 236

Mike Page Mike at Page-One.Waitrose.com
Wed May 11 11:05:41 CEST 2011


Hi,

After some experimentation and some great suggestions from Allan Cornet (thanks, Allan!) this problem seems to be due to the following scenario:

My C code includes the FFTW library libfftw3-3.dll, so this is referenced within my DLL (foo.dll).  Scilab itself uses the same FFTW library.  When Scilab tries to load my DLL, it also tries to load my FFTW library, but this is already loaded.  This gives rise to duplicate DLL entry points.

The simple workaround is to use a different library - this can be done by rebuilding FFTW with a different name (e.g. MyFftw.dll and MyFftw.lib) and then using that within my C code.

Scilab could be a bit more discriminating in its choice of error message when a DLL fails to load.  "File does not exist" is a bit misleading here...

Regards,
Mike.


-----Original Message-----
From: Mike Page [mailto:Mike at Page-One.Waitrose.com]
Sent: 10 May 2011 09:29
To: users at lists.scilab.org
Subject: RE: [scilab-Users] Link error 236


Hi Allan,

Here are the two results.  I have snipped out the "RAW DATA" sections from the dumpbin output to keep the size of the zip file small.  Let me know if you want to see them.

I have to say that this dumpbin output does look quite different from a DLL file that loads correctly, so I guess I have a compiler setting wrong somewhere...

Regards,
Mike.


-----Original Message-----
From: Allan CORNET [mailto:allan.cornet at scilab.org]
Sent: 10 May 2011 07:19
To: users at lists.scilab.org
Subject: RE: [scilab-Users] Link error 236


Hi,

Please attach result of

[a,b]=getdebuginfo()   from scilab

And from a dos shell

dumpbin /all foo.dll > dump.txt

and send to me dump.txt file

Thanks

Allan

-----Message d'origine-----
De : Mike Page [mailto:Mike at Page-One.Waitrose.com] 
Envoyé : lundi 9 mai 2011 21:24
À : users at lists.scilab.org
Objet : RE: [scilab-Users] Link error 236

Hi Allan,

Thanks for your reply.  Unfortunately the source for the DLL belongs to a client so I cannot publish it.  I will try to strip the source back to some essential part that removes anything proprietary and try that.  If it gives the same error, then I will zip it up and put it here for you to look at.

I'm not sure about the dependency problem.  When I analyse it with depends.exe, there are only two unresolved (delay loaded) DLLs and these are also present in a DLL that loads correctly without error.  I'm sure they are never loaded and so would not cause a problem.

Do you know if there is anywhere that logging information would be written that might give me a clue?

Regards,
Mike.


-----Original Message-----
From: allan.cornet at scilab.org [mailto:allan.cornet at scilab.org]
Sent: 09 May 2011 19:08
To: users at lists.scilab.org
Subject: Re: [scilab-Users] Link error 236


 Hi,

 Can you attach and send to (as .zip) your dll ?

 I suspect a trouble of dependencies but in this case, error message is  wrong

 Thanks

 Allan

 On Mon, 9 May 2011 17:11:13 +0100, "Mike Page" 
 <Mike at Page-One.Waitrose.com> wrote:
> Hi,
>
> I have a problem loading a DLL from Scilab.  I have successfully 
> loaded other DLLs, but this one fails to load.  It gives the error:
>
> --> link ("foo.dll", func, "c");
> "link: The file foo.dll does not exist"
> "                            !--error 236"
> "link: The shared archive was not loaded: Unknown error"
>
> If I enter the command "ls", the file foo.dll is listed, so it does 
> exist.
> If I run depends.exe on the DLL, the entry points match the list in 
> "func".
>
> Any suggestions for what might cause this error?
>
> Thanks,
> Mike.

No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.900 / Virus Database: 271.1.1/3622 - Release Date: 05/08/11 19:34:00



No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.900 / Virus Database: 271.1.1/3626 - Release Date: 05/09/11 07:35:00

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.900 / Virus Database: 271.1.1/3626 - Release Date: 05/09/11 07:35:00

  




More information about the users mailing list