Prettify compiling C++ from Command Line [closed] - c++

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I'm playing with compiling C++ from native Windows CMD via VS 2017 compiler (vsvarsall.bat setup).
Is there any way to reduce the output of cl command, like Microsoft rigths for compiler and linker?
Also, offtop question: is it possible to compile code with UNICODE or ANSI strings (like I'm able to build from Visual Studio IDE), or am I gotta use manual #defines?

For your first question, see the /nologo compiler flag.
I'd guess the second is why people are voting to close--there's quite a variety of ways to deal with ANSI/Unicode strings, and without quite a bit more definition of what you really want, chances are pretty poor that anybody can give a meaningful answer.

Related

Can a C++ code i wrote on eclipse IDE, run without problems on VC++ IDE? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm a bit new to programming and I just wanted to know if there can be any problems if I send my C++ code I wrote on Eclipse to a friend who works on VC++?
Yes, there can be problems.
Whether the code can simply be copy/pasted to another toolchain entirely depends on how standard-compliant and portable the code is.
We cannot guess at that from here.
There should be no problem as long as you are not using any compiler-specific things, which is unlikely if you are a beginner.

C++ with 2 compilers [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
I have a project which I would like to code on both an Ubuntu and a Windows machine. On Ubuntu I'm using gcc, and on windows I would like to use MSVC.
Is it a good idea to compile the same code with 2 different compilers like this? Or would I run into issues down the road?
Thanks.
It is an excellent idea. In the past, I've found a bunch of bugs in my code that I could only see after switching compilers.
If you want to compile for different platforms, you have to compile with different compilers (even if they are different versions of the same compiler).
If you compile with both GCC and MSVC, you will find you can't use a lot of the extensions that each compiler provides. You will also find annoyances like MSVC puts an underscore on the front of functions like _open. Basically, this comes down to "welcome to the wonderful world of portable coding".
On the other hand, once you start writing code for two compilers, it becomes much easier to add a third - and I would recommend adding Clang to the mix as a cheap and cheerful static analysis tool.
Microsoft is making it easy, by allowing you compile code directly from Visual Studio on a Linux box. It's pretty cool.
https://blogs.msdn.microsoft.com/vcblog/2016/03/30/visual-c-for-linux-development/

Programatically creating and compiling from a program in C++ [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Let's say we've got a first program called Program1.exe which contains the necessary information to create and compile another application called Program2.exe. Actually it could also load that information from a txt file or whatever.
Googling, I've found that this is "easy" to do in C#, using Visual Studio:
How to programatically build and compile another c# project from the current project
Programmatically Invoke the C# Compiler
The problem is that I'm not using (and can't use) C#, but C++. Summing it up, my question is if that I can do this same thing using C++.
I would prefer to do it without additional libraries, but if that's not possible, or if it's too hard to do, you can also recommend any library allowing it.
I think you'll probably have noticed it, but my goal is to use it under Windows so I don't care if it's not portable.
Thanks everybody.
It's trivial (if maybe a bit odd) for a C++ program to compile and run another based on code stored in a text file. Debugging that other program, however, isn't.

How to output to console window without iostream in c++? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm a beginner C++ programmer.I would like to know that Is it possible to output to console windows without using iostream header file?
the answer of the question is actually Yes ! but How?
You can always delve down to the C library level, using e.g. printf.
If you don't want to use the standard library at all then you have to use platform-specific functionality. In Windows there are many layers here, much like the C++ versus C layers in the standard library. The highest Windows API layer is the WriteFile function, and below that, WriteConsole, then perhaps WriteConsoleOutput, so on, check it out.
Note that there are at least two open source projects to provide more reasonable console functionality in Windows, namely Console2 at SourceForge and mintty at Google Code.

what C++ software do i use for accelerated c++ book [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I have just bought accelerated c++ used. It wants me to do a project but i have no clue on what, does any one have a clue i searched online for a answer but nothing or at less one that would work. The program it want me to do is this
write a program that, when run, writes
this (") is a qute, and this (/) is a backslash
3 + 4;
There is no particular implementation you're supposed to use. You simply use whatever you've got. If you're on Windows you can get Visual Studio Express. If you're on linux you can use gcc, if you're on OS X you can get Xcode, etc.
Accelerated C++ is not intended for individuals new to programming; It's intended to get a programmer with experience in another language up and running in C++ quickly. You may find a different book more suited to your needs.