Linux RedHat 5 Enterprise - R2013a - LoadLibrary Error

Anyone have any insight on how to troubleshoot this error? This is the only command in thunk.m: loadlibrary('librefprop','header.h','mfilename','rp_proto64')
>> thunk
Error using loadlibrary (line 419)
Building librefprop_thunk_glnxa64 failed. Compiler output is:
gcc -I"/g/software/matlab/r2013a/extern/include" -D_GNU_SOURCE -fexceptions -fPIC -fno-omit-frame-pointer -pthread -I"/scratch/nkampy/refprop" -I"/scratch/nkampy/refprop" "librefprop_thunk_glnxa64.c"
-o "librefprop_thunk_glnxa64.so" -Wl,-E -shared
In file included from librefprop_thunk_glnxa64.c:23:0:
header.h:1:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'setupdll_'
header.h:2:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'setrefdll_'
In file included from librefprop_thunk_glnxa64.c:23:0:
header.h:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'setmixdll_'
header.h:4:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'setmoddll_'
header.h:5:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'setpathdll_'
header.h:6:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gerg04dll_'
header.h:7:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'setktvdll_'
header.h:8:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'getktvdll_'
header.h:9:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'getfijdll_'
header.h:10:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'preosdll_'
header.h:11:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'setagadll_'
header.h:12:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'unsetagadll_'
header.h:13:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'namedll_'
header.h:14:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pureflddll_'
header.h:15:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'setncdll_'
header.h:16:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'rpversion_'
header.h:18:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'critpdll_'
header.h:20:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'thermdll_'
header.h:21:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'therm2dll_'
In file included from librefprop_thunk_glnxa64.c:23:0:
header.h:22:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'therm3dll_'
header.h:23:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'therm0dll_'
header.h:24:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pressdll_'
header.h:25:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'enthaldll_'
header.h:26:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'entrodll_'
header.h:27:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cvcpdll_'
header.h:28:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'gibbsdll_'
header.h:29:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'agdll_'
header.h:30:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'residualdll_'
header.h:31:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cp0dll_'
header.h:33:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'dpdddll_'
header.h:34:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'dpdd2dll_'
header.h:35:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'dpdtdll_'
header.h:36:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'dddpdll_'
header.h:37:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'dddtdll_'
header.h:38:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'dhd1dll_'
header.h:39:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'virbdll_'
header.h:40:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'vircdll_'
header.h:41:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'virbadll_'
header.h:42:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'vircadll_'
header.h:
Here are the first few lines of header.h:
void __cdecl setupdll_ ( long *, char [ 10000 ], char [ 255 ], char [ 3 ], long *, char [ 255 ], long , long , long , long );
void __cdecl setrefdll_ ( char [ 3 ], long *, double *, double *, double *, double *, double *, long *, char [ 255 ], long , long );
void __cdecl setmixdll_ ( char [ 255 ], char [ 255 ], char [ 3 ], long *, char [ 10000 ], double *, long *, char [ 255 ], long , long , long , long , long );
void __cdecl setmoddll_ ( long *, char [ 3 ], char [ 3 ], char [ 60 ], long *, char [ 255 ], long , long , long , long );
void __cdecl setpathdll_ ( char [ 255 ], long );

 Réponse acceptée

Nathan
Nathan le 23 Avr 2014

0 votes

The correction was to remove the __cdecl stack command all together. It turns out that linux gcc normally adds this in automatically for 64 bit systems making it redundant. (the best I could understand)

Plus de réponses (0)

Catégories

En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by