# Tag Info

11

Mathematica 8 automatically detects Intel version 11, but not Intel version 12 which was released later. In order to use the Intel 12 compiler, you'll need to set $CCompiler to point CCompilerDriver to where you've installed the Intel compiler: Needs["CCompilerDriver"]$CCompiler = {"Compiler" -> CCompilerDriverIntelCompilerIntelCompiler, ...

11

First, be sure to read the Specific Compilers section of the CCompilerDriver User Guide. This is the official place where the nuts and bolts of using external C compilers is discussed. In that section, "Visual Studio Express and 64-Bit Targets" is where compilation on 64-bit Windows is discussed. Some things to check when setting up: Be sure to install ...

10

I managed to get something going: Needs["CCompilerDriver"] src = " #include \"WolframLibrary.h\" #include <boost/date_time/gregorian/gregorian.hpp> EXTERN_C DLLEXPORT int dow(WolframLibraryData libData, mint Argc, MArgument *Args, MArgument Res) { mint year = MArgument_getInteger(Args[0]); mint month = ...

8

CCompilers[Full] will list all compilers supported on your $SystemID: In[1]:= Needs["CCompilerDriver"] CCompilers[Full] Out[2]= {{"Name" -> "Visual Studio", "Compiler" -> CCompilerDriverVisualStudioCompilerVisualStudioCompiler, "CompilerInstallation" -> None, "CompilerName" -> Automatic}, {"Name" -> "MinGW", "Compiler" ... 6 Visual Studio 2013 is not supported out of the box by Mathematica 9.0.1. To fix this, Navigate to AddOns\Applications\CCompilerDriver within the Mathematica installation directory. Back up VisualStudioCompiler.m as we're going to modify it. Open the file and search for the line starting with installPath["2012"] Add the following line below it: ... 6 I believe that any compiler that works on your system is suitable, but those compilers that are not explicitly supported by the CCompilerDriver package will need manual configuration, which might be quite a bit of work. It is important though to use a 64-bit compiler with a 64-bit version of Mathematica and a 32-bit compiler with the 32-bit version. ... 5 I believe this is answered in Specific Compilers: GCC The CCompilerDriver package has been tested with several versions of the GNU Compiler Collection (http://gcc.gnu.org) on a variety of different platforms.$SystemID Tested versions of GCC Linux 4.0 Linux-x86-64 4.0 MacOSX 4.0 MacOSX-x86 4.0 MacOSX-x86-64 4.0 Tested ...

4

Figured it out. The key was working out that if I included "ShellOutputFunction"->Print in the \$CCompiler list, compilation of the function would show me what the shell was doing. Thus I learned that it was failing to find libgcc_s. I found libgcc_s.a in C:\MinGW-64\lib. I created a system environment variable LIBRARY_PATH with value C:\MinGW-64\lib, and ...

3

I just solved this problem, which is in fact resulted from the missing of gcc and apple developer tool. 1.gcc: refer to this page for the installation of gcc 4.8: gcc 4.7, 4.8 and 4.9 2.Apple Developer Tool: Just install it by executing this command in Terminal: xcode-select --install After install the developer tool, verify the g++ compiler in ...

3

I was formally informed by WRI personnel that the system modeler is not (yet) compatible with 10.9

2

Just thought I'd share. I had the same problem after re-installing VS2010 Ultimate (I also have 2008). To fix it, I copied the following libcmt.lib libcmt.pdb libcmtd.lib libcmtd.pdb oldnames.lib from C:\Program Files\Microsoft Visual Studio 11.0\VC\lib to C:\Program Files\Microsoft Visual Studio 10.0\VC\lib Hope this helps someone.

2

Use the "TargetSystemID" option to CreateLibrary (this exists for CreateExecutable and CreateObjectFile as well) to compile for a 32-bit or 64-bit target. "TargetSystemID" -> "Windows" generates a 32-bit binary "TargetSystemID" -> "Windows-x86-64" generates a 64-bit binary If you want to use this library from Mathematica, create a Mathematica package ...

2

As far as I know there is no way to extend the Compile system in the way you describe, but you can often work around specific problems. For example, for handling strings you can write an outer function that converts strings to a packed vector of integers using ToCharacterCode, then pass this to your compiled function. However, I would encourage you not to ...

2

SystemModeler 4 SystemModeler 4 supports Mac OS X Mavericks out of the box. SystemModeler 3 Locate the Compile script in the SystemModeler bundle, in a standard installation it should be located here /Applications/SystemModeler.app/Contents/MacOS/Compile. To get there, right-click (or Ctrl+left click) on the SystemModeler bundle and select "Show Package ...

2

Very likely you need to install Xcode. Unless things changed with Mavericks, OSX has a compiler available but not installed by default As Brett Champion mentioned, try FileNames["/usr/bin/clang"] If this returns a file, then clang (A compiler) is installed, and likely should work.

1

I ended up using the GenericCCompiler driver, as follows: CreateLibrary[{"mylib.cpp"}, "mylib", "IncludeDirectories" -> "/opt/local/include", "ShellOutputFunction" -> Print, "ShellCommandFunction" -> Print, "Language" -> "C++", "Compiler" -> CCompilerDriverGenericCCompilerGenericCCompiler, "CompilerInstallation" -> ...

1

To long for comment, Hit Command+Shift+G from the OS X desktop A Commandline will open, enter /user/bin and hit open There will open a new window, containing a long list, search for clang: If clang or others are NOT on this list, most likely you have to install "Command Line Tools" see here (or ask Google ...). Always check with friends when ...

Only top voted, non community-wiki answers of a minimum length are eligible