Why is OpenDDS failing to compile? - c++

My friend is trying to compile OpenDDS from here:
OpenDDS Insall Directions
I have no code.. but i need this to make pastebin work?
She has followed that link to a T. And it produces these errors:
Errors
Here is the full output from Visual Studio:
Output
The interesting part:
I can compile it just fine using the instructions from that link in the top. I have done more coding than she, so something is installed that is allowing it to compile without issue, she has a clean install of Visual Studio Community, I have Visual Studio Enterprise (Both 2019) - I do not think the versions should matter, but shared for better understanding.
From what I can gather from the errors, there is a problem locating files on her machine, and not mine. Why it can't find files? I have no idea... I am really confused with why it works for me not her.
I even went and made a VirtualBox Machine with windows 10 on it, and I get the same errors there.
Any and all help is super appreciated, thank you!

This was fixed in this PR: https://github.com/objectcomputing/OpenDDS/pull/1701, but that hasn't made it into a release yet. I can't comment in the comment chain above, but dxiv is correct that this is caused by an include dependency that broke in VS2019. It's only in the dds/DCPS/Serializer.h header though, so just having your friend change that file to how it is in the PR should allow it to build.

Related

identifier "__builtin_expect" is undefined (during ROS on win tutorial-talker example)

I'm trying to do the first tutorial of ROS on Windows in Visual Studio 2015.
First I created a new WIN 32 Console application and copied the code from here.
Then I configured the project as it is described in the guide. While Debugging there came up several errors:
The identifier "__builtin_expect" is undefined in the files service_client.h and TestTalker.cpp (which is the name of my program).
Cannot open source file "sys/time.h"
The SDK from wiki.ros.org runs, I tested it.
I have no idea what's wrong.
I hope someone can help me.
Thank you in advance!!
__builtin_expect is a GCC extension. It is not provided by Visual Studio.
Since it only provides a hint to the compiler to optimize for CPU branch-prediction, one could just replace all instances of __builtin_expect(expr, c) with expr.
Or, in cases where it fits, use __assume instead, as described in this answer.

MVS Community and cURL c++

BUMP
Good afternoon,
I've been browsing google looking for a comprehensible guide to installing and adding the dependencies of cURL for Visual Studio Community with no real progress.
I've downloaded and extracted the package to C:\curl\curl-7.47.1 and built it by using the Developer Command Prompt from the winbuild\ (nmake /f Makefile.vc mode=dll).
The problems start as I try to find the libraries and includes that I am supposed to add to MVS' dependencies.
The three builds are built with no issues and added to the root of the cURL directory, but there is no release\ or debug\ in the package that I can add to my dependencies (the lib\ only has two libcurl files in it).
I've attempted to use a trial/error approach to finding the correct dependencies in a test project, but can't seem to get rid of the errors (ie. not having the correct dependencies).
I'm not sure if this has to do with the fact that I am using VS community, or if I simply am making some sort of errors in the "installation" process, and since none of the guides that I have found seem to help me I thought I'd turn to you guys.
cURL seems to be a somewhat commonly used library (if not the best URL-library?) and should see quite frequent use, but I can't for the love of me find a solution to the above mentioned problem(s).
Thank you for your help and please do tell me if you need any further information!
This was solved by looking into the (un)marked answer of one of many questions of SO.
Look at mtlynch's answer at:
Getting LibCurl to work with Visual Studio 2013

Eclipse with CDT not compiling at all

I have been trying out using Eclipse CDT for a course I am taking. Previously I have been using Visual Studio Express but since that requires me to be online and I have to use the IDE+compiler offline, I switched to Eclipse + Cygwin GCC.
Now everything was working prefectly, until I got an error about file paths in my make file. After reading some of the posts online, the issue seemed to be that Cygwin's make does not resolve absolute Windows file paths because of the ':' symbol and confuses it with a new target definition. The proposed fix was to download a fixed make file. I diligently did so and the programs would compile fine.
But after I went into the first debug session, everything froze. I aborted eclipse and tried a clean build but now the compilation wont happen AT ALL, which is very weird for me.
I can't find a post for a similar problem so I am really stuck now. I was currently working the assumption that my CDT may be corrupt or something so I downloaded Eclipse Luna just today and tried building using that, but no joy. Even a fresh project in a new workspace wont compile.
Appreciate the help in advance.
Did you try redownloading Eclipse? Sometimes Eclipse gets a fatal error glitch that makes it unable to compile anything. I've had this problem before, the only way i was able to fix it was to uninstall and re download the latest version. If this doesnt work, try switching to Bloodshed Dev C++ or codeblocks.
So it seems like an issue with the new make (v3.80). upgating it to v4.08 fixed the issue of not building.
Version 4.08 however does not fix the Windows file paths not being recognized properly and treated as a target definition. I am still getting the multiple target patterns. stop error.
EDIT: Found this on Stack overflow to solve the issue... should have searched better previously.
Very simple application fails with "multiple target patterns" from Eclipse

SDL2.DLL missing

I'm following this tutorial to setup the SDL template but when I try and run the program I get the following error.
I have gone over the tutorial several times but cannot see what mistake I am making.
I copied the SDL2.DLL into the Release Directory and then ran it and I got a different error.
but I imagine that I shouldn't have to do this?
Anyone see what mistake I could be making?
I am using windows 8 + MS Visual Studio 2012
There are two different versions of SDL2.DLL, one is x86 and another is x64. A common mistake is to use the x64 one when in fact you are compiling your code as x86. Try both of them to make sure you aren't making that mistake.

Why won't Allegro initialize?

I tried installing allegro 5 to code blocks, but even though it seems the program compiles it won't initialize. I get an error saying the application failed to start because allegro-5.0.9-monolith-md-debug.dll was not found. It also says re-installing may help, but I've tried that several times already. I tried following online tutorials, but I still get this error. Am I doing something wrong? Please help.
Copy allegro-5.0.9-monolith-md-debug.dll into the same directory as your source code. I had this same exact problem. I was using Visual C++ 2010 express edition, paste it with the source not the .exe if you are running it from within the compiler, if you want to run it outside of the compiler it will need to in the same location as the .exe