how to call boost libraries on appveyor, how to set environment variable to run boost test successfully? - appveyor

I want to run boost test in appveyor. My code can built successfully without boost test. When I run boost test, it has compile error.
Build started
2
git clone -q --branch=master https://github.com/Gaussma/StaticLibrary.git c:\projects\myproject
3
git checkout -qf 857f43f706d59e6ed74d7af6771d102850e615a0
4
msbuild "c:\projects\myproject\StaticLibrary.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
5
Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
6
Copyright (C) Microsoft Corporation. All rights reserved.
7
8
LinkedListcpp.cpp
9
MathFuncsLib.cpp
10
Generating Code...
11
MathFuncsLib.vcxproj -> c:\projects\myproject\x64\Debug\MathFuncsLib.lib
12
boostTest_LinkedList.cpp
13
c:\projects\myproject\myexecrefslib\boosttest_linkedlist.cpp(3): fatal error C1083: Cannot open include file: 'boost/test/included/unit_test.hpp': No such file or directory [c:\projects\myproject\MyExecRefsLib\MyExecRefsLib.vcxproj]
Cleary, the appveyor can not find the boost library.
Locally, I am using Visual Studio 2017 and boost library 1_68_0 to generate the MyExecRefsLib.vcxproj file.
I search on the stackoverflow and find others implement the .yml file in this way.
environment:
BOOST_ROOT: C:\Libraries\boost_1_59_0
BOOST_LIBRARYDIR: C:\Libraries\boost_1_59_0\lib64-msvc-14.0
I update it correspondingly for boost_1_67_0 since I am using Visual Studio 2017 in appveyor and boost already installed in appveyor Virtual Machine.
https://www.appveyor.com/docs/windows-images-software/#boost
environment:
BOOST_ROOT: C:\Libraries\boost_1_67_0
BOOST_LIBRARYDIR: C:\Libraries\boost_1_67_0\lib64-msvc-14.1
I do not have .yml file , I set those two the environmental variables manually in the project's setting in appveyor.
I am wondering what is the correction setting for those two environment variables to run boost test? Current setting has compile error.

Acutually, this is very easy question. We should make the build environment are same between my local machine and appveyor.
In appveyor :
environment:
BOOST_ROOT: C:\Libraries\boost_1_64_0
BOOST_LIBRARYDIR: C:\Libraries\boost_1_64_0\lib64-msvc-14.1
In Visual Studio :
Project-> Properties-> C/C++ ->General -> Additional Include Directories : C:\Libraries\boost_1_64_0
Project-> Properties->Linker -> Additional Library Dependencies : C:\Libraries\boost_1_64_0\lib64-msvc-14.1
Just move the boost_1_64_0 in the Libraries and change the library from stage_x8\lib to lib64-msvc-14.1 is OK.

Related

How to generate C API for onnxruntime on Linux

I am trying to build onnxruntime from source on Linux. According to this instruction I have successfully built python wheels and shared libs. But I have not seen headers for C API.
There is a build option --build_csharp which seems to enable C#/C packages. I tried to add this option but got following errors.
CMake Warning at CMakeLists.txt:137 (message):
Language Csharp is not found in the system
I installed dotnet-sdk-3.1 but still got this error. Can I ask how to properly generate onnxruntime C API on Linux? Thanks!
Please try the following steps:
- Steps to build ONNX from source code:
1. git clone --recursive https://github.com/Microsoft/onnxruntime
2. Get the commit ID of the version you want to build (In case you want older version)
3. git checkout "your commitID"
4. Install the required version of Cmake on your system
6. Run: <path>\build.sh --config Release --build_shared_lib --parallel
7. A build folder will be created in the onnxruntime.
5. Get the onnxruntime.dll from the dir: \onnxruntime\build\Windows\Release\Release
6. Get the required headers (onnxruntime_c_api.h, onnxruntime_cxx_api.h, onnxruntime_cxx_inline.h)
from the dir: \onnxruntime\include\onnxruntime\core\session and put it in the unit location.

MongoDB can't compile on Windows 7

Trying to cmake mongodb C Driver on Windows 7 and got this error:
D:\db\mongodb\mongo-cxx-driver-master\build>cmake ..
-- No build type selected, default is Release
-- Auto-configuring bsoncxx to use boost std library polyfills since C++17 is in
active and compiler is MSVC
CMake Error at src/bsoncxx/CMakeLists.txt:81 (find_package):
By not providing "Findlibbson-1.0.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"libbson-1.0", but CMake did not find one.
Could not find a package configuration file provided by "libbson-1.0"
(requested version 1.10.0) with any of the following names:
libbson-1.0Config.cmake
libbson-1.0-config.cmake
Add the installation prefix of "libbson-1.0" to CMAKE_PREFIX_PATH or set
"libbson-1.0_DIR" to a directory containing one of the above files. If
"libbson-1.0" provides a separate development package or SDK, be sure it
has been installed.
libbson is installed
Don't understand where should I set a libbson directory

Build error on Appveyor with newest ASP.NET 5

I'm trying to build an ASP.NET 5 web api and build it on Appveyor. I get this error:
Build started
git clone -q --branch=master https://github.com/nikolaschou/TodolistService01.git C:\projects\todolistservice01
git checkout -qf 3c97bb95ecf54662069b6ae8fa25a60f598a564d
msbuild "TodolistService.sln" /verbosity:minimal /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
Microsoft (R) Build Engine version 14.0.24720.0
Copyright (C) Microsoft Corporation. All rights reserved.
Cannot find DNX runtime dnx-clr-win-x86.1.0.0-rc1-update1 in the folder: C:\Users\appveyor.dnx\runtimes
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.targets(126,5): error : The Dnx Runtime package needs to be installed. See output window for more details. [C:\projects\todolistservice01\src\TodolistService\TodolistService.xproj]
Command exited with code 1
This project is based on .NET framework 4.6.1 and ASP.NET 5. The references are DNX 4.5.1 and DNX Core 5.0.
Feel free to reproduce the error by building this public repository:
https://github.com/nikolaschou/TodolistService01
Can anyone explain why it fails? Is Appveyor not yet ready for these new versions?
Basically, you have to do two things:
install .NET framework
restore packages
This is appveyor.yml to build your project:
os: Visual Studio 2015
install:
- dnvm upgrade -r clr
- dnu restore
build:
verbosity: minimal
Build results: https://ci.appveyor.com/project/FeodorFitsner/todolistservice01
Also, you may need to select right version in your global.json:
{
"sdk": {
"version": "1.0.0-rc1-final"
}
}

NuGet restore during first asp.net vNext project

Today I installed ASP.NET 5 on windows and begun creating my first application in Visual Studio 2015.
When the project loads I get an error: "Package restore failed", specifically the following error:
Restore failed Det gick inte att hitta en del av s�kv�gen C:\Users\h\.dnx\packages\Microsoft.Win32.Primitives\4.0.0\Microsoft.Win32.Primitives.4.0.0.nupkg.sha512. NuGet Config files used:
C:\Users\h\AppData\Roaming\NuGet\nuget.config
C:\Users\h\documents\visual studio 2015\Projects\NextTest\nuget.config
Feeds used:
https://api.nuget.org/v3-flatcontainer/
C:\Program Files (x86)\Microsoft Web Tools\DNU
When I look for the missing file I find the following path missing:
C:\Users\h\.dnx\packages\Microsoft.Win32.Primitives\4.0.0\Microsoft.Win32.Primitives.4.0.0.nupkg.sha512
But this one exists, note the extra 0 in the version:
C:\Users\h\.dnx\packages\Microsoft.Win32.Primitives\4.0.0.0\Microsoft.Win32.Primitives.4.0.0.0.nupkg.sha512
How would I go about to solve this?
I've tried to search through the project files but no mention of neither Primitives nor verion 4.0.0.
The "Solution DNX SDK version" is 1.0.0-beta8, (beta5 was also available but not selected).
Delete C:\Users\h.dnx\packages folder and try running "dnu restore" command.

Eclipse juno + cuda plugin error

I am using Eclipse Juno parallel version. I have installed
cuda plugin. But while building a sample cuda helloworld
program I am getting error -
make all
make: *** No rule to make target `exe_cuda', needed by `all'. Stop.
******Makefile snapshot**************
all: exe_cuda
# Tool invocations
#echo 'No tool found that can build the extension specified with the build
artifact name $#'
# Other Targets
clean:
-$(RM) $(OBJS)$(C_DEPS) exe_cuda
-#echo ' '
Any suggestion......
I agree that the toolchain does not appear to be set up properly for C projects.
My suggestions are:
Create a C++ project instead. That seems to work.
Use Nsight Eclipse Edition instead. It is installed automatically with the linux CUDA 5 package (just type nsight from a terminal window).
You could report the problem to fixstars corporation, the developer of that cuda plugin. It seems they have not updated it since 2011, so I don't know if it's actively maintained. But the help page is here which includes a link for a mailing list you could use.