Group Abstract Group Abstract

Message Boards Message Boards

Can somebody please tell me why the Wolfram example code will not compile?

GROUPS:
Hi,

I am attempting to compile the example code at Create Standalone Executables Using Compiled Functions, but I'm getting errors suggesting, among other things that:
  • the example code is not correct,
  • that there are unknown variable types,
  • and that 'something' is missing before the unknown variable type.
I am fairly conversant with Mathematica, but C is new to me. I've just been attempting to learn it for the past few weeks or so. I've tried various compilers and their consoles (or lack thereof), and IDEs (or, again, the lack thereof) such as MinGW, Pelles C, and Cygwin.

My main compiler, and the only one the CCompiler function seems to recognize, is the MinGW one. This is what the CCompiler[ ] function gives me:
In[10]:= CCompilers[]

Out[10]= {{"Name" -> "MinGW",
  "Compiler" -> CCompilerDriver`MinGWCompiler`MinGWCompiler,
  "CompilerInstallation" -> "C:\\MinGW\\bin\\gcc.exe",
  "CompilerName" -> Automatic}}
These are my specific errors and the command(s) that gave them:
 In[8]:= Needs["CCompilerDriver`"];
 
 lopassExe =
  CreateExecutable[{fnSource, lopassmainSrcFile}, "lowpass",
   "TargetDirectory" -> targetDir,
   "Libraries" -> "WolframRTL_Static_Minimal"]
 
 During evaluation of In[8]:= CreateExecutable::cmperr: Compile error: C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\IncludeFiles\C/WolframLibrary.h:31:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' >>
 
During evaluation of In[8]:= CreateExecutable::cmperr: Compile error: C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\IncludeFiles\C/WolframLibrary.h:60:2: error: unknown type name 'mint' >>

During evaluation of In[8]:= CreateExecutable::cmperr: Compile error: C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\IncludeFiles\C/WolframLibrary.h:141:2: error: expected specifier-qualifier-list before 'mint' >>

During evaluation of In[8]:= General::stop: Further output of CreateExecutable::cmperr will be suppressed during this calculation. >>

Out[9]= $Failed
As you can see, this is simply part of the example code on the Wolfram page along with my errors.

Can anybody come up with any simple reasons (or at least explain the ones listed above in a bit more depth) the example code won't compile, and what I might do to resolve the problem?

Thank you.

P.S. Since this is my first post, I'm somewhat at sea as to where I should post. Also, it would seem to me that somebody else ought to have had the problem since it's just at the copy and paste level, but even though I did searches, I haven't seen anybody else with the problem, nor does this seem really relevant to the forum group classification system, so please forgive me if this is out of place.
POSTED BY: Paul T
Answer
8 months ago
Not to spam or belabor the issue, but my own much simpler example gives something similar:
 In[1]:= << CCodeGenerator`
 
 In[6]:= a = Compile[{{x, _Integer}}, x^2, CompilationTarget -> "C"]
 
 During evaluation of In[6]:= CreateLibrary::cmperr: Compile error: C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\IncludeFiles\C/WolframLibrary.h:31:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' >>
 
 During evaluation of In[6]:= CreateLibrary::cmperr: Compile error: C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\IncludeFiles\C/WolframLibrary.h:60:2: error: unknown type name 'mint' >>
 
 During evaluation of In[6]:= CreateLibrary::cmperr: Compile error: C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\IncludeFiles\C/WolframLibrary.h:141:2: error: expected specifier-qualifier-list before 'mint' >>

During evaluation of In[6]:= General::stop: Further output of CreateLibrary::cmperr will be suppressed during this calculation. >>

During evaluation of In[6]:= Compile::nogen: A library could not be generated from the compiled function. >>

Out[6]= \!\(
TagBox[
RowBox[{"CompiledFunction", "[",
RowBox[{
RowBox[{"{", "x", "}"}], ",",
SuperscriptBox["x", "2"], ",", "\<\"-CompiledCode-\"\>"}], "]"}],
False,
Editable->False]\)
I wonder, is something wrong with my Mathematica 9? I just bought it not too long ago.

Or perhaps something is wrong with MinGW? MinGW was mentioned as a decent free compiler to use. Perhaps it's not.
POSTED BY: Paul T
Answer
8 months ago
Well now this seems to work:
 In[1]:= << CCodeGenerator`
 
 In[7]:= a = Compile[{{x, _Integer}}, x^2]
 
 Out[7]= \!\(
 TagBox[
 RowBox[{"CompiledFunction", "[",
 RowBox[{
 RowBox[{"{", "x", "}"}], ",",
SuperscriptBox["x", "2"], ",", "\<\"-CompiledCode-\"\>"}], "]"}],
False,
Editable->False]\)

In[9]:= b = SymbolicCGenerate[a, "fun"]

Out[9]= CProgram[{CInclude["math.h"]}, {CInclude[
   "WolframRTL.h"]}, {CDeclare[{"static",
    "WolframCompileLibrary_Functions"}, "funStructCompile"],
  CDeclare[{"static", "mbool"}, CAssign["initialize", 1]]},
CInclude["fun.h"],
CFunction[{"DLLEXPORT", "int"},
  "Initialize_fun", {{"WolframLibraryData", "libData"}},
  CBlock[{CIf["initialize",
     CBlock[{{CAssign["funStructCompile",
         CPointerMember["libData",
          "compileLibraryFunctions"]]}, {}, {}, {},
       CAssign["initialize", 0]}]], CReturn[0]}]],
CFunction[{"DLLEXPORT", "void"},
  "Uninitialize_fun", {{"WolframLibraryData", "libData"}},
  CBlock[CIf[COperator[Not, {"initialize"}],
    CBlock[{}, CAssign["initialize", 1]]]]], {},
CFunction[{"DLLEXPORT", "int"},
  "fun", {{"WolframLibraryData", "libData"}, {"mint", "A1"}, {"mint",
    CDereference["Res"]}},
  CBlock[{{CDeclare["mint", "I0_0"],
     CDeclare["mint", "I0_1"]}, {}, {CAssign["I0_0",
      "A1"]}, {{CAssign["I0_1",
       COperator[Times, {"I0_0", "I0_0"}]], {}}, {}}, {}, {{},
     CAssign[CDereference["Res"], "I0_1"], {}, {},
     CCall[CPointerMember["funStructCompile",
       "WolframLibraryData_cleanUp"], {"libData", 1}],
     CReturn[0]}}]], {}]

In[10]:= b // ToCCodeString

Out[10]= "#include \"math.h\"

#include \"WolframRTL.h\"

static WolframCompileLibrary_Functions funStructCompile;

static mbool initialize = 1;

#include \"fun.h\"

DLLEXPORT int Initialize_fun(WolframLibraryData libData)
{
if( initialize)
{
funStructCompile = libData->compileLibraryFunctions;
initialize = 0;
}
return 0;
}

DLLEXPORT void Uninitialize_fun(WolframLibraryData libData)
{
if( !initialize)
{
initialize = 1;
}
}

DLLEXPORT int fun(WolframLibraryData libData, mint A1, mint *Res)
{
mint I0_0;
mint I0_1;
I0_0 = A1;
I0_1 = I0_0 * I0_0;
*Res = I0_1;
funStructCompile->WolframLibraryData_cleanUp(libData, 1);
return 0;
}

"
I'm guessing it's not my Mathematica 9 then, but something about MinGW. What could it be?
POSTED BY: Paul T
Answer
8 months ago
Just for yuks, here's another fruitless attempt to change things a bit:
 In[1]:= << CCompilerDriver`
 
 In[2]:= CCompilers[]
 
 Out[2]= {{"Name" -> "MinGW",
   "Compiler" -> CCompilerDriver`MinGWCompiler`MinGWCompiler,
   "CompilerInstallation" -> "C:\\MinGW\\bin\\gcc.exe",
   "CompilerName" -> Automatic}}
 
In[3]:= $CCompiler = {"Compiler" ->
   CCompilerDriver`CygwinGCC`CygwinGCC,
  "CompileInstallation" -> "C:\\cygwin\\bin\\gcc"}

Out[3]= {"Compiler" -> CCompilerDriver`CygwinGCC`CygwinGCC,
"CompileInstallation" -> "C:\\cygwin\\bin\\gcc"}

In[4]:= DefaultCCompiler[]

Out[4]= CCompilerDriver`CygwinGCC`CygwinGCC

In[5]:= CCompilers[Full]

Out[5]= {{"Name" -> "Visual Studio",
  "Compiler" ->
   CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler,
  "CompilerInstallation" -> None,
  "CompilerName" -> Automatic}, {"Name" -> "MinGW",
  "Compiler" -> CCompilerDriver`MinGWCompiler`MinGWCompiler,
  "CompilerInstallation" -> "C:\\MinGW\\bin\\gcc.exe",
  "CompilerName" -> Automatic}, {"Name" -> "Cygwin GCC",
  "Compiler" -> CCompilerDriver`CygwinGCC`CygwinGCC,
  "CompilerInstallation" -> None,
  "CompilerName" -> Automatic}, {"Name" -> "Intel Compiler",
  "Compiler" -> CCompilerDriver`IntelCompiler`IntelCompiler,
  "CompilerInstallation" -> None,
  "CompilerName" -> Automatic}, {"Name" -> "Generic C Compiler",
  "Compiler" -> CCompilerDriver`GenericCCompiler`GenericCCompiler,
  "CompilerInstallation" -> None, "CompilerName" -> Automatic}}
Notice how I've attempted to change the default compiler from MinGW to CygwinGCC. Of course it didn't work at all. I suppose that what I'm just doing is just utter nonsense, although I have absolutely no idea of why it should be utter nonsense.

It seems to me like there ought to be some way to tell Mathematica to look elsewhere for other compilers, but there doesn't seem to be.

I've changed the environment variable path too, not that it did any good.
POSTED BY: Paul T
Answer
8 months ago
Your link is to a V8 reference.  The corresponding V9 page has another option set, "SystemLibraries" -> {}:
lopassExe =
CreateExecutable[{fnSource, lopassmainSrcFile}, "lowpass",
  "SystemLibraries" -> {}, "TargetDirectory" -> targetDir,
  "Libraries" -> "WolframRTL_Static_Minimal"]
I got different error messages (on a Mac) with your code than you did, but using the V9 example got rid of them.  Maybe it will work on your system.
POSTED BY: Michael Rogers
Answer
8 months ago
Thank you Michael, I will try that a little later on today.
POSTED BY: Paul T
Answer
8 months ago
Well, nice thought, nice try, but still no cigar:
  In[1]:= targetDir = CreateDirectory[]
  
  Out[1]= "C:\\Documents and Settings\\HP_Owner\\Local \
  Settings\\Temp\\m-8973967a-d7cd-4736-b0c9-a0939b2474e5"
  
  In[2]:= lopass =
    Compile[{{x, _Real, 1}, dt, RC},
     Module[{a = dt/(RC + dt), yprev = First[x], yi},
      Table[yi = a*x[[i]] + (1 - a)*yprev;
      yprev = yi;
      yi, {i, 1, Length[x]}]]];
 
 In[3]:= (*build the example in a specified directory*)
 fnSource = FileNameJoin[{targetDir, "lopass.c"}];
 Export[fnSource, lopass];
 FileNames["*", targetDir]
 
 Out[5]= {"C:\\Documents and Settings\\HP_Owner\\Local \
 Settings\\Temp\\m-8973967a-d7cd-4736-b0c9-a0939b2474e5\\lopass.c", \
 "C:\\Documents and Settings\\HP_Owner\\Local \
 Settings\\Temp\\m-8973967a-d7cd-4736-b0c9-a0939b2474e5\\lopass.h"}
 
 In[6]:= (*main function C source*)lopassmainSrc = "
     #include \"stdio.h\"
     #include \"stdlib.h\"
     #include \"lopass.h\"
     #include \"WolframRTL.h\"
    
     static WolframLibraryData libData = 0;
    
     int main()
     {
       int err = 0;
       mint i, type, rank, nelems, *dims;
       double *data;
       MTensor x, y;
       double dt;
       double RC;
       libData = WolframLibraryData_new(WolframLibraryVersion);
    
       /* read x */
       type = MType_Real;
       rank = 1;
       dims = (mint*)malloc(rank * sizeof(mint));
       scanf(\" %d\", &nelems);
       dims[0] = nelems;
    
       err = (*(libData->MTensor_new))(type, rank, dims, &x);
       if (err) return 1;
    
       free(dims);
    
       data = (*(libData->MTensor_getRealData))(x);
       for(i = 0; i < nelems; i++) {
         scanf(\" %lf\", &(data[i]));
       }
    
       /* read dt */
       scanf(\" %lf\", &dt);
       /* read RC */
       scanf(\" %lf\", &RC);
    
       err = Initialize_lopass(libData);
    
       y = 0;
       err = lopass(libData, x, dt, RC, &y);
       printf(\"%d\\n\", err);
       if(0 == err){
         dims = (mint*)libData->MTensor_getDimensions(y);
         nelems = dims[0];
         data = (*(libData->MTensor_getRealData))(y);
         printf(\"%d\\n\", nelems);
         for(i = 0; i < nelems; i++)
           printf(\"%f\\n\", data[i]);
       }
    
       Uninitialize_lopass(libData);
       return 0;
     }
     ";
 
 In[7]:= (*create the main source file*)lopassmainSrcFile =
  FileNameJoin[{targetDir, "lopassMain.c"}]
 Export[lopassmainSrcFile, lopassmainSrc, "Text"];
 
 Out[7]= "C:\\Documents and Settings\\HP_Owner\\Local \
 Settings\\Temp\\m-8973967a-d7cd-4736-b0c9-a0939b2474e5\\lopassMain.c"
 
 In[9]:= Needs["CCompilerDriver`"];
 lopassExe =
  CreateExecutable[{fnSource, lopassmainSrcFile}, "lowpass",
   "SystemLibraries" -> {}, "TargetDirectory" -> targetDir,
   "Libraries" -> "WolframRTL_Static_Minimal"]
 
 During evaluation of In[9]:= CreateExecutable::cmperr: Compile error: C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\IncludeFiles\C/WolframLibrary.h:31:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'int' >>
 
 During evaluation of In[9]:= CreateExecutable::cmperr: Compile error: C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\IncludeFiles\C/WolframLibrary.h:60:2: error: unknown type name 'mint' >>
 
 During evaluation of In[9]:= CreateExecutable::cmperr: Compile error: C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\IncludeFiles\C/WolframLibrary.h:141:2: error: expected specifier-qualifier-list before 'mint' >>

During evaluation of In[9]:= General::stop: Further output of CreateExecutable::cmperr will be suppressed during this calculation. >>

Out[10]= $Failed
What strikes me as most odd, not that this is the only thing wrong with it, but what strikes me as most odd is that an unknown data type named mint keeps cropping up. I'm still a novice C programmer, but I've now been exposed to most of the data types a number of times, and I don't ever recall a type known as mint. I've seen int, long, double, float, long int, short, char, etc., but never a mint. What in the heck is a mint, I mean other than a candy or tea flavor or a big pile of money???

Here's Wikipedia on the subject of C data types: C data types. Where is there a mint in that list?
POSTED BY: Paul T
Answer
8 months ago
The type "mint" is defined by Mathematica in a .h file -- I thought it was mathlink.h, but it might be WolframLibrary.h.  There are a few #ifdef's I don't want to track down.  Here's a guide to C development:

http://reference.wolfram.com/mathematica/tutorial/MathLinkDeveloperGuide-Windows.html

You should look at your WolframLibrary.h and see if it looks ok.  Maybe it got trashed.  Mine looks fine (and I get no errors).
POSTED BY: Michael Rogers
Answer
8 months ago
Thank you for that. I will study these things, although it will take me some time since I'm such a noob to making this part of it work.

I have one of the sales reps words for it to me that even if a month elapses from the date of my purchase (12/31/2013), if Mathematica 9 still isn't performing for me, then I can get consideration for extended time to make it work before crunch time comes and I have to either keep it or ask for a refund. I don't want to give up on Mathematica 9. I want to make it work the way it's supposed to.

Thank you again for your help.

Oh, wait, I have a couple more questions. One is about mint: why would Mathematica 9 fail to recognize its own data type? What's up with that? I didn't think of that just now either, it's been in the back of my mind all along.

The other question is about what I tried to do earlier in this thread when I attempted to force Mathematica to acknowledge the path to some other compiler than MinGW. It's as if I went fishing and not only baited the hook, but grabbed the fish out of the water, shoved the barbed hook through the side of its mouth, and tossed it back into the drink in the hope that I would get to see the rod, reel, and fishline haul it out of the water, only to find that it had taken my bait and then slipped the hook. How and why does Mathematica simply ignore all of my attempts to force it to acknowledge the presence of other compilers? While it agrees that there is a new default compiler if I say there is, it then simply ignores everything else. That just seems weird to me, but then I don't know what mistakes I might be making in my attempts to do that either . . .

I think Wolfram needs to be a whole lot more explicit by way of example in these matters. So far, the examples are proving to be much too scanty.
POSTED BY: Paul T
Answer
8 months ago
I've just barely gotten started poking around, but I've already found something a bit odd in one of the files.

I can't say that I know what looks good or what looks bad. To me, everything seemed OK, but what do I know?

I avoided poking around in most of the Wolfram files so as to avoid making associations about how the files ought to be read. I know you can remove unwanted associations, but since my system is Windows XP, if you want to completely remove an unwanted association rather than change them from one to another, you have to do a command prompt ASSOC filetype =  and leave nothing after the = sign. It isn't very hard and I've done it in the past, but the less fooling around the better, so I was cautious about attempting to read files.

Having said that, I did go along this path: C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\IncludeFiles\C and I looked at all of the stuff in the C folder. I felt OK about doing so because those can all be opened in notepad without making any undue associations.

There were indeed, as you said Michael, a bunch of #ifdefs, typedefs, etc., and quite a bit about mint which I didn't fully grasp. This is what struck me as a bit odd to be leaving in a distribution to the general public though:

          /*
          TODO these two definitions look strange.
          */

That was in the WolframCompileLibrary near the bottom of the #ifdef. That seems like an oversight on the programmer's part. I know it's just a comment, but it was the content of the comment that struck me. I would have thought they'd have gotten rid of stuff like that before they sold it to the general public. While I doubt it has anything to do with my particular problem, it does seem a bit odd to me.

    
POSTED BY: Paul T
Answer
8 months ago
OK, I figured out what the problem was. I'm not exactly sure what to call it, but Micheal Rogers was right when he gave me the link to the Mathlink tutorial. I don't know exactly what to call it, configuring, set-up, or whatever, but I needed to link Mathematica 9 with one of my C compilers. Today I got the freely downloadable Microsoft C++ 2008 Version 9.0 of  Visual Studio. I spent the afternoon familiarizing myself with the IDE (I'm still a little unsure of how to make it display what I want, but that's sort of beside the point here).

Anyway, in the Mathlink tutorial it said to get the bin, lib and include files from the folder at the end of a certain Mathematica 9 path: C:\Program Files\Wolfram Research\Mathematica\9.0\SystemFiles\Links\MathLink\DeveloperKit\Windows\CompilerAdditions\MLDev32, and then hold down the Control button while doing a drag and drop of those files into the same files of Microsoft Visual Studio 2008. I did that and after a while I came back to this and ran the example again, and this time it worked!

Here's proof:
 In[1]:= targetDir = CreateDirectory[]
 
 Out[1]= "C:\\Documents and Settings\\HP_Owner\\Local \
 Settings\\Temp\\m-6535021e-b3c9-4783-b3a4-6b6d2714640f"
 
 In[2]:= lopass =
   Compile[{{x, _Real, 1}, dt, RC},
    Module[{a = dt/(RC + dt), yprev = First[x], yi},
     Table[yi = a*x[[i]] + (1 - a)*yprev;
     yprev = yi;
     yi, {i, 1, Length[x]}]]];

In[3]:= (*build the example in a specified directory*)
fnSource = FileNameJoin[{targetDir, "lopass.c"}];
Export[fnSource, lopass];
FileNames["*", targetDir]

Out[5]= {"C:\\Documents and Settings\\HP_Owner\\Local \
Settings\\Temp\\m-6535021e-b3c9-4783-b3a4-6b6d2714640f\\lopass.c", \
"C:\\Documents and Settings\\HP_Owner\\Local \
Settings\\Temp\\m-6535021e-b3c9-4783-b3a4-6b6d2714640f\\lopass.h"}

In[6]:= (*main function C source*)lopassmainSrc = "
    #include \"stdio.h\"
    #include \"stdlib.h\"
    #include \"lopass.h\"
    #include \"WolframRTL.h\"
   
    static WolframLibraryData libData = 0;
   
    int main()
    {
      int err = 0;
      mint i, type, rank, nelems, *dims;
      double *data;
      MTensor x, y;
      double dt;
      double RC;
      libData = WolframLibraryData_new(WolframLibraryVersion);
   
      /* read x */
      type = MType_Real;
      rank = 1;
      dims = (mint*)malloc(rank * sizeof(mint));
      scanf(\" %d\", &nelems);
      dims[0] = nelems;
   
      err = (*(libData->MTensor_new))(type, rank, dims, &x);
      if (err) return 1;
   
      free(dims);
   
      data = (*(libData->MTensor_getRealData))(x);
      for(i = 0; i < nelems; i++) {
        scanf(\" %lf\", &(data[i]));
      }
   
      /* read dt */
      scanf(\" %lf\", &dt);
      /* read RC */
      scanf(\" %lf\", &RC);
   
      err = Initialize_lopass(libData);
   
      y = 0;
      err = lopass(libData, x, dt, RC, &y);
      printf(\"%d\\n\", err);
      if(0 == err){
        dims = (mint*)libData->MTensor_getDimensions(y);
        nelems = dims[0];
        data = (*(libData->MTensor_getRealData))(y);
        printf(\"%d\\n\", nelems);
        for(i = 0; i < nelems; i++)
          printf(\"%f\\n\", data[i]);
      }
   
      Uninitialize_lopass(libData);
      return 0;
    }
    ";

In[7]:= (*create the main source file*)lopassmainSrcFile =
FileNameJoin[{targetDir, "lopassMain.c"}]
Export[lopassmainSrcFile, lopassmainSrc, "Text"];

Out[7]= "C:\\Documents and Settings\\HP_Owner\\Local \
Settings\\Temp\\m-6535021e-b3c9-4783-b3a4-6b6d2714640f\\lopassMain.c"

In[9]:= Needs["CCompilerDriver`"];
lopassExe =
CreateExecutable[{fnSource, lopassmainSrcFile}, "lowpass",
  "SystemLibraries" -> {}, "TargetDirectory" -> targetDir,
  "Libraries" -> "WolframRTL_Static_Minimal"]


Out[10]= "C:\\Documents and Settings\\HP_Owner\\Local \
Settings\\Temp\\m-6535021e-b3c9-4783-b3a4-6b6d2714640f\\lowpass.exe"
See, no failure, no unknown variable type named mint, just an .exe file!

Wow! After all that messing around and a couple of weeks of effort, it all came down to three drag-and-drops.

The instructions for the 2010 version they spoke of in the Mathlink tutorial were suitable for the 2008 version. You just find the relevant bin, lib and include files in the folder at the end of this path: C:\Program Files\Microsoft Visual Studio 9.0\VC -- the VC folder and then do the Control drag-and-drop.

Also, while I haven't attempted this yet, I noticed there was a special cygwin folder in the same folder as the mldev32 folder. I'm going to attempt the same sort of thing on cygwin, MinGW, and Pelles C compilers and see if I can get it to work with those. If I can, then I'll know that my problem was simply that I had to do this manually, and that the most inexpensive version of Mathematica 9, the Home Edition, may need a little help from the user before it will work properly.

Oh, and a few days ago, I realized there was another language I might potentially try these things with, the R language. I know nothing about it, and I'd probably have to compose my own examples, but I wouldn't be a bit surprised if something similar to this same procedure is probably the way to link up Mathematica with all of those other languages in Mathlink.

OK then, for now, solved, thanks to Michael Rogers!

Thank you Michael !!!  :^)

Edit: well, I have been looking at the RLink stuff and I can see I was off base there. On the otherhand, I don't think there is any reason I shouldn't try to get the other C compilers going.
POSTED BY: Paul T
Answer
8 months ago
Well, I guess I should count my blessings; one out of four of my compilers functions with Mathematica 9.

Why won't MinGW work? I don't know. Attempting to make a connection by putting the Mathematica bin, lib and include in folders of the same name is a non-starter. On the other hand, I've seen that the same three folders exist inside other folders, so there may be more things I could try, but so far I've only put the Mathematica folders into the folders 'closest to the surface' since that was how it worked with Microsoft Visual Studio.

As for the Cygwin and Pelles C compilers, it still doesn't even know where they are, and I still haven't figured out how to tell it where to look.

One out of four so far for establishing a Mathlink connection . . . not very good odds. And here I was so certain it would work . . .

Oh well, I suppose I could try the Generic compiler option (bottom of the page) next, but the more I look at it, the more I suspect that that too will also be unsuitable.

Why are the odds of success so low? What is it that I'm missing here? I got one to work, why not more than one? I do not know, I just do not know. I am more mystified than ever . . .
POSTED BY: Paul T
Answer
8 months ago
I thought I might have to do this, but I don't because the Mathematica 9 installation already did it:
All devices and libraries in the SystemAdditions folder should be copied to the Windows system directory. On some 32-bit versions of Microsoft Windows, the Windows system directory is C:\WINDOWS\SYSTEM, whereas on other versions it is C:\WINNT\SYSTEM32 or C:\WINDOWS\SYSTEM32.
I got this from MathLink Development in C (Windows).
POSTED BY: Paul T
Answer
8 months ago
OK, well, ultimately, it still doesn't work. I added a line at the end so that you can sort of see where it fails, but I don't know why it does. There is a certain point in the Import function where it says to Stringjoin the expression with this " < ", and that leads to the empty set. I've tried putting in " << " and "<" all of which led to the empty set. I also tried putting in " ", but that led to an extremely large output and a graph with millions of zeros, something like 4,666,464 if memory serves.

It's sad that this example has to have graphs in the output, because that leads to such ridiculously large nonsensical looking outputs that I fear people will be put off from looking at it. I will repeat the code in another post but leave out the ugly "graphical" outputs.

Here is my code:
  In[1]:= targetDir = CreateDirectory[]
  
  Out[1]= "C:\\Documents and Settings\\HP_Owner\\Local \
  Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8"
  
  In[2]:= lopass = Compile[{{x, _Real, 1}, dt, RC},
     Module[{a = dt/(RC + dt), yprev = First[x], yi},
      Table[yi = a*x[[i]] + (1 - a)*yprev;
       yprev = yi;
      yi, {i, 1, Length[x]}
      ]
     ]
    ];
 
 In[3]:= (* build the example in a specified directory *)
 fnSource = FileNameJoin[{targetDir, "lopass.c"}];
 Export[fnSource, lopass];
 FileNames["*", targetDir]
 
 Out[5]= {"C:\\Documents and Settings\\HP_Owner\\Local \
 Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8\\lopass.c", \
 "C:\\Documents and Settings\\HP_Owner\\Local \
 Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8\\lopass.h"}
 
 In[6]:= (* main function C source *)
 lopassmainSrc = "
   #include \"stdio.h\"
   #include \"stdlib.h\"
   #include \"lopass.h\"
   #include \"WolframRTL.h\"
  
   static WolframLibraryData libData = 0;
  
   int main()
   {
     int err = 0;
     mint i, type, rank, nelems, *dims;
     double *data;
     MTensor x, y;
     double dt;
     double RC;
     libData = WolframLibraryData_new(WolframLibraryVersion);
  
     /* read x */
     type = MType_Real;
     rank = 1;
     dims = (mint*)malloc(rank * sizeof(mint));
     scanf(\" %d\", &nelems);
     dims[0] = nelems;
  
     err = (*(libData->MTensor_new))(type, rank, dims, &x);
     if (err) return 1;
  
     free(dims);
  
     data = (*(libData->MTensor_getRealData))(x);
     for(i = 0; i < nelems; i++) {
       scanf(\" %lf\", &(data[i]));
     }
  
     /* read dt */
     scanf(\" %lf\", &dt);
     /* read RC */
     scanf(\" %lf\", &RC);
  
     err = Initialize_lopass(libData);
  
     y = 0;
     err = lopass(libData, x, dt, RC, &y);
     printf(\"%d\\n\", err);
     if(0 == err){
       dims = (mint*)libData->MTensor_getDimensions(y);
       nelems = dims[0];
       data = (*(libData->MTensor_getRealData))(y);
       printf(\"%d\\n\", nelems);
       for(i = 0; i < nelems; i++)
         printf(\"%f\\n\", data[i]);
     }
  
     Uninitialize_lopass(libData);
     return 0;
   }
   ";
 
 In[7]:= (* create the main source file *)
 lopassmainSrcFile = FileNameJoin[{targetDir, "lopassMain.c"}]
 Export[lopassmainSrcFile, lopassmainSrc, "Text"];
 
 Out[7]= "C:\\Documents and Settings\\HP_Owner\\Local \
 Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8\\lopassMain.c"
 
 In[9]:= Needs["CCompilerDriver`"];
 lopassExe = CreateExecutable[{fnSource, lopassmainSrcFile}, "lowpass",
   "SystemLibraries" -> {}, "TargetDirectory" -> targetDir,
   "Libraries" -> "WolframRTL_Static_Minimal"]
 
 Out[10]= "C:\\Documents and Settings\\HP_Owner\\Local \
 Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8\\lowpass.exe"
 
In[11]:= dt = 0.01;
RC = 0.3;
input = Table[Sin[x] + Sin[x*10] + Sin[x*50], {x, 0, 10, dt}];
ListPlot[input, ImageSize -> Medium, Joined -> True]

Out[14]= \!\(\*
GraphicsBox[{{},
{RGBColor[0.24720000000000017`, 0.24, 0.6], LineBox[CompressedData["
1:eJxVW2lYzN/7TrZkC0X2sZa1yBKiGyFbEloI06ZVpn2vmZqZppoWJBUxfS2V
JdmTaAoJrSpKxUhU1koqS/z6Xz2fF39vXI8z53Oe7X62c0yxPGRkIy8nJ9fc
V07u//7u/dOiK/f//+DvjhW6i2vq6d8VoPli6uadHczvlNC66tmaoXN+EK2M
uIG1isaODK2KjuSRCQWD24iegAT/T5UV3CaiWYhI29xwZPVLoqdiQjjbe03m
WaKnY3PT2139b2bl9NIz0bIn71Kr4hGi1RFppRt5tOk5/X42JiWnRf28xXx/
LmJ3z3lf9bWd6PlY4uQh+xP8h2hN5K5Tt229LIdeegHKn2bdSdLoQ/RCrD9a
2OBs9o9+rwWb9OhP2oo/iV4E1tFXRU9/MPpYjDPVl++9HMzoawnenB8fGHek
gOilMM2ZKvqPfYJobWSsVz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spectRatio->0.6180339887498948,
Axes->True,
AxesLabel->{None, None},
AxesOrigin->{0, 0.},
ImageSize->Medium,
Method->{},
PlotRange->{{0, 1001.}, {-2.98723801101878, 2.9757153662914786`}},
PlotRangeClipping->True,
PlotRangePadding->{{20.02, 20.02}, {0.11925906754620517`,
    0.11925906754620517`}}]\)

In[15]:= inputText =
  StringJoin[ToString[Length[input]], "\n", Riffle[ToString /@ input, "\n"],
   ToString[dt], ToString[RC]];
inputFile = FileNameJoin[{targetDir, "input.txt"}]
Export[inputFile, inputText, "Text"];

Out[16]= "C:\\Documents and Settings\\HP_Owner\\Local \
Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8\\input.txt"

In[18]:= SetDirectory[targetDir]; outputLines =
Import["!" <> FileNameTake[lopassExe, -1] <> " < " <> inputFile, "Lines"];
ResetDirectory[];

In[20]:= output = ToExpression /@ outputLines;
output =
  If[MatchQ[output, {0, x_ /; x + 2 === Length[output], ___}],
   Drop[output, 2],
   $Failed
   ];

In[22]:= ListPlot[{input, output}, ImageSize -> Medium, Joined -> True]

Out[22]= \!\(\*
GraphicsBox[{{}, {{}, {},
{RGBColor[0.24720000000000017`, 0.24, 0.6], LineBox[CompressedData["
1:eJxVW2lYzN/7TrZkC0X2sZa1yBKiGyFbEloI06ZVpn2vmZqZppoWJBUxfS2V
JdmTaAoJrSpKxUhU1koqS/z6Xz2fF39vXI8z53Oe7X62c0yxPGRkIy8nJ9fc
V07u//7u/dOiK/f//+DvjhW6i2vq6d8VoPli6uadHczvlNC66tmaoXN+EK2M
uIG1isaODK2KjuSRCQWD24iegAT/T5UV3CaiWYhI29xwZPVLoqdiQjjbe03m
WaKnY3PT2139b2bl9NIz0bIn71Kr4hGi1RFppRt5tOk5/X42JiWnRf28xXx/
LmJ3z3lf9bWd6PlY4uQh+xP8h2hN5K5Tt229LIdeegHKn2bdSdLoQ/RCrD9a
2OBs9o9+rwWb9OhP2oo/iV4E1tFXRU9/MPpYjDPVl++9HMzoawn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adY5JEvamrpz/ARysT5U=
"]]}}, {}},
AspectRatio->0.6180339887498948,
Axes->True,
AxesLabel->{None, None},
AxesOrigin->{0, 0.},
ImageSize->Medium,
Method->{},
PlotRange->{{0, 1001.}, {-2.98723801101878, 2.9757153662914786`}},
PlotRangeClipping->True,
PlotRangePadding->{{20.02, 20.02}, {0.11925906754620517`,
    0.11925906754620517`}}]\)

In[23]:= DeleteDirectory[targetDir, DeleteContents -> True]

In[24]:= If[output === $Failed \[And] outputLines === {}, {output, outputLines,
  targetDir}, Null]

Out[24]= {$Failed, {}, "C:\\Documents and Settings\\HP_Owner\\Local \
Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8"}
POSTED BY: Paul T
Answer
8 months ago
Here is my code minus the graphical outputs:
  In[1]:= targetDir = CreateDirectory[]
  
  Out[1]= "C:\\Documents and Settings\\HP_Owner\\Local \
  Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8"
  
  In[2]:= lopass = Compile[{{x, _Real, 1}, dt, RC},
     Module[{a = dt/(RC + dt), yprev = First[x], yi},
      Table[yi = a*x[[i]] + (1 - a)*yprev;
       yprev = yi;
      yi, {i, 1, Length[x]}
      ]
     ]
    ];
 
 In[3]:= (* build the example in a specified directory *)
 fnSource = FileNameJoin[{targetDir, "lopass.c"}];
 Export[fnSource, lopass];
 FileNames["*", targetDir]
 
 Out[5]= {"C:\\Documents and Settings\\HP_Owner\\Local \
 Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8\\lopass.c", \
 "C:\\Documents and Settings\\HP_Owner\\Local \
 Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8\\lopass.h"}
 
 In[6]:= (* main function C source *)
 lopassmainSrc = "
   #include \"stdio.h\"
   #include \"stdlib.h\"
   #include \"lopass.h\"
   #include \"WolframRTL.h\"
  
   static WolframLibraryData libData = 0;
  
   int main()
   {
     int err = 0;
     mint i, type, rank, nelems, *dims;
     double *data;
     MTensor x, y;
     double dt;
     double RC;
     libData = WolframLibraryData_new(WolframLibraryVersion);
  
     /* read x */
     type = MType_Real;
     rank = 1;
     dims = (mint*)malloc(rank * sizeof(mint));
     scanf(\" %d\", &nelems);
     dims[0] = nelems;
  
     err = (*(libData->MTensor_new))(type, rank, dims, &x);
     if (err) return 1;
  
     free(dims);
  
     data = (*(libData->MTensor_getRealData))(x);
     for(i = 0; i < nelems; i++) {
       scanf(\" %lf\", &(data[i]));
     }
  
     /* read dt */
     scanf(\" %lf\", &dt);
     /* read RC */
     scanf(\" %lf\", &RC);
  
     err = Initialize_lopass(libData);
  
     y = 0;
     err = lopass(libData, x, dt, RC, &y);
     printf(\"%d\\n\", err);
     if(0 == err){
       dims = (mint*)libData->MTensor_getDimensions(y);
       nelems = dims[0];
       data = (*(libData->MTensor_getRealData))(y);
       printf(\"%d\\n\", nelems);
       for(i = 0; i < nelems; i++)
         printf(\"%f\\n\", data[i]);
     }
  
     Uninitialize_lopass(libData);
     return 0;
   }
   ";
 
 In[7]:= (* create the main source file *)
 lopassmainSrcFile = FileNameJoin[{targetDir, "lopassMain.c"}]
 Export[lopassmainSrcFile, lopassmainSrc, "Text"];
 
 Out[7]= "C:\\Documents and Settings\\HP_Owner\\Local \
 Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8\\lopassMain.c"
 
 In[9]:= Needs["CCompilerDriver`"];
 lopassExe = CreateExecutable[{fnSource, lopassmainSrcFile}, "lowpass",
   "SystemLibraries" -> {}, "TargetDirectory" -> targetDir,
   "Libraries" -> "WolframRTL_Static_Minimal"]
 
 Out[10]= "C:\\Documents and Settings\\HP_Owner\\Local \
 Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8\\lowpass.exe"
 
In[11]:= dt = 0.01;
RC = 0.3;
input = Table[Sin[x] + Sin[x*10] + Sin[x*50], {x, 0, 10, dt}];
ListPlot[input, ImageSize -> Medium, Joined -> True]

In[15]:= inputText =
  StringJoin[ToString[Length[input]], "\n", Riffle[ToString /@ input, "\n"],
   ToString[dt], ToString[RC]];
inputFile = FileNameJoin[{targetDir, "input.txt"}]
Export[inputFile, inputText, "Text"];

Out[16]= "C:\\Documents and Settings\\HP_Owner\\Local \
Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8\\input.txt"

In[18]:= SetDirectory[targetDir]; outputLines =
Import["!" <> FileNameTake[lopassExe, -1] <> " < " <> inputFile, "Lines"];
ResetDirectory[];

In[20]:= output = ToExpression /@ outputLines;
output =
  If[MatchQ[output, {0, x_ /; x + 2 === Length[output], ___}],
   Drop[output, 2],
   $Failed
   ];

In[22]:= ListPlot[{input, output}, ImageSize -> Medium, Joined -> True]

In[23]:= DeleteDirectory[targetDir, DeleteContents -> True]

In[24]:= If[output === $Failed \[And] outputLines === {}, {output, outputLines,
  targetDir}, Null]

Out[24]= {$Failed, {}, "C:\\Documents and Settings\\HP_Owner\\Local \
Settings\\Temp\\m-7dc3e81d-6370-48ba-93f4-809adf3127a8"}
One last thing, I do get the .exe, both of the .c's, the input file, and the .h in the Temporary directory. I think I'm getting all of the stuff I'm supposed to get, but for some reason the Import can't pick it up, and I don't know why.
POSTED BY: Paul T
Answer
8 months ago
I found the answer: I needed a shorter directory name. I suspected that earlier, but when I got rid of the CreateDirectory thing and forced a short name like "gloop" on the tag end of Temp, it still didn't run. I thought sure I was short enough with the "gloop" thing, but I guess not. Finally, when I used "C:/Temp" for targetDir though, it worked.

Ultimately, shortening file names has been the answer to some other things I wanted to do recently too, most notably when I was attempting to make some CUDA stuff work. I tried all of the stuff in this thread and none of it worked, up until I tried what was suggested in post #9.

I tend to prefer long descriptive inclusive directory and file names, but I've found in the past that my preference for long names gets me into trouble Then I end up having to do a lot of shortening and renaming in order to be able to open even simple text and picture files.

In conclusion, I'd say there is a subtle flaw in the example as given, in that the temporary file names Mathematica 9 likes to create are too long for some of the older systems.
POSTED BY: Paul T
Answer
8 months ago