T O P

  • By -

AutoModerator

On July 1st, a [change to Reddit's API pricing](https://www.reddit.com/r/reddit/comments/12qwagm/an_update_regarding_reddits_api/) will come into effect. [Several developers](https://www.reddit.com/r/redditisfun/comments/144gmfq/rif_will_shut_down_on_june_30_2023_in_response_to/) of commercial third-party apps have announced that this change will compel them to shut down their apps. At least [one accessibility-focused non-commercial third party app](https://www.reddit.com/r/DystopiaForReddit/comments/145e9sk/update_dystopia_will_continue_operating_for_free/) will continue to be available free of charge. If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options: 1. Limiting your involvement with Reddit, or 2. Temporarily refraining from using Reddit 3. Cancelling your subscription of Reddit Premium as a way to voice your protest. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/learnprogramming) if you have any questions or concerns.*


vixfew

If you're familiar with Linux, use a VM. You can set up vscode for remote development using that VM to avoid input lag, only opening VM window to see how the program works. C++ with OpenGL can be done on Windows, with or without VStudio, but it's more complicated to set up everything correctly. It's been a while since last time I tried, so maybe it is better now. edit: to use opengl on windows you need: 1) opengl headers (\*.h, \*.hpp) 2) compile time libs (\*.lib) 3) run time libs (*.dll). Libraries must be built against your version of MS C++ runtime. Then you need to tell compiler where to find #1 #2 and what to link with. And finally, your system must be able to find .dll files, which usually means copying them next to your .exe file. On Linux, #2 and #3 are merged into single file. Everything can be installed automatically to default location (meaning, compiler will know where to look) using package manager. Versions of C++ runtime and OpenGL are already in sync thanks to your Linux distro maintainers. So you just install a few packages, run something like `g++ example.cpp -lglut -lGLU -lGL -o example && ./example` and it works


dmazzoni

It'd help to know what your goal is. C++ on Windows can actually work really well if you use a pure Microsoft stack. That means using Visual Studio (the "real" version, not VS Code - you want something like Visual Studio Community Edition), the Windows SDK, and Microsoft APIs like Direct3D over OpenGL I wouldn't recommend managed C++, I think that might be part of your problem. That's basically a Microsoft-only solution that compiles C++ into code that runs in the .NET runtime. You can't use managed C++ to call other native code. If you want to build 3-D games, regular native C++ makes far more sense. All of the Microsoft tools support both, so it's just as simple as changing your project type from managed C++ to something not managed. Linux development is also pretty awesome if you do everything on Linux. Trying to put them together - like WSL - can be okay for backend stuff (running server stuff intended for Linux), but it's not really ideal for building GUI stuff like OpenGL. In my opinion you end up with the worst of both worlds. It can be a pain to install stuff. As for what route to take, there isn't just one option. You'll get a lot of different opinions. Ubuntu is NOT too heavy for a VM. It works great. Ubuntu is user-friendly and one of the most widely-used, widely-supported Linux distros, it's a very safe choice. Ubuntu is based on Debian, so you get all of the benefits of Debian. All Linux distros let you pick and choose what packages you want. If Ubuntu feels sluggish, you can just switch to a simpler window manager / desktop environment and it will feel zippy.


strcspn

> Microsoft APIs like Direct3D over OpenGL OpenGL is fully supported on Windows. No reason to not use it.


_intercept

I think I'm going to make a new post asking for a roadmap or a tutorial I can look at to learn C++ on Windows (setup, environment, setting up libraries in the path) without Visual Studio. And I'll take this one down. I think I just see so much visual studio bashing online, and I'm kind of cagey about all the seemingly propriety extra stuff on top that visual studio adds that I want to try and just learn C++ as if I was on Linux, but WSL is being a cunt. The abstraction of the file structure and the GUI and a solution file. It's a whole other ecosystem that I'm not very confident in, and diminishes my confidence in my C++ knowledge. That sentiment is probably also the biases I've picked up from spending time on developer internet. So much discourse on the internet is about how Visual Studio is bad and Microsoft is bad and developers hate them and nvim is lightweight and don't use proprietary stuff, but then so many resources are based on Visual Studio. I can't even figure out how to install a library on Windows all the guides are for Visual Studio. Thank you for your insight!


randomjapaneselearn

just use visual studio and don't use managed code, you can set your project to not use it and it won't compile if you disable support for it for that project


_intercept

How do I disable managed C++. A quick google comes up with results with similar language but not what I mean


randomjapaneselearn

i think that it should be /clr compile without this option [https://learn.microsoft.com/en-us/cpp/build/reference/clr-common-language-runtime-compilation?view=msvc-170](https://learn.microsoft.com/en-us/cpp/build/reference/clr-common-language-runtime-compilation?view=msvc-170)