I download boost 1.55, extract it, and run the following:
> bootstrap.bat
cl : Command line warning D9035 : option 'GZ' has been deprecated and will be removed in a future release
cl : Command line warning D9036 : use 'RTC1' instead of 'GZ'
cl : Command line warning D9002 : ignoring unknown option '/MLd'
Bootstrapping is done. To build, run:
...
> b2 --build-type=complete --build-dir=build --toolset=msvc-14.0 stage
However, I get the following error:
error: msvc initialization: parameter 'version' inconsistent
error: no value was specified in earlier initialization
error: an explicit value is specified now
Following the same steps with MSVC 2012, I didn't get that error.
If I do --toolset=msvc instead, then it works. However, the generated files have -vc instead of -vc140, which is what I'd like.
How do I specify the toolset explicitly? Where was it "specified in earlier initialization"?
(The reason I want to do this is I am getting a weird linker error later - saying it's looking for some -vc120 boost library... and I have no idea why. I'm trying to eliminate all the possibilities.)
The previously specified version is in project-config.jam:
using msvc ;
Change it to:
using msvc : 14.0 ;
Related
I'm struggling with the importation of C++ (2017) dlls in Matlab (2019a).
In particular, since I'm not familiar with C++, I tried to create the MathLibrary defined in https://github.com/MicrosoftDocs/cpp-docs/blob/master/docs/build/walkthrough-creating-and-using-a-dynamic-link-library-cpp.md.
I created the library according to the guide, compiled both Debug and Release (x86), and the import with the MathClient described works fine.
However, I tried to import the library in Matlab (after adding the needed folders to the current path) with:
if libisloaded('MathLibrary') == 0
handle = loadlibrary('MathLibrary.dll','MathLibrary.h');
end
and it throws a tons of errors:
Warning: Message from C preprocessor:
cl : command line warning D9027: source file 'C:\Users\miche\source\repos\MathLibrary\Release\MathLibrary.lib' ignored
cl : command line warning D9021 : no operation performed
> In loadlibrary
Error loading library intermediate output follows.
The actual error is at the end of this output.
*********
Unescaped left brace in regex is deprecated here (and will be fatal in Perl 5.30), passed through in regex; marked by <-- HERE in m/struct([^;,{(]*){ <-- HERE (.*?)\}([^;])*;/ at D:\Program Files\MATLAB\R2019a\toolbox\matlab\general\private\prototypes.pl line 912.
Warning no reference to header 'MathLibrary' added with addheader was found in source.
*********
Error using loadlibrary
Building MathLibrary_thunk_pcwin64 failed. Compiler output is:
cl -I"D:\Program Files\MATLAB\R2019a\extern\include" /Zp8 /W3
/nologo -I"D:\Program Files\MATLAB\R2019a\bin"
-I"C:\Users\user\source\repos\MathLibrary\Release"
"MathLibrary_thunk_pcwin64.c" -LD
-Fe"MathLibrary_thunk_pcwin64.dll"
MathLibrary_thunk_pcwin64.c
C:\Users\miche\source\repos\MathLibrary\Release\MathLibrary.lib(1):
error C2059: syntax error: '!'
C:\Users\miche\source\repos\MathLibrary\Release\MathLibrary.lib(2):
error C2018: character '0x60' unknown
and then it just goes on like this, with a lot of character errors.
What is wrong with my code? How do I solve this?
Replace the default Apple-LLVM with the LLVM 5.0 downloaded from llvm.org.
and compiling, xcode thrown an error:
clang-5.0: error: cannot specify -o when generating multiple output files
Xcode8 is OK.
Thanks.
This is not a Clang 5.0-only issue. I am having the same issue with a custom Clang 3.9.
Xcode 9 has introduced a custom argument that a normal Clang does not support:
The -index-store-path argument does not exist in Clang 5.0 and it gets discarded without any error message. The problem is that its argument, a folder, is not discarded, and Clang considers it as a source file. This leads to the following errors:
cannot specify -o when generating multiple output files (this happens if a -o argument is passed)
error reading '<PATH>' (this can be observed when running the "normalized" version of the clang command, generated via the -### flag)
Source: Facebook/infer: Remove unsupported index-store-path argument from clang commands.
In my custom toolchain based on Clang/CMake/Xcode I use a wrapper around clang in which I just cut off this argument and the folder passed to it and everything works fine.
Thanks for #Praetorian 'help, problem Was solved.
That's what I do:
download the beta version of boost (present beta version: 1.64)
Do what's told here: How to use Boost in Visual Studio 2010
To install Boost, I have done what am I told(http://www.boost.org/doc/libs/1_63_0/more/getting_started/ and How to use Boost in Visual Studio 2010.)
But "argument error" still returned after running b2
What's the mistake do I make?
//What I do
$ b2 --toolset=msvc-14.0 --build-type=complete architecture=x86 address-model=64 stage
//Return
*** argument error
rule maybe-rewrite-setup ( toolset : setup-script : setup-options : version : rewrite-setup ? )
called with: ( msvc : : : default : )
missing argument setup-script
//Using
Visual Studio 2017 community
x86 Native Tools Command Prompt for VS 2017
I use MinGW64+msys on Winodws7 64bit
Now I’m trying to build CMAKE but I can’t.
When I typed ./configure soon an error happened. .
---------------------------------------------
CMake 3.2.3, Copyright 2000-2015 Kitware, Inc.
Found GNU toolchain
C compiler on this system is: gcc
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate C++ compiler on this system.
Please specify one using environment variable CXX.
See cmake_bootstrap.log for compilers attempted.
I also find error messages in Bootstrap.cmk/cmake_bootstrap.log like bellow.
[First Message in the log file]
In file included from c:/mingw64/x86_64-w64-mingw32/include/c++/iosfwd:40:0,^M
from c:/mingw64/x86_64-w64-mingw32/include/c++/ios:38,^M
from c:/mingw64/x86_64-w64-mingw32/include/c++/ostream:38,^M
from c:/mingw64/x86_64-w64-mingw32/include/c++/iostream:39,^M
from cmake_bootstrap_4468_test.cxx:3:^M
c:/mingw64/x86_64-w64-mingw32/include/c++/bits/postypes.h:40:35: fatal error: cw
char: No such file or directory^M
compilation terminated.^M
[Second Message in the log file]
cmake_bootstrap_4468_test.cxx:5:23: fatal error: iostream.h: No such file or dir
ectory^M
compilation terminated.^M
Test failed to compile
They said cwchar and iostream.h doesn't exist, although I have them and set their path to environmental variable.
The first massage said my C++ compiler isn’t appropriate. I installed it by mingw-get.exe.
Does anyone know, how can I get appropriate C++ compiler?
You mixed two compilers. I recommend: delete your old one and install msys2+mingw64.
I tried to compile boost 1.57 with intel compiler and I got a error message:
*** argument error
* rule get-msvc-version-from-vc-string ( vc-string )
* called with: ()
* missing argument vc-string
Do you know how can I solve this problem.
Thank you
As you can see here the right command to use from an intel command prompt (after bootstrap.bat in order to compile b2.exe) is
b2 toolset=intel-14.0-vc12
instead of
b2 toolset=intel
14.0-vc12 because probably the version of your Intel compiler was 14.xx.xx (check it running icl command) and your Visual Studio version was 2012/2013.