QuantLib 1.8.1 build error - boost

I cannot directly download boost library nor quantlib from sourceforge.net/ due to web control inside company. So I downloaded QuantLib v1.8.1 from github, added linking to boost library v1.60 (I also tried v1.61) which is available in the share folder (I tested, boost library works fine), and tried to build under VS2015 x64-release.
The error message I got was (after processing to errors.cpp):
C2757 'boost': a symbol with this name already exists and therefore this name cannot be used as a namespace name.
I'm wondering if it's due to a setup error? How to fix it?
Thanks.

Related

Linker error building Adobe DNG SDK on MacOS 11

I am working on a project that uses Adobe's DNG SDK 1.6 library, and it is supposed to work on Windows and MacOS.
The library has instructions on how to build it for both platforms, but I had to figure out an error that came up on Windows with Visual Studio. I am not very experienced with big C++ projects so it was not trivial but I got it working. Most of my own code will be done in C# .Net Core, calling the native libraries using a wrapper class with P/Invoke.
Now for Mac that's a different story, I have a MacOS 11 VM, installed Xcode 12.5.1 and followed the steps provided, as expected, it does not work. Bare in mind this is my first time touching Xcode and MacOS.
The project I am trying to build is dng_validate, and it depends on two libraries built by these projects: XMPFiles64 and XMPCore64.
The library projects build without any hiccups, each one of them creating a ".a" file in the folder: dng_sdk_1_6/xmp/toolkit/public/libraries/macintosh/intel_64_libcpp/Debug, they are named libXMPFilesStaticDebug.a and libXMPCoreStaticDebug.a respectively.
When I try to build the dng_validate project, I get the following error:
Library not found for -lXMPFilesStaticDebug
Because of the the error starting with an "l" instead of "lib", under both libraries project settings, I changed the "Executable Prefix" setting to "l" instead of "lib". Rebuilt both of them and made sure the file names changed as expected. But the error persists when trying to build the main project.
Under dng_validate's project settings, there is a setting called "Library Search Paths" and it does point to the proper aforementioned folder using a relative path. I even changed it to an absolute path to see if that would make it work.
I am really lost here, does anyone have an idea of what might be causing it?
Well... After asking on other forums and almost hiring a freelancer to fix this for me, I tried another shot in the dark of renaming the library files and it worked.
I changed the extensions of libXMPFilesStaticDebug.a and libXMPCoreStaticDebug.a from ".a" to ".dylib" and it just compiled and blew my mind with it.

Xamarin Shared Library namespace cannot be found

My shared library cannot resolve using RestSharp; among other related namespaces. RestSharp is an installed package and is resolvable in the Droid/iOS projects but cannot be found in the Shared Library. I know this works because I'm using RestSharp in a MonoGame project in the same way. The shared library is referenced in the Droid/iOS projects but still fails during compilation.
Any advice? I tried clean all.
Update I created a new Cross Platform Native app solution and I was able to reference in my shared library without issue. That original project is a bit older and was created with PCL originally. I still want to know why it's not working in my original solution.
I continued to have lots of namespace and type not found issues. Once I showed warnings instead of just errors I found that the csproj was missing. After removing the reference in the native apps and re-adding the issue was resolved. Quite frusterating.

Still I receive an error "LINK : fatal error LNK1104: cannot open file 'opencv_ffmpeg231.lib"

Beginner in Image Processing with OpenCV. I am trying to load an Image in VS2010 with OpenCV 2.3.1. However I have the libraries included and the system variables updated. I have checked couple of other forums suggesting using a different version of OpenCV. I have tried using OpenCV 2.4.0 and 2.3.0 and its the same error I receive. Any workaround for this would break the barrier!!
I would suggest that you check to make sure your directories and environmental variables are entered correctly. Then try manually retyping the libraries in the linker, carefully making sure you entered it correctly.
Check in your 'lib' folder (C:\opencv\build\x64\vc10\lib) to make sure you put the right file name in your additional libraries. For example, you could have file opencv_ffmpeg231.lib from version 2.3.1. This may have been the case during the making of the tutorial but change the number to your current version.
i.e, for version 2.4.7 it would be *opencv_ffmpeg247.lib*
just check your "lib' folder to make sure they're the same name
Also, Try this youtube Tutorial for installing OpenCv on Visual Studio. --> http://www.youtube.com/watch?v=cgo0UitHfp8

Script# - Getting the latest build to compile

I've downloaded (cloned the repository) of script# from https://github.com/nikhilk/scriptsharp
Only I can't figure out how to get the source to compile.
I have installed ScriptSharp 0.7.3.0 as it seems to have a dependency on the installed directory to be present in the build.
I have looked around in the source code for some instructions and on google to no success.
Edit
Seems that the Libraries won't compile for me.
In particular the CoreLib is requesting the a reference to 'mscorlib' be added
BTW I really recommend using script# for complex projects with rich web client experiences.
Especially coupled with knockout.js
I had no problem compiling the whole solution. (v 0.7.3) In fact the CoreLib project seems not having any external reference at all. (CoreLib compiles to mscorlib.dll). You could try to download the complete source package again, open and compile the ScriptSharp solution.

Using Boost Windows Installer - do I still need to make the non header only libraries?

I'm using the Boost Windows installer provided by boostpro.com and already have all the compiled binaries present in my boost_1.44/lib folder. However, when I'm trying to use the boost filesystem library, I'm getting a build error saying that
LINK : fatal error LNK1104: cannot open file 'libboost_system-vc90-mt-gd-1_44.lib'
I'm using Visual Studio 9, and I don't have a file called 'libboost_system-vc90-mt-gd-1_44.lib'. Any ideas on what I should do next?
You either need to compile the variant of Boost with "threading=multi runtime-debugging=on variant=debug" as that's not a variant that normally comes with the BoostPro installer (AFAIK); or switch your project to use a different variant. Most likely you need to turn off the "runtime-debugging=on" in VC, which translates to turning off the debug STD. See the Getting Started for what the name of the library it's asking for means.

Resources