mex file creation from 32 to 64 bits
4 ビュー (過去 30 日間)
古いコメントを表示
Hi,
The mex files (mexw32) can be created smoothly on a 32bit machine. But I failed to create the same mex files on a 64 bit one. I should have all the relevant files or else it wouldn't work on a 32 bit machine.
Does anyone know if the obj or c files need to be edited differently for a 64 bits machine?
More specifically, I keep getting the following error.
affine_transform_3d_double.obj : error LNK2019: unresolved external symbol interpolate_3d_double_gray referenced in function transformvolume affine_transform_3d_double.mexw64 : fatal error LNK1120: 1 unresolved externals
C:\PROGRA~1\MATLAB\R2011B\BIN\MEX.PL: Error: Link of 'affine_transform_3d_double.mexw64' failed.
Thanks!! Stephen
0 件のコメント
回答 (2 件)
Kaustubha Govind
2012 年 9 月 17 日
You do need to have all object/library files that you are linking against to also be of 64-bit architecture, so you need to re-compile them if you only have 32-bit versions.
0 件のコメント
Stephen Yip
2012 年 9 月 17 日
3 件のコメント
Walter Roberson
2012 年 9 月 17 日
Though it depends on what the C does and has it is written. Some C code would simply need to be recompiled. Some would need to have some data types changed to avoid using more space than originally expected. Some code that interacted with the operating system would need to have minor changes to names of the routines that are called. But there are some kinds of code that need extensive changes.
Jan
2012 年 9 月 18 日
編集済み: Jan
2012 年 9 月 18 日
I assume James meant that a mexw32 cannot be converted to a mexw64 file, while Walter explains, that a C-source, which compiles successfully for a 32-bit compiler need sometimes modifications to work with a 64-bit compiler also.
I confirm both. There is no simple way to convert C-code and no way at all to convert compiled libraries.
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!