Visual Studio - compile and run

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
alxMint
Level 1
Level 1
Posts: 15
Joined: Fri Jul 30, 2021 10:17 am

Visual Studio - compile and run

Post by alxMint »

Hi.

I was accustomed to Visual Studio on Windows, where I wrote C++ code, pressed F5 and it compiled my code and run my program in a terminal.

I was not able to do the same on Mint version of the same software.

Pressing F5 does not produce an output in a separate windows, but - in the best scenario - just some messages in a terminal tab (If I specifically select this tab).

Is there some (extra)setting to contemplate to use this Mint version of Visual Studio like I did on Windows?

Cheers.
:mrgreen:
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Moonstone Man
Level 16
Level 16
Posts: 6054
Joined: Mon Aug 27, 2012 10:17 pm

Re: Visual Studio - compile and run

Post by Moonstone Man »

alxMint wrote: Sat Jul 31, 2021 3:59 am Hi.
I'm afraid that your post isn't making much sense... I'll break it down for you:
I was accustomed to Visual Studio on Windows, where I wrote C++ code, pressed F5 and it compiled my code and run my program in a terminal.
Ok, that's how Visual Studio works on Windows. This is the only thing that does make sense.
I was not able to do the same on Mint version of the same software.
What Mint version of the same software? What Mint version? What same software? There is no such thing. I suspect that...
Pressing F5 does not produce an output in a separate windows, but - in the best scenario - just some messages in a terminal tab (If I specifically select this tab).
Pressing F5 in what? What messages? What tab? What terminal? Where?

I suspect that you've confused Visual Studio with Visual Studio Code.
Is there some (extra)setting to contemplate to use this Mint version of Visual Studio like I did on Windows?
Er, no. See above, also see:

https://devblogs.microsoft.com/cppblog/ ... al-studio/
https://docs.microsoft.com/en-us/cpp/li ... w=msvc-160
https://docs.microsoft.com/en-us/cpp/li ... w=msvc-160
https://code.visualstudio.com/docs/setu ... stallation

You cannot run Visual Studio on native Linux. To compile software for Linux from within Windows using Visual Studio, you need to set up a connection with a Linux machine that has the required binary compilers installed and configured.

Alternatively, if you want to write cross platform applications for both Windows and Linux, go here: https://www.qt.io/download-open-source

You must adhere to the open source licence conditions, or pay a very hefty monthly fee, over $US600 a month, if you don't publish your code as open source.
User avatar
alxMint
Level 1
Level 1
Posts: 15
Joined: Fri Jul 30, 2021 10:17 am

Re: Visual Studio - compile and run

Post by alxMint »

I suspect that you've confused Visual Studio with Visual Studio Code.
Surely, I did this!

I thank you (again) for your time and your patience, but what you suggested looks like very advanced and complicated stuff.

I just wanted to install and use an IDE since I recently started to study C++.

In this case, it looks like the easiest solution is to use Geany or Code::Blocks instead.

I already installed them and they work fine for my goals.

Thank you again, Kadaitcha Man :mrgreen:
Moonstone Man
Level 16
Level 16
Posts: 6054
Joined: Mon Aug 27, 2012 10:17 pm

Re: Visual Studio - compile and run

Post by Moonstone Man »

alxMint wrote: Sat Jul 31, 2021 4:30 am In this case, it looks like the easiest solution is to use Geany or Code::Block instead.
No, actually, it's not the easiest. Use Qt5 open source: https://www.qt.io/download-open-source

It's rich, featureful, fully cross-platform, rather easy to come to grips with, especially if you intend to write code for Linux. I doubt you'll be violating the open source licence if you're just writing code to learn from. It becomes a different matter if you then wish to sell your applications.
User avatar
alxMint
Level 1
Level 1
Posts: 15
Joined: Fri Jul 30, 2021 10:17 am

Re: Visual Studio - compile and run

Post by alxMint »

I downloaded a qt-unified-linux-x64-4.1.1-online.run file from their site.
How do I start this?
Moonstone Man
Level 16
Level 16
Posts: 6054
Joined: Mon Aug 27, 2012 10:17 pm

Re: Visual Studio - compile and run

Post by Moonstone Man »

alxMint wrote: Sat Jul 31, 2021 4:46 am How do I start this?
Usually it's done by reading the documentation and following it: https://doc.qt.io/qt-5/linux.html
Hoser Rob
Level 20
Level 20
Posts: 11796
Joined: Sat Dec 15, 2012 8:57 am

Re: Visual Studio - compile and run

Post by Hoser Rob »

I can't think o9f a worse computer language to start with than C/C++ for a novice (well, maybe APL). Try python or perl scripts for a start.
For every complex problem there is an answer that is clear, simple, and wrong - H. L. Mencken
User avatar
alxMint
Level 1
Level 1
Posts: 15
Joined: Fri Jul 30, 2021 10:17 am

Re: Visual Studio - compile and run

Post by alxMint »

Kadaitcha Man wrote: Sat Jul 31, 2021 4:54 am Usually it's done by reading the documentation and following it: https://doc.qt.io/qt-5/linux.html
Thank you again Kadaitcha Man, I will try that without haste when I've more time.
Hoser Rob wrote: Sat Jul 31, 2021 8:33 am I can't think o9f a worse computer language to start with than C/C++ for a novice (well, maybe APL). Try python or perl scripts for a start.
Actually, I'm not totally a novice, since I come from a IT school, where, many years ago, we studied Turbo Pascal quite deeply. Anyway, Python is surely high on my TLL (to learn list) :mrgreen:

Is it any good in the game development field?
User avatar
AndyMH
Level 21
Level 21
Posts: 13696
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Visual Studio - compile and run

Post by AndyMH »

alxMint wrote: Sat Jul 31, 2021 11:44 pm where, many years ago, we studied Turbo Pascal quite deeply.
Lazarus is an excellent ide for pascal. I use it a lot :D
While many will turn up their noses at pascal it is still relevant. I started with Turbo Pascal V1.0 probably around 1985.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
User avatar
alxMint
Level 1
Level 1
Posts: 15
Joined: Fri Jul 30, 2021 10:17 am

Re: Visual Studio - compile and run

Post by alxMint »

AndyMH wrote: Sun Aug 01, 2021 10:09 am Lazarus is an excellent ide for pascal. I use it a lot :D
While many will turn up their noses at pascal it is still relevant. I started with Turbo Pascal V1.0 probably around 1985.
I really enjoyed programming through Turbo Pascal during the school days, it was around 1997.
I don't care about how C++ is still relevant today, I recently decided to study it since in the 90s I read about miracles produced by talented coders through C++ in the game development field, so I was fascinated by this concept and kept this fascination in my drawer for all these years.
Kadaitcha Man wrote: Sat Jul 31, 2021 4:54 am Usually it's done by reading the documentation and following it: https://doc.qt.io/qt-5/linux.html
I managed to install the offline installer (qt-opensource-linux-x64-5.12.11.run) through Command-Line.
Open a terminal and navigate to the directory where the file is located.

Execute chmod +x <file-to-give-execute-permission>.run

Now that the execute permission has been set, simply run ./<file>.run


I'm putting here the procedure in the case someone is an inexpert beginner like me.

I just started Qt and, indeed, it looks like a serious alternative to the Visual Studio I was starting to use in the Windows environment.

But I'm still not able to run the project and see the result in a separated terminal like I did in Windows.
Locked

Return to “Software & Applications”