Re: Pros & cons of methods 1) DLM and 2) Call_External of calling C from IDL [message #93499 is a reply to message #93477] |
Mon, 08 August 2016 00:42   |
neil salmon
Messages: 20 Registered: August 2011
|
Junior Member |
|
|
I'm trying to use the Call_external route but to start with i'm trying to create the dll for mg_callex_total.c using the make_dll.
-------------------------------------------------
The source code is:
CD, current=working_directory ; Sets current working directory
make_dll, 'mg_callex_total', 'IDL_Load', INPUT_DIRECTORY=working_directory+'\test_call_external' , CC='gcc -c -fPIC %C -o %O', $
OUTPUT_DIRECTORY = working_directory+'\test_call_external', $
COMPILE_DIRECTORY = working_directory+'\test_call_external'
end
----------------------------------------------------
I've change compile and output directories so i'm not messing files up in other parts of the system.
----------------------------------------------------
The response from IDL is:
IDL> .GO
C:\USERS\NEIL\DOCUMENTS\IDL\test_call_external\mg_callex_tot al.c:1:0: warning: -fPIC ignored for target (all code is position independent)
float mg_callex_total(float arr[], int *n) {
^
link: extra operand `/nodefaultlib'
Try `link --help' for more information.
gcc -c -fPIC " C:\USERS\NEIL\DOCUMENTS\IDL\test_call_external\mg_callex_tot al.c " -o "mg_callex_total_6704_NEIL-THINK.obj"
link /out:"mg_callex_total_6704_NEIL-THINK.dll" /nologo /nodefaultlib /dll "mg_callex_total_6704_NEIL-THINK.obj" /def:"mg_callex_total_6704_NEIL-THINK.def" "C:\Program Files (x86)\RSI\IDL60\bin\bin.x86\idl32.lib" msvcrt.lib kernel32.lib
Could Not Find C:\Users\Neil\Documents\IDL\test_call_external\mg_callex_tot al_6704_NEIL-THINK.exp
Could Not Find C:\Users\Neil\Documents\IDL\test_call_external\mg_callex_tot al_6704_NEIL-THINK.lib
------------------------------------------------------------ ----------------
Could anyone suggest what i've done wrong.
many thanks,
neil
|
|
|