Compilation errors - RadeonRays API based application? - visual-studio-2017

this is more of a generic question !
Some info:
First of all i am not an experienced programmer.
I am trying to create a simple renderer based on RadeonRays (Radeon Rays)
I was able to install all required packs - CMake, Python etc...
However in the github page it says that it does require Visual Studio 2015 and i am having 2017.
I created successfully a solution for VS 2017 like this ( NO ERRORS ):
cmake -G "Visual Studio 15 2017 Win64"
Then i compiled the project successfully ( NO ERRORS ) !
The Problem:
I created a new project and included the radeon rays library. All seems ok and got no errors. However i got some compiler errors when i try to compile my project ( visible in the image below ). The errors are all related to a single header file.
As i am not experienced programmer, only option i have, is to ask if one can say if this is because i am trying to use VS2017 instead of VS2015.
I am not allowed to install VS2015, that's why i am looking for some professional opinion if this might be related to VS version, cause i am getting only compilation errors !
Thanks !

i finally found the problem and solution.
I simply had to define WIN32 or to include the windows.h file in the new project.

Related

Not able to create VC++ project Visual Studio 2015 Community

I am unable to create a VC++ project in VS2015 Community. When I attempt to do so, I get two messages starting with, 'The "Visual Studio C++ Project System Package" did not load correctly.' Then this fatal message appears:
I also have VS2005 Professional installed on my machine; I need the two for different projects.
This seemed similar to not able to create VC++ project, with VS11 so I created a batch file that sets those env vars and then calls devenv.exe for VS2015. Still got the same error messages.
Visual Studio 2015 (community)- cannot create new project c++ suggests an incompatibility between two versions and to delete an old directory. But as I need both versions, that does not seem to be a good solution either (and suggestion didn't appear to help that OP).
As final data points, Intel Visual Fortran 2017 is installed and integrated with VS2015, and I note that a resulting VFPROJ file is in the pre-VS2010 format - .vcproj format with <VisualStudioProject> being an element.
At any rate, I cannot create a new project inside VS2015 for C++ and would appreciate your help towards a solution.
I chose Repair for on VS2015 under Control Panel - Programs and Features and I am now able to create a C++ project. I will continue testing by creating a nother Fortran project and if it causes the problem to recur I will repost.

Visual Studio 2013, error MSB8020: The build tools for Visual Studio 2010 cannot be found

At the start I'd like to note that I've spent some time researching this issue and suggested solutions for similar questions like this one didn't help me.
Problem background
I need to migrate a Firebreath plugin project (which I haven't worked on previously) from PC_1 to PC_2.
As far as I'm aware the project was started on PC_1 on Visual Studio 2010 and later moved to Visual Studio 2013 Pro. There's one solution consisting of 19 projects. I have an instruction which says that in order to get the plugin installer I should first Build project_x and after that Build project_y_WiXInstall. Both steps work without any issues on this machine.
Then there's PC_2 which had Visual Studio 2015 Community installed before I started working on it. I've removed it, installed Visual Studio 2013 Pro (version 12.0.21005.1 REL - exactly the same as on PC_1), moved all of the needed files and I'm trying to get rid of all of the compilation errors. So far I figured out I had to install Cmake 2.8, Windows Driver Toolkit 7.1 and manually override an incorrect VCTargetsPath MSBuild variable
Problem description
Currently when I try to compile the project on the new machine I get these two errors (this is an image link since I can't embed images yet on this account). I'm not sure what's going on with the first error message since it looks incomplete and the file CUSTOMBUILD doesn't exist, but I'm not bothered by it too much since the previous compilation error I fixed also had a similar "artifact" as the first error and it disappeared after fixing the second one.
The covered part of the second error message is the project path. The error origin (Microsoft.Cpp.Platform.targets file, line 64) looks like this:
<!-- Error out if toolset does not exists in Visual Studio 2010 or 2012 -->
<VCMessage Code="MSB8020" Type="Error" Arguments="$(_CurrentPlatformToolsetShortName);$(PlatformToolset)" Condition="'$(ToolsetTargetsFound)' != 'true'" />
What didn't help
The error description suggests using an Upgrade Solution... option, but there's no such thing when I right-click the solution
As an accepted answer for the question I've posted at the start of my post suggests, I've checked the Properties of all 19 of my projects (including the project ZERO_CHECK) but their Platform Toolset is already set to Visual Studio 2013 (v120).
I've also tried changing the Platform Toolset to inherit from parent or project defaults for all of the projects. This resulted in it switching to Visual Studio 2010 (v100) (not installed) and after that I've right-clicked on the projects and chose Upgrade VC++ compiler and libraries. After this the Platform Toolset was back to the Visual Studio 2013 (v120) but it didn't help with the compilation error.
As a NON-accepted answer for the question I've posted at the start of my post suggests, I've tried searching for all of the occurrences of 10.0 and V100 in all of my .vcxproj files to replace them but I haven't found any occurrences of them.
[EDIT]
I just got an idea to try building the project with MSBuild from the command line. There's a bit more info compared to errors inside Visual Studio, so maybe it will help with resolving the issue: https://pastebin.com/JhN3dXM3
So the thing you're missing here is that FireBreath projects are built using CMake -- the actual contents of the build directory should always be completely temporary and never stored in source control. To build the project on a new computer you need to run the prep command again from scratch.
If the previous maintainer changed the build files manually and/or migrated it to a newer version of visual studio without using cmake to do it then they did some very ugly things and all bets are off... good luck.
This is why all the firebreath documentation (I wrote most of it) strongly urges that the build directory be transient and you always do project file updates in cmake.
Hope that helps!

Building OpenCV 3.0.0's DLLs for Visual Studio 2015 with Cmake

Following the instructions here:
docs.opencv.org/doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.html#windows-visual-studio-how-to
I setup an OpenCV project in VS 2015 Community and used the pre-built libraries. It works until I get this message:
"MSVCP120D.dll is missing from your computer"
From doing some searching I gathered this means that the pre-build libraries are only supposed to be used with an older version of VS so I figured I'd just compile them myself using this:
docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html#windowssetpathandenviromentvariablehere
While it appears to compile properly and despite flagging "BUILD_SHARED_LIBS" I can't find any DLL files in the output - just a lot of VS solutions:
imgur.com/JdSc5CH
Would someone be able to give me some advice on how to generate the DLLs?
thanks!
I'm a beginner at this stuff. I've since learned a lot about Visual Studio, about CMake and about OpenCV. Got it all working now, took me a day or two.
It turns out you have to compile the openCV library from git repository in order to be compatible with Visual Studio (VS14) 2015. As of this date, no go on pre-compiled version supporting VS14.
I've organized what I've learned, placed it online here in case anybody else has the same frustrations. Its pretty detailed, too much content to post here.
VS2015 uses MSVCP140.dll, I think your error message is about a redistributable package of VS2013.
And try BUILD_SHARED_LIBS as on/off.

Il mismatch between 'P1' version '20080116' and 'P2' version '20070207'

I am building MFC application which uses other c++ library.I am using vs 2008 and compiled all the library project in vs 2008.
It is compiling well in debug mode but failed to run in Debug Unicode mode,Release,Release Unicode mode.
I found in the net that VS 2008SP1 is required to be installed but how come it is compiling in debug mode.
Please suggest how to overcome this problem.
If compiling a solution with multiple projects you should compile all projects with the same compiler (version) to be sure it works.
I once got the same error message like you. If I remember correctly the problem occured because link time code generation was used. My solution was to rebuild all, another solution might have been disabling link time code generation.
In Microsoft terminology, P1 is the parser (front-end), and P2 is the code generator (back-end). With link-time code generation (LTGC) enabled, the result of P1 is stored in a file and P2 is performed later at link time.
If you downgraded your compiler, you should do a full rebuild, otherwise the link step will try to use the incompatible P1 output, which will trigger that error.
If you upgraded the compiler, Visual Studio automatically does a full rebuild, so this should never happen (if it does anyway, just perform a full rebuild).
I had this problem just with other numbers as well using Visual studio 2015.
The problem was in one of the libraries that I linked to my project was build using VS2015 Update 3. The solution that worked for me - update Visual Studio to 2015 Update 3.
In my case, I just installed Microsoft Visual Studio 2008 Service Pack 1 (Installer) which resolved the problem. Service Pack can be downloaded from following link:
https://www.microsoft.com/en-us/download/confirmation.aspx?id=10986

Open CV 2.2 Include Directory Missing

I have several Windows 7 64bit systems with OpenCV 2.2 installed on them using CMake and Visual Studio 2008 Standard. CMake generates everything in C:\libs\OpenCV-2.2.0\build just fine and Visual Studio 2008 compiles everything without complaint.
However, every time I do this process on various machines I find that the include directory (C:\libs\OpenCV-2.2.0\build\include\opencv2) is either empty or nearly so. I usually end up thrashing around compiling different versions and poking on random project files until it appears and every time I think I have it figured out. However, with each new install I'm back to the begining.
Is this a known issue for 64bit build of OpenCV 2.2 on Windows 7 64bit using Visual Studio 2008 and is there a known workaround?
Various questions here seem to be hinting at the same thing and guides online are either old or don't reference the problem at all.
To solve this problem compile everything in release and debug then right click the INSTALL project in Visual Studio 2008 and choose Build. This will "install" numerous files and move all the include files into the proper location.
Now /include will contain subfolders
opencv
opencv2
and /include/opencv2 will contain numerous subfolders:
calib3d
contrib
core
feature2d
flann
gpu
highgui
imgproc
legacy
ml
objdetect
video
I just had the same problem. The Answer which explains that you have to rightclick and build the "INSTALL" project after you have built the debug/release works for me now. BUT: for me it was not a "build" folder which was created, but a folder called "install". Inside of that folder there is a include folder now which contains all the stuff you need for the include. The OpenCV version im using is OpenCV v3.2.
well i have the same problem with visual studio 2010,
and the answer
""To solve this problem compile everything in release and debug then right click the INSTALL project in Visual Studio 2008 and choose Build. This will "install" numerous files and move all the include files into the proper location""
cannot work on this. because when you choose 2010 visual configuration
there are no option to do debg or release. u do this afterwars from visual studio
when complile in debug or release mod. has one anny answer.
you my friend that have managed to create a full buld properly
can you please make one with qt support ,and with examples and docs cmake configuration amd please e mail it to me??
it wont take you more than some minutes
and this will be a great help because i try many days to solve it
How are you making \build\ ?
I didn't think opencv did out-of-source builds properly. At least I've never got them to work - have you tried setting the build dir to a completely separate tree?