Question: define_external

Hi everyone. Forgive me for bad english, but it's important to solve one problem. Here is my Maple-code: >restart; define_external(WATCOM); Integral := define_external('periodic_integral','FORTRAN','eps'::float[8], 'Low_1'::float[8],'High_1'::float[8],'Under_I_1'::PROC('x'::float[8],'RETURN'::float[8]), 'WRAPPER','REPLY_1'::float[8],'LIB'="D:/Integral/Debug/Integral.dll"); eps:=10e-5: a:=0.: b:=10.: Under:=proc(x) RETURN(cos(x)*sin(x)) end proc: Reply:=0: Integral(eps,a,b,Under,'Reply'); print(Reply); Procedure "periodic_integral" is written in Fortran, debugged and working, but as the actual parameter requires a call to another function "Under_I_1" to calculate its value at some point, like "Under_I_1(0.5)". The problem is that I can not pass as an actual parameter Maple-function "Under", described above. I read the "Maple_Advanced_Programming_Guid" and tried everything, so the last example should work, but it works only when "Under_I_1" - just a constant of type float[8] (equivalent REAL(8) in Fortran). Maple gives an error: Error, compiler command C:\watcom-1.3\binnt\wcl386 -c -bd -DM_DECL=__stdcall -DM_CDECL=__cdecl -i="C:\watcom-1.3\h;C:\watcom-1.3\h\nt;C:\watcom-1.3\maple11.00\include" mwrap_periodic_integral.c -fo=mwrap_periodic_integral.obj returned error code 1 and reported: Open Watcom C/C++32 Compile and Link Utility Version 1.3 Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved. Source code is available under the Sybase Open Watcom Public License. See http://www.openwatcom.org/ for details. wcc386 mwrap_periodic_integral.c -bd -DM_DECL=__stdcall -DM_CDECL=_... Without "define_external(WATCOM);" Maple gives error: Error, compiler command cl -LD -Gz -Gy -I""C:\Program Files\Maple 11\extern\include"" -Femwrap_periodic_integral.dll mwrap_periodic_integral.c /link /export:MWRAP_periodic_integral "C:\Program Files\Maple 11\bin.win/maplec.lib" returned error code 1 and reported: Without parameter 'WRAPPER' Maple gives error: Error, AUTO definitions cannot handle callbacks Anyone solved this problem? Will this work without WATCOM?
Please Wait...