From: Andreu Mora on
Hi guys,

Thanks for answering! Well, the DependencyWalker shows everything in black, except a warning for MSJAVA.DLL, which I looked for and seems to be normal, according to the DependencyWalker website. Moreover, I have this piece of code running in another machine and the analysis there is exactly the same...(I didn't compile on that machine though, I had the right MEX).
For succeeding in the compilation I had to use the NODEFAULTLIB flag, don't know if this can affect...

Thanks a lot!

Andreu

ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <29fad9ce-006c-4e0e-a59a-5ae69d34219d(a)k19g2000yqm.googlegroups.com>...
> Jan:
> The "walker" part of Dependency Walker means that it traces down all
> the dependencies, so yes, if something were missing, it would notice
> that and flag it as red color, and if it does find it, it's listed in
> a normal black color.
From: Jan Simon on
Dear Andreu!

> For succeeding in the compilation I had to use the NODEFAULTLIB flag, don't know if this can affect...

What happens, if you do not use the NODEFAULTLIB flag?

Jan
From: Andreu Mora on
"Jan Simon" <matlab.THIS_YEAR(a)nMINUSsimon.de> wrote in message <hrpmvt$t45$1(a)fred.mathworks.com>...
> Dear Andreu!
>
> > For succeeding in the compilation I had to use the NODEFAULTLIB flag, don't know if this can affect...
>
> What happens, if you do not use the NODEFAULTLIB flag?
>
> Jan

Dear Jan,

Here I paste the trace of the linker error that I get if I don't use the NODEFAULTLIB flag. If I use it, I can compile, link and create he MEX with no problems.

Thanks a lot,

Andreu

LINK : xl_sunmoon.mexw32 not found or not built by the last incremental link; performing full link
LIBCMT.lib(crtheap.obj) : error LNK2005: __malloc_crt already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: __initterm_e already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_a already defined in MSVCRT.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xi_z already defined in MSVCRT.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_a already defined in MSVCRT.lib(cinitexe.obj)
LIBCMT.lib(crt0init.obj) : error LNK2005: ___xc_z already defined in MSVCRT.lib(cinitexe.obj)
LIBCMT.lib(winxfltr.obj) : error LNK2005: ___CppXcptFilter already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(tidtable.obj) : error LNK2005: __encoded_null already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(dosmap.obj) : error LNK2005: __errno already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(mlock.obj) : error LNK2005: __unlock already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(mlock.obj) : error LNK2005: __lock already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(atox.obj) : error LNK2005: _atoi already defined in MSVCRT.lib(MSVCR90.dll)
LIBCMT.lib(strtol.obj) : error LNK2005: _strtol already defined in MSVCRT.lib(MSVCR90.dll)
Creating library C:\DOCUME~1\matlab\CONFIG~1\Temp\mex_7EDFD33A-F61B-43B5-0781-7F5EAAEB76A3\templib.x and object C:\DOCUME~1\matlab\CONFIG~1\Temp\mex_7EDFD33A-F61B-43B5-0781-7F5EAAEB76A3\templib.exp
LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
xl_sunmoon.mexw32 : fatal error LNK1120: 1 unresolved externals
From: Rune Allnor on
On 4 Mai, 12:59, "Andreu Mora" <andreu.m...(a)gmail.com> wrote:
> Hi all,
>
> I had to create a MEX file from C code, using external libraries, and also installing Microsoft VC++ compiler.
>
> I have succeeded compiling the MEX file, after linking all the libraries, solving problems with DLLs and this stuff. The MEX file is hence created.
>
> When I call the MEX file, Matlab claims it is not a valid file, that cannot find the specified module.

Handling DLLs is a PITA, as they might have to be installed
correctly to be used. That is, you might need to run some sort
of set-up program in order to register the DLL with the OS before
you can use it.

And no, don't ask me how to do that - I don't know. You should
have a word with whoever made the DLL you use.

Rune
From: Andreu Mora on
Hi Rune,

Thanks for your comment. I know the OS recognizes the DLLs, since they are in the path and DependencyWalker finds them. If they are not there, then DW complains.
If it was the OS, neither DW nor Matlab would recognize the DLLs, so it wouldn't compile and link. The problem is on execution.
Must be any other thing...

Thanks a lot,

Andreu


Rune Allnor <allnor(a)tele.ntnu.no> wrote in message <477baba4-194e-4a79-876b-9fe9469ba5cf(a)b7g2000yqk.googlegroups.com>...
> On 4 Mai, 12:59, "Andreu Mora" <andreu.m...(a)gmail.com> wrote:
> > Hi all,
> >
> > I had to create a MEX file from C code, using external libraries, and also installing Microsoft VC++ compiler.
> >
> > I have succeeded compiling the MEX file, after linking all the libraries, solving problems with DLLs and this stuff. The MEX file is hence created.
> >
> > When I call the MEX file, Matlab claims it is not a valid file, that cannot find the specified module.
>
> Handling DLLs is a PITA, as they might have to be installed
> correctly to be used. That is, you might need to run some sort
> of set-up program in order to register the DLL with the OS before
> you can use it.
>
> And no, don't ask me how to do that - I don't know. You should
> have a word with whoever made the DLL you use.
>
> Rune
First  |  Prev  |  Next  |  Last
Pages: 1 2 3
Prev: ode with boundaries
Next: trisurf matlab