Hot answers tagged ccompilerdriver
9
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 = ...
9
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" ->
CCompilerDriver`IntelCompiler`IntelCompiler,
...
9
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 ...
7
CCompilers[Full] will list all compilers supported on your $SystemID:
In[1]:= Needs["CCompilerDriver`"]
CCompilers[Full]
Out[2]= {{"Name" -> "Visual Studio",
"Compiler" ->
CCompilerDriver`VisualStudioCompiler`VisualStudioCompiler,
"CompilerInstallation" -> None,
"CompilerName" -> Automatic}, {"Name" -> "MinGW",
"Compiler" ...
6
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 ...
5
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.
...
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 ...
1
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.
Only top voted, non community-wiki answers of a minimum length are eligible


