calling C++ from within IDL [message #91726] |
Fri, 14 August 2015 13:15  |
dtakir
Messages: 4 Registered: August 2013
|
Junior Member |
|
|
Hello IDLers,
I was trying to compile the following code(from Mike Galloy's book):
float mg_callex_total(float arr[], int *n) {
int i;
float total = 0.0;
for(i = 0; i < *n; i++) total+=arr[i];
return(total);
}
to create a shared object, but I got the following errors. Anyone knows why I got these errors? Thanks in advance.
Driss
IDL> mg_make_dll, 'mg_callex_total.c'
'cl' is not recognized as an internal or external command,
operable program or batch file.
cl -D_DLL -DMSWIN -DWIN32 -D_MT /nologo /I"C:\Program Files\Exelis\IDL84\external\include" /c "C:\Users\dtakir\Desktop\idlC++Test\mg_callex_total.c" /Fo"mg_callex_total_5676_IGSWZAWGLT-ELEE.obj"
Could Not Find C:\Users\dtakir\.idl\idl\compile_dir-118-idl_8_4-win32-x86_6 4-m64-f64\mg_callex_total_5676_IGSWZAWGLT-ELEE.exp
Could Not Find C:\Users\dtakir\.idl\idl\compile_dir-118-idl_8_4-win32-x86_6 4-m64-f64\mg_callex_total_5676_IGSWZAWGLT-ELEE.lib
Could Not Find C:\Users\dtakir\.idl\idl\compile_dir-118-idl_8_4-win32-x86_6 4-m64-f64\mg_callex_total_5676_IGSWZAWGLT-ELEE.obj
IDL>
|
|
|
|
|
Re: calling C++ from within IDL [message #91736 is a reply to message #91734] |
Tue, 18 August 2015 09:04  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 8/17/15 3:27 PM, Paul van Delst wrote:
> On 08/15/15 10:39, Michael Galloy wrote:
>> I don't think you have the correct compiler. Download Visual Studio
>> Community from:
>>
>> https://www.visualstudio.com/en-US/products/visual-studio-ex press-vs
>
> Totally OT - and definitely not directed at your projects, Mike - but I
> was just reading this the other day:
>
> http://opensource.com/life/15/7/why-your-open-source-project -failing
>
> about a talk Tom Callaway gave at OSCON. One of the points mentioned was:
>
> <quote>
> Callaway said projects fail:
> * If your code depends on Microsoft Visual Anything (you get 100
> points of fail)
> </quote>
>
> Not sure if that's tongue-in-cheek or not... :o)
>
> cheers,
>
> paulv
I agree that supporting Windows is a pain. (Actually, one of my
"someday" tasks is to actually build my library on Windows. I don't
think there are any roadblocks, but I have no doubt that it will take me
days if not weeks or more to get it actually building.) Unfortunately, a
lot of people use it though, and I'm not aware of another Windows
compiler that is not even more pain. You would not believe that the
steps we had to take to prepare a machine to do Windows builds via
cygwin at a previous job.
Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
|
|
|