Building Linux C++ project imported to Visual Studio 2015 by VisualGDB - c++

I have a small Linux project which has a OpenCV as its dependency.
In Linux (Ubuntu: running in VMware), I’ve already compiled and built it by using bash script without any error.
In order to develop it more efficiently, I’m going to import it into Visual Studio 2015 from Ubuntu by using VisualGDB.
According to https://visualgdb.com/tutorials/linux/import/, I’ve imported it into VS2015 successfully, but whenever I built it, I have got a following error:
“Error MSB3073 The command “”C:\Program Files (x86)\Sysprogs\VisualGDB\VisualGDB.exe” /build “D:\tmp\LinuxProject3\LinuxProject3\LinuxProject3.vcxproj” “/solution:D:\tmp\LinuxProject3\LinuxProject3.sln” “/config:Debug” “/platform:VisualGDB”” exited with code 1.”
In order to check out whether my project had a problem or not, I imported the source of Midnight Commander just illustrated in above link with all default setting without any changes, but unfortunately the result was same.
By the way, there is no error in creating(not importing) new Linux C++ project, connecting with VMware, compiling, building and debugging in VS2015.
What’s wrong? What mistakes did I make?

Related

Qt5 create an exe file

I'm trying to create a Qt5 executable on Windows, when I built the project from QtCreator and went to the build folder and started the .exe I received a lot of missing library errors, and I fixed it using windeployqt:
>C:\Qt\5.15.2\msvc2019_64\bin\windeployqt.exe App.exe
Then I had another problem:
The application was unable to start correctly (0xc000007b).
And I simply solved it by installing Visual C++ Redistributable Packages for Visual Studio 2013. But now if I try to start it it gives me an error:
The code execution cannot continue because libwinpthread-1.dll was not found.
Does anyone know how to fix it? Thank you.
There's a description for this process (which is called deployment) in the Qt manual, e.g deployment with windeployqt, you might also look at the Qt Wiki for manual deployment.
BUT: It looks as though you mixed up something in you application: Visual C++ Redistributable Packages are needed in case you compile your application with Microsoft compilers. libwinpthread-1.dll is needed in case you compile your application with mingw compiler.
Make sure that you are using the same compiler/linker for all libraries, sources and the pre-built binaries from Qt.

How to include the ncurses.h library in C++ Visual Studio Linux Project when targeting Ubuntu on Windows?

I am trying to create a C++ console based program that will utilize the ncurses.h library. I am using Visual Studio 2017 targeting the WSL subsystem (Ubuntu).
Within ubuntu, running on my WSL, I have installed the ncurses libraries successfully.
I have created a new Project in VS. After unsuccessfully being able to get the #include to work correctly, I followed instructions on Stack to and added 'ncurses' in the Library Dependencies line under Linker / Input in the VS project properties. This enabled the application to compile the first time, and I was able to see in the Console Output that the library file was found and linked. However, VS still gives squiggly lines (errors) under all of the function names associated with the ncurses library. Also, the code does not work as expected, as the terminal appears to freeze. After running the code 2x, it appears now that the code will not build at all and I receive a strange error message that says the "program to debug does not exist on the remote system"
Can anyone please help? I've been using Visual Studio as my IDE with the WSL for school and would like to continue doing so. Future projects will be dependent on the ncurses library.
thank you for your help

Visual Studio - lib is not a valid Win32-Application

I want to run the opensource C++ library "VRPH" on VS 2015 (http://www.coin-or.org/projects/VRPH.xml).
I successfully perfomed the "make" command using cygwin/g++. Doing so leads to some more folders in the VRPH directory.
As described in the install.txt I openend the file VRPH.sln with Visual Studio.
Now VS does the "migration-process" and fires an UpgradeLog.htm with lots of warnings in it (mainly because of the software was created on a 2008 VS-Version), but no errors!
If I now click on "Local-Windows-Debug", the Debug-Window informs about serveral compile processes and the main project "VRPH" creates a VRPH.lib in the Debug-folder.
Having done that the Debugger says: "VRPH.lib is not a valid Win32-Application"
Any idea what to do?
Thank you so much for help!!

Can't Compile Solution in Debug Mode Because MSVCR100D.dll is Missing

I am running Microsoft Visual Studio Express 2012 for Windows Desktop on a 64 bit machine with windows 8.
I create a completely new Win32 Console Application (in C++) and accept the default options. I then build and run the solution in both debug and release modes and it works all find and dandy. Next I configure the include and library directories for the dynamic SFML library. I link to the debug and release .lib files and put the debug and release .dll files in the proper directories. I then add some simple code which uses the library, build and run the application in debug mode and I get this error: "The program can't start because MSVCR100D.dll is missing from your computer. Try reinstalling the program to fix this problem." If I build and run the application in release mode it works with no errors. (And yes I have the redistributables installed 32 and 64 bit.) Now from what I understand and according to this thread that .dll file is for debugging only and is not included in the redistributable package (which would explain why it doesn't work in debug mode). The answer says that developers have it installed with visual studio by default. This is obviously not the case as evidence from the error and I've reinstalled visual studio and restarted my computer twice now.
In conclusion, how do I simply compile my solution in debug mode without getting this error?
I'm afraid someone will mark this as a duplicate so here we go:
LINK - "...you appear to be linking to the debug version of the runtime, it is not normal to distribute apps linked against the debug version of the runtime."
Doesn't pertain to me because I'm not distributing this app, just trying to run it in debug mode.
LINK - "I compiled my program using Microsoft visual c++ 2010 Express Edition and tried to run it on another machine that did not have the same compiler."
This person get's the error when he runs what hes compiled on a different computer, not when actually compiling the application.
LINK - "If you get this error for your release build..."
I dont.
LINK - "You can compile your project in "Release"..."
My project is not ready to be released therefore I should compile my project in debug mode.
MSVCR100D.dll is the dll for Visual Studio 10, so somewhere something is depending on it (the SFML dlls?). Whatever you compile (in debug mode) with Visual Studio 2012 will require MSVCR110D.dll, which you should have available on your machine as part of the installation.
I suggest you build SFML yourself on your own version of Visual Studio, it's pretty easy. In fact, the binaries available on the site as part of the SFML 2.0 RC are rather old and you'll do yourself a huge favor by building from the latest sources, as a lot of fixes and improvement were applied in the meantime.
(Also, definitely use 2.0 instead of 1.6. The site is rather misleading, but on the SFML forums virtually everyone will recommend you use the last version)
This message generally states that the dll is referred to directly or indirectly in your application and is missing.
The 'D' at the end show us this is the Debug version of the file, this is DLL file is provided with the Visual Studio 2010 installation. So the MSVCR100D.dll would be provided with the installation of Visual Studio 2010.
Of course, you could be missing other versions 2008 (MSVCR90D) 2010 (MSVCR100D) 2012 (MSVCR110D) or the 2013 (MSVCR120D), each dll is provided according to the Visual Studio version.
There are a few ways to solve this:
Check to be sure that you're compiling all the components of your
project in Release mode. If this does not solve the issue continue
to the next steps.
You could solve this locally by installing Visual Studio 2010 on your
machine. This is not what I would recommend, but it would surely
overcome the issue
You could also download the file from this third party website and
copy it to your projects bin:
http://www.dll-files.com/dllindex/dll-files.shtml?msvcr100d
This option is the LEAST recommended option.
Run dependency Walker and see what file depends on the MSVCR100D.dll
and the try and fix that file in order to break your dependency. You can download depends here: http://www.dependencywalker.com/
Check to be sure that you're project is linking the correct version of
the CRT and any other libraries you may be using (e.g., MFC, ATL,
etc.)
Note: Installing the redistributables alone will NOT solve this problem, since the redistributables only contain the release version of the file MSVCR100.dll (notice no 'D')
MSVCR100D is part of the 2010 Visual Studio package - indicating that some components of your system are compiled with the older version of Visual Studio, so you will need to install the Visual Studio 2010 version - you can probably still develop with the 2012 version, just as long as [parts of] the 2010 is on the machine.
Or you need to recompile some components that your application depends on to use the 2012 (msvcr110d) libraries - if you have all the source code, that would be my preferrred method.

Problem deploying a project that uses Intel Parallel studio

So I have this small application of mine I'm trying to deploy using visual studio. I have Intel parallel studio 2011 added to visual studio, and I'm compiling this program using Intel within VS because I'm using OpenMP task construct which is not supported in VS2010. I added a deployment project to my solution and built a setup. Dependencies are detected as follows:
glu32.dll opengl32.dll and libiomp5md.dll
Now I'm trying to test this setup file to see if it works. I have Windows XP Mode installed and I access the setup file, I setup my application, decencies are copied just fine but:
When I try to run the application first time I got an error saying:
The entry point _ftol2 could not be loacted in the dynamic link library msvcrt.dll
I found solution to this problem by removing glu32.dll and opengl32.dll and adding glut32.dll to my windows/system folder.
But then it comes up with this second error saying:
The application or dll ".....\libiomp5md.dll" is not a valid windows image. please check this against your installation diskette
again I googled and I got this and it didn't work.
Reminder: I'm using Win7 x64 and Visual Studio 2010 with Intel Parallel Studio 2011.
I guess you need to install the redistributable libraries on the target machine.