1

Hi guys!

As Microsoft visual studio isn't so much adorable big_smile and code::blocks isn't 100% accessible (at least with NVDA) and as I read camlorn's post in another topic that he recommended Compiler + Text editor for blind people,
What d'y'all suggest for C++ developer enviroment setup in windows?
Especially for large projects: Is it still viable to use editor + compiler for that also?

As I googled around there's basically two best compilers for windows users: Microsoft's own C++ compiler and Mingw.
Also I saw something called mingw-w64 that I don't know which one is better smile

Any help is apprecieated...

Also is it worth it to write audiogames in C++ or not?

Thumbs up

2

hi,
about editor, i use notepad and for compiling, i use vs2015
fortunately, it works with nvda (the solution explorer, output window, menu bars etc)
previously i used code::blocks (nvda doesnt support it) with both mingw and mingw-w64
both minGW and minGW-w64 are ports of gcc for windows, but mingw-w64 is the version that gets updated (gcc itself can be compiled for windows by msys or cygwin, that's how they compile it)
for developing audiogames with C++, it is somehow like other games but omit the graphic part (if you dont need graphic at all) but there are libraries to help you develop your game

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

Thumbs up

3

@black and white: Trust me when I say VS is perfectly usable. I use VS2017 to write my code on my computer, accept when I'm writing code over SFTP (then I use Notepad because filezilla doesn't like VS). But its perfectly usable.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

4

The only thing that broke for me between 15 and 17, and it may not even be vs's fault who knows, 15 was able to work with NVDA's indent functionality to read or play intent tones, 17 isn't. Other than that, its fine, what's the issue.

The bipeds think this place belongs to them, how cute.

Thumbs up

5

NVDA reporting of indention works fine for me in VS 2017.

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

Thumbs up

6 (edited by black and white 2018-04-13 09:41:46)

Thanks visualstudio, ethin, ironcross and Kyleman123!
Well guys, I've got no issues with microsoft vs.
But since I'm coming from a python background I'm more used to editor + something to run/compile my code smile
Besides microsoft vs is a bit heavy in size and, y'know not simple and clean.
@visualstudio: I've heard about msys while I was googling around, what is that?
Also why vs2015? Is there something wrong with vs2017?
@ethin: You mean that the best option is vs for me?
and, should I buy the pro version or community would be enough?
What features the community version lacks? Would I ever need 'em?
@ironcross32: Well, I don't care much about indentation for something like C++ which uses braces for blocks of codes, that might be funny for someone like me who uses indenting in python all the time big_smile
But if vs is the best option I should maybe get it after all.

Thumbs up

7 (edited by Ethin 2018-04-13 14:17:55)

The only features I know of that VS2017 community lacks are the ability to load add-ons. The professional/enterprise versions have some extra features, like websites and stuff, but the community should be enough for most things. I have had absolutely no problems with VS2017, and you can write Python in it (IronPython (Python for the .NET platform), normal Python 2/3, Anaconda, and Python for IoT). Its hard to install and remove, but it is the best development environment on windows.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

8

Another vote for VS 2017 here. I've only recently started really getting into C++, and have so far had no issues with it, though I'm using JAWS instead of NVDA. And haven't found anything lacking for the community version, at least for starting out.

Los Angeles Based musician, blogger, and programmer.
https://artistibarra.com/

Thumbs up

9

Agreed with everyone else, the few times i’ve needed to use vs it’s worked for me.
Kind of off topic but, @BlackAndWhite, which one is this? Black? White? Lol.

Check out my forum, doesn't offer much at the time of writing but i'm working on making it better.
http://forum.jerkatron.net

Thumbs up

10

The only thing against vs is its piggy, but what Microsoft product isn't. It's literally like 30 gigs if you install everything, now, you certainly can tailor it to exactly what you need it for, but even to start up, on slower machines, it takes a while, it can render screen readers useless while it starts up, etc.

The bipeds think this place belongs to them, how cute.

Thumbs up

11

@post6, about vs 2015 or 17, i am using 15 while 17 wasnt released and i am lazy to get 17 now
msys is a really minimal linux in windows (if you are using windows 10 install wsl on it and you are good to go)
also cygwin is another linux emulator on windows which is a little bit heavier but it has about more than 90% of posix api on windows
in my idea, wsl is the best option if you are in windows 10

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

Thumbs up

12

No, no, no. Whatever you do, don't use WSL. Its a peace of shit. Really, it is. Just... just no. And while this is an opinion I'd think that most people would agree with me. Cygwin is far better if you want a Linux shell... or just go install Linux on your computer or on a VPS/VM.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

13

@ethin, in wsl you can execute linux applications and install linux packages
secondly, some applications cant correctly run on cygwin due to differences between windows and linux (like some of the festival modules for tts building) which give access violation exception on cygwin
third, wsl is the complete linux kernel while cygwin isn't.
cygwin is just a shell but wsl not. wsl can execute .elf modules
if you want to execute linux applications without any issues, wsl is the best choice

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

Thumbs up

14 (edited by black and white 2018-04-18 08:44:34)

Ethin wrote:

The only features I know of that VS2017 community lacks are the ability to load add-ons. The professional/enterprise versions have some extra features, like websites and stuff, but the community should be enough for most things. I have had absolutely no problems with VS2017, and you can write Python in it (IronPython (Python for the .NET platform), normal Python 2/3, Anaconda, and Python for IoT). Its hard to install and remove, but it is the best development environment on windows.

Yep! hard to install and remove and a large size smile
But the python features are nice.

DarfVader wrote:

Agreed with everyone else, the few times i’ve needed to use vs it’s worked for me.
Kind of off topic but, @BlackAndWhite, which one is this? Black? White? Lol.

Thanks for the reply man!
OT: Is that charlie?
Also did you know that you should write darth with "th" rather than "f"? big_smile
And it is neither black nor white! it's "black and white"! smile

ironcross32 wrote:

The only thing against vs is its piggy, but what Microsoft product isn't. It's literally like 30 gigs if you install everything, now, you certainly can tailor it to exactly what you need it for, but even to start up, on slower machines, it takes a while, it can render screen readers useless while it starts up, etc.


Yeah exactly! that's my point also!
You should install at leest 5gb for your dev enviroment.

visualstudio wrote:

@post6, about vs 2015 or 17, i am using 15 while 17 wasnt released and i am lazy to get 17 now
msys is a really minimal linux in windows (if you are using windows 10 install wsl on it and you are good to go)
also cygwin is another linux emulator on windows which is a little bit heavier but it has about more than 90% of posix api on windows
in my idea, wsl is the best option if you are in windows 10

Thanks so much!
lol I thought vs15 had some advantage over 17 big_smile

Thumbs up

15

Yup, it is Charlie. If you checked the share your names topic, you’ll see I first started using this username for stuff when I was like 8 or9, and the name stuck. Anyways this sounds a lot nicer than my old username on here, Charliemerry1902.

Check out my forum, doesn't offer much at the time of writing but i'm working on making it better.
http://forum.jerkatron.net

Thumbs up

16

visualstudio wrote:

@ethin, in wsl you can execute linux applications and install linux packages

You can do this with Cygwin, too. Or Msys. Or any of the number of linux-to-windows forks out there. Or even Scoop.

visualstudio wrote:

secondly, some applications cant correctly run on cygwin due to differences between windows and linux (like some of the festival modules for tts building) which give access violation exception on cygwin

True. I'm not sure why you'd want these voices on Windows, though. They're designed specifically for Unix environments. Other than those, I've used quite a lot of Linux applications on Windows by compiling them with Cygwin, and they've all worked perfectly.

visualstudio wrote:

third, wsl is the complete linux kernel while cygwin isn't.
cygwin is just a shell but wsl not. wsl can execute .elf modules
if you want to execute linux applications without any issues, wsl is the best choice

Your definitely wrong on this one. While it is true that WSL is a Linux environment, it certainly is not the Linux kernel. It cannot run Linux kernel modules. It does not run the Linux kernel. Its almost like a Docker machine in that it is able to run Linux applications that are natively compiled for Linux, but only has the layer and emulation software necessary to run the environment and not a full-on Linux OS. Now, some counterarguments for WSL:
1. WSL is extremely, extremely buggy (and really shouldn't be on Windows, its worse than Wine). The last time I tried to update it it horribly broke everything on the WSL side of things.
2. Its closed source, which only puts a bad name to Microsoft. They're making an environment that should be open source closed source; they should be obligated to make it open source, just like Wine is obligated to make Wine open source too.
3. Its a lot worse than a VPS or VM is. You want a full Linux environment that you can update and fully tailor to your needs? Go get Vagrant and use that to create VMs (its very simple to use, and you have a lot of distro choices, much more than you'd get with WSL).
4. The FS under WSL is Natoriously slow. Which is sad, since this is Linux on windows here, not windows on LInux. If it were Windows on Linux I could understand the slowness, but it appears to be the opposite.
5. Mounting a shared folder in a virtualization hypervisor like Virtualbox or VMware doesn't work properly with WSL; instead you have to tar/untar the folder to keep hidden files and permissions.
6. To prove my point even more about WSL's slowness compared to VMs, an install of the Ruby 2.4.2 distribution via asdf took 229.38 seconds (3 minutes 49.38 seconds) in userland, 244.59 seconds (4 minutes 4.59 seconds) in kernel-land, and 113 percent CPU, for a total time of 6 minutes and 57.51 seconds; the VM only took 3 minutes and 53.87 seconds to execute the same operation.
You can read more on these issues on this page.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

17

first things first:
1. you said wsl is not the linux kernel.
how it can execute native linux modules?
eaven it supports unix-specific file systems
(you can compile linux kernel under windows for execution on windows)
it's not linux on windows (it is impossible to run linux beside windows without a vm due to things like gdt, irs etc which is set durring the os initialization)
other than those, wsl is the most emulated kernel on windows
2. you said it is closed source
linux kernel by itself is open source while the other modules written for it might be closed source (which is not needed to be open source)
secondly, what you get from reading the source? you want to write another linux on windows?
3. why i need those (linux-specific softwares)
my reason is, linux can execute those because those are for linux (and i need them) while cygwin on windows cant because cygwin applications are windows applications dependent on cygwin1.dll which should completely be executed on cygwin itself because cygwin's shell sets the path to where cygwin1.dll exists
also when you want to execute an application under cygwin, you should recompile that
4. you said you can execute linux applications on windows and install app packages on cygwin
ok, go and execute this command and tell the results here:

apt-get install terminfo wget

ok, cygwin is not based on debian, and we think it like redhat's CentOS:

yum -y install terminfo wget

5. you said its buggy
does being buggy mean it's impossible to use?
although it has an issue tracker for reporting bugs on github
6. about the speed, i didnt test that so i cant tell you anything
7. about installation of the packages:
the connection speed and ping time also changes the speed
although at least for me thats not important

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

Thumbs up

18 (edited by Ethin 2018-04-18 17:35:38)

visualstudio wrote:

first things first:
1. you said wsl is not the linux kernel.
how it can execute native linux modules?
eaven it supports unix-specific file systems
(you can compile linux kernel under windows for execution on windows)
it's not linux on windows (it is impossible to run linux beside windows without a vm due to things like gdt, irs etc which is set durring the os initialization)
other than those, wsl is the most emulated kernel on windows

You entirely missed my point. WSL does not execute Linux kernel modules. It can't. Period. It doesn't run the Linux Kernel; that's impossible (you can't run two OS kernels simultaneously on bear metal without one being within a virtual machine or a virtualized environment). Second, you asked how it runs ELF files. That's simple: ELF isn't necessarily a "file format". Its a specification of a file format. ELF stands for 'Executable and Linkable Format'. ELF programs can be ran under WSL because Microsoft and Kanonical implemented the specification for its execution. (The specification can be found here for the original specification published on March 18, 1997 and here for the October 2009 update. The System V ABI, AMD64 Supplement, ELF ARM specification and System V ABI, Intel386 Architecture Processor Supplement/Itanium Software Conventions and Runtime Guide (September 2000) may also be of use to you.) As for Unix-based file systems, again, more of a specification than anything else. Like I said in post 15, WSL is more like a docker container than a full Linux environment.

visualstudio wrote:

2. you said it is closed source
linux kernel by itself is open source while the other modules written for it might be closed source (which is not needed to be open source)
secondly, what you get from reading the source? you want to write another linux on windows?

I can't see how I was ambiguous here. I specifically said that WSL was not open source. I said that was bad. Nuf said.

visualstudio wrote:

3. why i need those (linux-specific softwares)
my reason is, linux can execute those because those are for linux (and i need them) while cygwin on windows cant because cygwin applications are windows applications dependent on cygwin1.dll which should completely be executed on cygwin itself because cygwin's shell sets the path to where cygwin1.dll exists
also when you want to execute an application under cygwin, you should recompile that

You don't always need to recompile apps for them to run on Windows (some GNU packages provide windows binaries, for example). And you usually don't need to compile most apps you want to run under cygwin; most of them are already compiled for you. Also, clearly, you have no idea how DLL loading works. DLL loaders do not depend on externally set environment variables to find DLLs. They use trused environment variables (like the first few paths in the PATH variable, for example) and leave it at that. They'd never search the entire PATH environment variable otherwise apps would take much longer to load. Secondly, a DLL loader will first check the apps currently existing directory, and (perhaps) its surrounding directories (that is, the directories within the currently running directory and the directory up one level) to find a DLL, and then it will search known paths to find it. If it can't find the DLLs the app needs in any of the paths it tries it raises an error which the application can choose to ignore). The other way a DLL can be loaded is through a call such as dlopen()/LoadLibrary(). However, these library calls are internal to the application and question and are not usually called when the DLL loader is first executed just before the application starts and main()/WinMain() is called.

visualstudio wrote:

4. you said you can execute linux applications on windows and install app packages on cygwin
ok, go and execute this command and tell the results here:
apt-get install terminfo wget
ok, cygwin is not based on debian, and we think it like redhat's CentOS:
yum -y install terminfo wget

Please tell me where I said this. I nowhere said that you could ever do this (though I know of a Cygwin package manager that works like apt/apt-get called apt-cyg).

visualstudio wrote:

5. you said its buggy
does being buggy mean it's impossible to use?
although it has an issue tracker for reporting bugs on github

I said it was buggy. I never said it was unusable; just that it was buggy and what averted me from it was that I couldn't update it without seriously breaking it horribly.

visualstudio wrote:

6. about the speed, i didnt test that so i cant tell you anything
7. about installation of the packages:
the connection speed and ping time also changes the speed
although at least for me thats not important

Yes, connection times change this, but connection times are pretty much irrelevant during compilation unless your makefile or CMake module downloads files over the internet, which is very uncommon.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

19

ok.
the problem is, windows executes its applications by its loader
how wsl can execute .elf files? while the loader cant execute .elf file in windows
as i said, you can compile linux kernel on windows but it becomes limited
because gdt, paging, etc are implemented under windows differently than linux
but, the execution of elf files are not implemented under windows loader
the problem is, we dont talk about elf is a specification or what.
whatever it is, windows cant execute it by its loader
as linux cant execute PE module which is made by microsoft
about cygwin, for example, its networking API is based on winsock.
and, wsl and cygwin are 2 complete different environments (cygwin is a bash, while wsl isn't. wsl is more like linux) not just for its execution of elf files etc, but as i understand, i dont get access vialation in it as i get in cygwin (compile festvox and you will see what i'm talking about)

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

Thumbs up

20

@visualstudio, no, no, no. No, you can't compile the Linux kernel under windows. It simply doesn't work. There are way too many things in the Linux kernel that are -- you guessed it -- linux-specific. Don't even try it. You won't even be able to configure it before it dies on you.
Second, your not getting my point. In fact your entirely missing it. My point is that the DLL loader in windows and the internal DLL loader WSL uses to execute ELF binaries are two separate individual kernel subsystems. The DLL loader for both is probably a .dll file, but they operate with totally different semantics. Please, read my posts more thoroughly.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

21

it is possible to compile it (as when you are developing an os you should compile it on another os)
but if you want to run linux with grub and boot it, you should cross-compile it

bitcoin address: 1LyQ3hziMC2DTnCtgM3V1zfuZ73P3CYT9P

Thumbs up

22

No, its not. It just isn't. I've done it before. Have you ever tried it? You download the linux kernel, run make config/make menuconfig and get a bunch of errors. So no, you can't.

"On two occasions I have been asked [by members of Parliament!]: 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out ?' I am not able rightly to apprehend the kind of confusion of ideas that could provoke such a question."    — Charles Babbage.

Thumbs up

23

I think we've gotten a touch off-topic guys. Please get back on, or take this to another thread.

I don’t believe in fighting unnecessarily.  But if something is worth fighting for, then its always a fight worth winning.
check me out on Twitter and on GitHub

Thumbs up

24

Both have valid points. Let’s just say, different salutions work for different people, and leave it at that. Everyone has there own way of doing things.

Check out my forum, doesn't offer much at the time of writing but i'm working on making it better.
http://forum.jerkatron.net

Thumbs up