I'm wondering if there is some comprehensive tutorial or someone of you can help me solve this problem.
I need to build Windows mobile project written in C++ but I need to do so outside of any IDE. So I would be very grateful if someone could direct me, thank you.
Well you can call devenv directly with the /build switch and pass it the project name and it will build without opening the IDE. Or do you want to be able to build without an IDE even installed? In that case you could write an msbuild script that would do it.
Related
I want to build a C++ code but it errors. When I check the error message it's related with .NET. I have C# extensions but this isn't C# and I want to change this to g++ for C++ projects. I have g++ installed and added to path however I don't know how can I configure it to build with that for C++ codes.
Edit: I marked the answer as a solution but I also found an easier way for me:
https://code.visualstudio.com/docs/cpp/config-msvc
cl.exe basically.
One option (probably not the one you want to) is to build it from integrated terminal.
You can download c/c++ extension along with the cmake tools extension to have buttons for build/run configuration.
Problem is the same as here:
Visual Studio 2017 - Not Able to see Publish - Missing Profile / Deployment Options
https://developercommunity.visualstudio.com/content/problem/129404/missing-publish-menu-in-netcore-web-project-right.html
except the fact that I didn't see the button earlier (I've started coding in Visual Studio just recently). I've installed some packages, which were adviced in mentioned topics, like "Azure" and "ASP.NET", but it didn't solve the problem. I don't understand, how it could help (I code on C++ and have not to use these packages, do I?) and what exactly I should do (maybe I've downloaded something wrong).
Thank you in advance!
Update
If I understand right, there is no way to "publish" C++ code, according to:
https://social.msdn.microsoft.com/Forums/en-US/6998eadb-36fb-4a97-bba5-0de49d533732/how-can-i-publish-a-visual-c-project-?forum=vsclassdesigner
Then, how to make standalone exe-file, that doesn't require something other like .pdb, .ipdb and .iobj and can be run on another coumputer without Visual Studio?
The command that creates the binary is called "Build".
I can't say for sure, but I think that "Debug" builds to run on another computer need vcredist, while "Release" builds can run without anything else. Again, I am not sure.
have some real trouble with QtCreator on ubuntu 18 and was wondering if anyone could give me any help. This morning I installed cmake for another project I was working on, now when I try to run a project in qtcreator it is trying to deploy it via FTP, even though it is a Qt c++ project. I dont know if this is anything to do with cmake, but this worked last night before I installed it. My question is, can anybody explain to me how to run a project from QtCreator, on the local system( Terminal or otherwise, doesnt matter ) without any deployment issues. Im sorry if this is a stupid question, but I am extremely grateful for any hep
In a console, you can just cd into the project directory (where the .pro file resides) and execute "qmake" and then "make". That should compile your executable which you can then run using "./[executable filename]" or "/[path]/[executable filename]". Also, on the console you might see where this FTP transfer comes from. Also, in QtCreator you can set the build system and change that from cmake to something else to see if its a cmake problem.
So, not sure how this issue came up, but I have found a workaround after much trial and error. Open a project, In the left tab click Projects and under build and run select Run. In this menu deploy steps have already been added when i create a project, so these need to be deleted. Now in the Run section on the same screen Click add -> Custom executable and select the file that has already been built for the project in question. In my case this solves the above problem, but does not explain why QtCreator is trying to deploy C++ projects via FTP. If anyone out there is struggling with this issue feel free to post a question here and I will assist as much as possible!
I've recently installed CLion in the hopes that I can start using this over visual studios and it seems to be decent for at least regular c++ projects etc but I am wondering how and if I can use it to develop directx code. In visual studios you simply have the directx folder along side your project like so
C:/myproject/main.cpp
C:/DirectXTK/directxfiles etc
and you can import and link the files by either dragging them onto the project or using the import files and it will link them up etc is there anyway I can do this using CLion? for a fairly new programmer it's super confusing. I tried googling adding libraries and such but I struggled to understand most of what exactly was said, could someone explain it to me please? and if you can will it run just as it would run in visual studio?(and would it run on a mac)
My reason for wanting to use CLion is simply because I'd like to be able to run CLion on my mac and be able to run and test without having to use my current solution which is parallels/bootcamp/running windows then visual studios etc. Unless someone has a better idea?
Thanks in advance if someone can help!
There is no DirectX on Mac OS X, OS X uses OpenGL instead.
So using CLion would not solve your problem.
I'm trying to start a work in vscode , latest C++ plugin version supports ms debugger, so as I'm mostly working under windows it was a signal to try this.
c++ tools plugin from MS and cmake tools were installed.
my test project was however not built . the problem is clear , but I need an advice from experienced vscode users how to solve this right.
cmake doesn't see vc compiler.
(after using QtCreator) I expected that vscode could detect vc installation... however that's not so. ok, I have a two ways:
fill environment variables INCLUDE/LIB/PATH with a headers, libs and binaries
just run vcvarsall.bat x64
Second way is a simple and reliable. so final question is:
how to run .bat at the begining of vscode start?
(I don't mean write another bat/cmd, prepare the environment and run vscode inside the same script after that)
Although the question is fairly old, I'll try to give a useful answer, in case others stumble across, just like I did.
I believe what you are trying to achieve is not possible. Code inherits the environment it was started with. If you did not launch it from a developer command prompt, you will not be able build and debug. (Building might be possible if every task first starts the vcvarsall.bat, but that slows things down by a lot. Debugging I think will still not work.)
If you are willing to, you can check out vector-of-bools CMake Tools extension which does build automation as well as automatic MSVC detection. It builds using CMake (thus you need to write your build scripts using CMake), but it will take care of building just by pressing F7, like what most VS users are familiar with.