cannot seem to get boost and quantlib directories to align - c++

I have tried a number of different methods to try and get QuantLib to work on my windows machine. I would prefer to have QuantLib running in eclipse (so if anybody has any help in this direction I would be much appreciated!).
However, most online tutorials give their instructions using Visual Studio so I decided to try and get it working using this. I have followed this tutorial to a T and I still cannot get it working.
I have a folder looking like the following:
(My computer >> Documents >> cplusplus)
Next I enter the "QuantLib" folder and open the file "QuantLib.sln" where I enter visual studio.
I highlight the two projects in the solutions folder and select the wrench / properties tab
Which brings me to this tab:
Note that Todas las config = all config and Todas las plataformas = all platforms from minute 5.55 of the Youtube video.
I then go to "Directorios de VC++" - "VC Directories" and apply the following settings:
I then click "build /Compilar" -> build solution
I get the following error:
So how can I match Boostup with Quantlib and C++ - I like eclipe but at this stage I just want to understand the quantlib package
EDIT:
In the video the screen shot is the following:
Where I have in the intermediate directory the following: .\build\$(qlCompilerTag)/\$(Platform)\$(Configuration)\ which is different to the video. Additionally they have the following which includes an (includePath) addition to the include directoies tab:
Just some additional observations I noticed...
EDIT 2: I have also modified the directorios intermedio line to match the Youtube videos results. It was set at some default value beforehand. (i.e. qlCompilerTag)/ was something differnet.
EDIT 3:
I changed the directories:
and get this ouput:
EDIT 4:
(removed the underscore)
With the following output:
##### EDIT (Following the official documentation)
I think I managed to solve the main issue I was having but now I am getting a new issue.
When I build the solution I get the following error:
When I go to the folder C:\Users\Matt\Documents\cplusplus\boost_1_73_0\lib64-msvc-14.1 I locate the following files.
So Visual Studio is looking for the wrong files. What have I done wrong here? I downloaded the 64 bit version of boost? Is there a 32 bit version?

Related

I used uDraper plugins in source edition UE5,tips build through you IDE

I used Draper in Source Edition UE5(release version UE4.24 and UE5.0.3 works correctly ), operated 1,2, and 3 according to ReadMe in the installation path, and also replaced BuildId. However, when I opened the project tips : build through you IDE
I get an error when I don't follow the README:
enter image description here
ReadMe Info:
uDraper plugin is distributed in a binary form (without source code).
There where some undocumented but well known ways to achieve this without breaking the build of C++ projects in UE4.
But in UE5 it seems not to be the case anymore (there are plenty of complaints about this issue on the Internet).
At this point we can suggest a somwhat hacky way to make your C++ projects work properly in the presence of uDraper plugin:
Copy UnrealBuildTool.DraperHook.* files into [UE5 Root]\Engine\Binaries\DotNET\UnrealBuildTool
Replace "UnrealBuildTool.exe" with "UnrealBuildTool.DraperHook.dll" in [UE5 Root]\Engine\Build\BatchFiles\Build.bat
replace "UnrealBuildTool.exe" with "UnrealBuildTool.DraperHook.exe" in [UE5 Root]\Engine\Config\BaseEngine.ini ("UnrealBuildTool" value under "PlatformPaths" section)
It's still a work in progress so we hope to find a better solution in the future.
Regarding custom Engine builds we expect that the binary distribution of the uDraper plugin should be compatible as long as ABI didn't change.
Just replace "BuildId" in Draper\Binaries\Win64\UnrealEditor.modules to your "CompatibleChangelist" from [UE5 Root]\Engine\Build\Build.version
step 1:
enter image description here
step 2: The original file says "UnrealBuildTool.dll" not "UnrealBuildTool.exe"
enter image description here
step 3:
enter image description here
The above modification is still the error of FIG. 1
step 4:
enter image description here
open project
enter image description here
I opened the project with VS and compiled it successfully, and opened it again with the same erro.Previously, the plug-in was placed in the project path to open the project promptFailed to generate Projiect files,
We try to keep uDraper plugin up to date with official UE releases and do not attempt to support custom builds from GitHub.
The instructions you're referring to might be helpful but we do not guarantee that it will work with any GitHub version.
You can try to find an earlier UE version on GitHub to better match an officially released version and try it out.

Automatically generated WAF solution fails to load

Cryengine as an SDK has recently switched from providing pre-made solutions to forcing developers to use a WAF based build system to automatically generate a visual studio solution. Right now, there's very little communication coming from Crytek about problems everyone is having with the new build system so I was hoping someone here might be able to help.
I'm getting Cry-WAF (Crytek's WAF based build system) to generate a solution, but when I open it it provides an error (quoted below) and in the solution explorer appends (load failed) to each project in the solution. I first had an issue generating the solutions with Cry-WAF's msvs.py script saying it couldn't gather properties for platforms/configurations, but that eventually stopped and allowed the solution to be generated with the quoted problem.
A generic google search on the root cause suggested I try enabling IIS, but that has done nothing to fix the problems. Editing the .vcxproj files shows that they're correctly listing the paths to all files associated with that project. The only thing missing in the solution seems to just be the information that would tell what compiler to use, target names, target paths, etc. With what little I know about WAF as a build system, I'd assume that the python code Crytek is using to gather that information is just utterly failing.
Does anyone have a suggestion on what could possibly be done?
c:\Program Files (x86)\Steam\SteamApps\common\CRYENGINE\CRYENGINE_pc_eaascode\Solutions.depproj\CryAction.vcxproj : error : The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.
1) Specified argument was out of the range of valid values.
Parameter name: index
Resulting in: An exception occurred while trying to get the value of property 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef.VCConfigurationShim'.
Resulting in: Cannot get export 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef.VCConfigurationShim (ContractName="Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationShim")' from part 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef'.
Element: Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef.VCConfigurationShim (ContractName="Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationShim") --> Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef
Resulting in: Cannot set import 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCLegacyEventsTranslator.VCConfiguration (ContractName="Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationShim")' on part 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCLegacyEventsTranslator'.
Element: Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCLegacyEventsTranslator.VCConfiguration (ContractName="Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationShim") --> Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCLegacyEventsTranslator
Resulting in: Cannot get export 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCLegacyEventsTranslator (ContractName="Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCLegacyEventsTranslator")' from part 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCLegacyEventsTranslator'.
Element: Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCLegacyEventsTranslator (ContractName="Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCLegacyEventsTranslator") --> Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCLegacyEventsTranslator
Resulting in: Cannot set import 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef.EventsTranslator (ContractName="Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCLegacyEventsTranslator")' on part 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef'.
Element: Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef.EventsTranslator (ContractName="Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCLegacyEventsTranslator") --> Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef
Resulting in: Cannot get export 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef.VCConfigurationShim (ContractName="Microsoft.VisualStudio.ProjectSystem.ConfiguredProject.HostObject")' from part 'Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef'.
Element: Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef.VCConfigurationShim (ContractName="Microsoft.VisualStudio.ProjectSystem.ConfiguredProject.HostObject") --> Microsoft.VisualStudio.Project.VisualC.VCProjectEngine.VCConfigurationMef
At the moment only Visual Studio 2012 is supported, so issues with Visual Studio 2013 are to be expected.
There is a thread on their forums dedicated to helping with WAF problems, which includes getting it up and running with Visual Studio 2013: http://www.cryengine.com/community/viewtopic.php?f=314&t=130850
The WAF documentation is here: http://docs.cryengine.com/display/SDKDOC4/Getting+Started+with+WAF
You will find help much more quickly on the CRYENGINE forums - few users habitually check Stack Overflow for these types of questions.

Custom autoformat in Xcode [duplicate]

As a C# developer, I have become highly dependent on the automatic formatting in Visual Studio 2008. Specifically, I will use the CTRL + K , D keyboard shortcut to force things back into shape after my sloppy implementation.
I am now trying to learn Objective-C and am missing certain features in Xcode, but probably none are quite as painful as the formatting shortcut. My Google searches have yielded nothing built in, though it seems there are some hacks. Am I missing something or does this feature not exist natively in Xcode?
That's Ctrl + i.
Or for low-tech, cut and then paste. It'll reformat on paste.
Unfortunately, Xcode doesn't have anything nearly as extensive as VS or Jalopy for Eclipse available. There are SOME disparate features, such as Structure > Re-Indent as well as the auto-formatting used when you paste code into your source file. I am totally with you, though; there definitely should be something in there to help with formatting issues.
I'd like to recommend two options worth considering. Both quite new and evolving.
ClangFormat-Xcode (free) - on each cmd+s file is reformatted to specific style and saved, easy to deploy within team
An Xcode plug-in to format your code using Clang's format tools, by
#travisjeffery.
With clang-format you can use Clang to format your code to styles such
as LLVM, Google, Chromium, Mozilla, WebKit, or your own configuration.
Objective-Clean (paid, didn't try it yet) - app raising build errors if predefined style rules are violated - possibly quite hard to use within the team, so I didn't try it out.
With very minimal setup, you can get Xcode to use our App to enforce
your rules. If you are ever caught violating one of your rules, Xcode
will throw a build error and take you right to the offending line.
In xcode, you can use this shortcut to Re-indent your source code
Go to file, which has indent issues, and follow this :
Cmd + A to select all source codes
Ctrl + I to re-indent
Hope this helps.
My personal fav PrettyC wantabe is uncrustify: http://uncrustify.sourceforge.net/. It's got a few billion options however so I also suggest you download UniversalIndentGUI_macx, (also on sourceforge) a GUI someone wrote to help set the options the way you like them.
You can then add this custom user script to uncrustify the selected text:
#! /bin/sh
#
# uncrustify!
echo -n "%%%{PBXSelection}%%%"
/usr/local/bin/uncrustify -q -c /usr/local/share/uncrustify/geo_uncrustify.cfg -l oc+ <&0
echo -n "%%%{PBXSelection}%%%"
You can use Command + A to select all content and next Ctrl + I to format the selected content.
I also feel xcode should have this function.
So I made an extension to do it: Swimat
Simple install by brew cask install swimat
You can give it a try, see https://github.com/Jintin/Swimat for more information.
Cmd A + Ctrl I
Or Cmd A And then Right Click. Goto Structure -> Re-Indent
Consider buying yourself a license for AppCode, an intelligent Objective-C IDE that helps iOS/OS X developers. AppCode is fully compatible with Xcode, but goes beyond Xcode in adding powerful features.
AppCode an Objective-C variant of the Intellij IDEA IDE from JetBrains. They are also authors of popular ReSharper extension to Visual Studio, which main purpose from here seems like a desperate attempt to bring a touch of IDEA experience to a Microsoft product.
AppCode is using its own code analyser which gives close-to-perfect refactoring and code navigation support. There is an ability to re-indent and completely reformat code also (although I still keep missing a couple of formatting settings in hard cases, but mostly it works well).
You might try the trial version, of course.
Swift - https://github.com/nicklockwood/SwiftFormat
It provides Xcode Extension as well as CLI option.
CTRL + i
that's it.
(no COMMAND + i)
You can also have a look at https://github.com/octo-online/Xcode-formatter which is a formatter based on Uncrustify and integrated into Xcode. Works like a charm.
You could try that XCode plugin https://github.com/benoitsan/BBUncrustifyPlugin-Xcode
Just clone github repository, open plugin project in XCode and run it. It will be installed automatically. Restart Xode before using formatter plugin.
Don't forget to install uncrustify util before. Homebrew, for exmaple
brew install uncrustify
P.S. You can turn on "after save formatting" feature at Edit > Format Code > BBUncrustifyPlugin Preferences > Format On Save
Hope this will be useful for u ;-)
I suggest using ClangFormat. In order to install, please follow these steps:
Install Alcatraz package manager for XCode
Supports Xcode 5+ & OS X 10.9+
After installation restart XCode.
Open XCode -> Window Menu -> Package Manager
Search (find) ClangFormat and install it. After installation again restart XCode.
Now at XCode menu you can use Edit -> Clang Format submenu for formatting.
You can choose different types of formatting. Also by enabling Format On Save you can gain auto-format capability.
If your Xcode version 3.x , you should use "User Script" With Uncrustify , here this a Example:
#!/bin/sh
echo -n "%%%{PBXSelection}%%%"
$YOURPATH_TO_UNCRUSTIFY/uncrustify -q -c $YOURPATH_TO_UNCRUSTIFY_CONFIG/CodeFormatConfig.cfg -l OC+
echo -n "%%%{PBXSelection}%%%"
add above to your Xcode "User Script".
if Xcode version 4.x , I think you should read this blog : Code Formatting in Xcode 4,
In this way , used the "Apple Services" , but it's not good enough , cause too slow experience, does anyone has the same thing ?
why apple drop "user script" .... xD
First, Examine XCode Preferences "Indentation" section. You can customize things quite a bit there...
For more fine grained control, refer to the XCode User Defaults document from apple. (May require a developer login to view). For example, I was able to disable the "indent on paste" by entering the following in terminal:
defaults write com.apple.XCODE PBXIndentOnPaste No
to read back your setting:
defaults read com.apple.XCODE PBXIndentOnPaste
This only works for languages with are not whitespace delineated, but my solution is to remove all whitespace except for spaces, then add a newline after characters that usually delineate EOL (e.g. replace ';' with ';\n') then do the ubiquitous ^+i solution.
I use Python.
Example code, just replace the filenames:
python -c "import re; open(outfile,'w').write(re.sub('[\t\n\r]','',open(infile).read()).replace(';',';\n').replace('{','{\n').replace('}','}\n'))"
It 's not perfect (Example: for loops), but I like it.
We can use Xcode Formatter which uses uncrustify to easily format your source code as your team exactly wants to be!.
Installation
The recommended way is to clone GitHub project or download it from https://github.com/octo-online/Xcode-formatter and add the CodeFormatter directory in your Xcode project to get :
Xcode shortcut-based code formatting: a shortcut to format modified sources in the current workspace
automatic code formatting: add a build phase to your project to format current sources when application builds
all sources formatting: format all your code with one command line
your formatting rules shared by project: edit and use a same configuration file with your project dev team
1) How to setup the code formatter for your project
Install uncrustify
The simplest way is to use brew:
$ brew install uncrustify
To install brew:
$ ruby –e “$(curl –fsSkl raw.github.com/mxcl/homebrew/go)”
Check that uncrustify is located in /usr/local/bin
$ which uncrustify
If your uncrustify version is lower than 0.60, you might have to install it manually since modern Objective-C syntax has been added recently.
Add CodeFormatter directory beside your .xcodeproj file
Check that your Xcode application is named "Xcode" (default name)
You can see this name in the Applications/ directory (or your custom Xcode installation directory). Be carefull if you have multiple instances of Xcode on your mac: ensure that project's one is actually named "Xcode"!
(Why this ? This name is used to find currently opened Xcode files. See CodeFormatter/Uncrustify_opened_Xcode_sources.workflow appleScript).
Install the automator service Uncrustify_opened_Xcode_sources.workflow
Copy this file to your ~/Library/Services/ folder (create this folder if needed).Be careful : by double-clicking the .workflow file, you will install it but the file will be removed! Be sure to leave a copy of it for other users.
How to format opened files when building the project
Add a build phase "run script" containing the following line:
sh CodeFormatter/scripts/formatOpendSources.sh
How to format files in command line
To format currently opened files, use formatOpenedSources.sh:
$sh CodeFormatter/scripts/formatOpendSources.sh
To format all files, use formatAllSources.sh:
$sh CodeFormatter/scripts/formatAllSources.sh PATH
PATH must be replaced by your sources path.
E:g; if project name is TestApp then the command will be
$sh CodeFormatter/scripts/formatAllSources.sh TestApp
it will look for all files in the project and will format all the files as configured in uncrustify_objective_c.cfg file.
How to change formatter’s rules
Edit CodeFormatter/uncrustify_objective_c.cfg open with TextEdit
Well I was searching for an easy way. And find out on medium.
First to copy the json text and validate it on jsonlint or something similar. Then to copy from jsonlint, already the json is formatted. And paste the code on Xcode with preserving the format, shortcut shift + option + command + v

How to Get & build chromium (svn client too old)

I am trying to get & build chromium on win7 & VS 2010.
I follow http://www.chromium.org/developers/how-tos/build-instructions-windows
and http://www.chromium.org/developers/how-tos/get-the-code but no luck.
This document is confusing for me, especially for depot tool.
Can someone guide me step how to get code (i am getting error svn to old - put director in front & in end one by one).
is there some video or better step by step tutorial. I would like direct svn checkout. (if i use cygwin svn its give missing file on compilation)
I had this same problem and managed to fix it by running:
gclient runhooks --force
The documentation says it should be run inside the src folder but this didn't work for me, running it in the folder that contains the src folder fixed it.
I also found another problem in the "Official/WPO/LTCG build" section of documentation that causes C1083 PCH file not found errors.
To fix this you need to set the chromium_win_pch variable to zero in the ~.gyp\include.gypi (C:\Users\USERNAME\.gyp\include.gypi), like this:
{
'variables': {
'chromium_win_pch': 0,
}
}

The Xcode4.2 with ASIHTTPRequest configuration

I installed ASIHTTPRequest follow the document on their official site . But still have errors here. Please help. The related info is as follows :
Xcode 4.2 build 4D58
Lion 10.7.2
I can not upload the images because I am rookie here.(now I upload to site and linked here)
http://roundmov.com/project.png
build settings and build phrase png is here :
http://www.roundmov.com/buildphases.png
I have added all the files including external dir. and added libraries ,all of them in docs mentioned.
Even added the header search paths as $[SDKROOT]/usr/include/libxml2
But still have 107 or 67 errors . This problem has boring me one more day.
Thanks a lot in advance!
How can I disable ARC for a single file in a project?
If you follow the instructions here for all of the ASIHTTPRequest files it will compile as you need to disable arc on those files.
ah right, yep, so ASIHTTPRequest isn't ARC compatible and it doesn't look like that will change. i've never actually "downgraded" a project from ARC to non-ARC, but if it's something you've just started on you could create a new project and uncheck the ARC checkbox when you do and re-add all your existing files. this will mean you need to handle the memory management of objects (retain/release/autorelease).
this thread has more info:
https://groups.google.com/group/asihttprequest/browse_thread/thread/3f26e442dc6868e8
as an alternative, you could look into AFNetworking:
https://github.com/AFNetworking/AFNetworking
you still need to take some extra steps to get it working with ARC, but it doesn't look too bad.