Do i need to install GLUT also if i already have installed freeglut msvc package with visual studio 2010 on my windows 7 32 bit system ?. I am confused whether to install GLUT or freeglut as some sites refer to use GLUT, some for freeglut. Can anyone suggest the main library which is to be installed.
First of all: GLUT is just a separate library, it is not required for OepnGL at all. The opengl libraries are deployed with the OS and/or the graphics drivers. On windows, there is microsoft's opengl32.dll (with OpenGL 1.1 support that is part of the windows API), and ICDs (installable client drivers) which come with the graphics drivers and allow one to use modern, hw-accelerated OpenGL via the extenstion mechanism - the application still links against microsoft's DLL.
To GLUT itself. There is the GLUT specification which defines the GLUT API. There are different implementations for this API. GLUT is kind of old, and the SGI GLUT versions can be considered abandoned. The only GLUT implementation in active development today (as far as I know) is freeglut - so if you have installed it, you don't need any other.
Related
I'm trying to build a simple application with CUDA and I've been trying for hours on end and I just can't make it work on windows. nvcc absolutely refuses to compile without Visual Studio's compiler which doesn't support things I need. I tried building using nvcc with clang but It just asks me to use Visual Studio's compiler. I've also tried using clang directly since it now supports CUDA but I receive this error:
clang++.exe: error: Unsupported CUDA gpu architecture: compute_52
This makes no sense to me because I have the CUDA toolkit version 7.5 and my graphics card is a GTX 970 (two of them). I have googled this extensively and everywhere I come across the error the person always has is their CUDA toolkit is < 7.5. I'm on the brink of tears right now trying to get something as simple as VLA to work on this CUDA application and I just can't achieve it...
The CUDA windows toolchain requires the Visual Studio C++ compiler. You cannot use anything else on that platform. If the VS compiler doesn't support the language features you need within CUDA host code, you have no choice but to change platforms, or your expectations.
You can still potentially compile non-CUDA host code using another compiler and then link that code using NVCC and the VS toolchain.
Try to use clang-cl, --cubin=clang-cl.exe
It may be worth to work on a Linux VM or WSL2 within windows. As per the CUDA docs.
To compile new CUDA applications, a CUDA Toolkit for Linux x86 is
needed. CUDA Toolkit support for WSL is still in preview stage as
developer tools such as profilers are not available yet. However, CUDA
application development is fully supported in the WSL2 environment, as
a result, users should be able to compile new CUDA Linux applications
with the latest CUDA Toolkit for x86 Linux.
https://docs.nvidia.com/cuda/wsl-user-guide/index.html#:~:text=However%2C%20CUDA%20application%20development%20is,becomes%20available%20within%20WSL%202.
Is the DirectXMath library cross platform? Is it possible to use it with OpenGL and/or on OSX and Linux?
DirectXMath primarily relies on the Visual Studio compiler intrinsics support. As a header in the Windows 8.x SDK, it officially only supports Visual Studio 2010 - Visual Studio 2013, and Windows Vista or later. It only has a single Win32 API dependency (IsProcessorFeaturePresent), even that is optional.
It is technically possible to use it for Windows XP, but there's no official SDK configuration that would provide it in the headers that are supported on Windows XP.
There's no official support for other compilers, but it would probably work with the Intel compiler.
Otherwise DirectXMath is not actually tied to Direct3D in particular, so you could use it with OpenGL or whatever.
The main issue is going to be that the DirectXMath library is available in the Windows 8.x SDK, the Windows Phone 8.x SDK, the Xbox One XDK, and Xbox One ADK. You'd have to look at those EULAs--I'm not a lawyer and I cannot provide legal advice.
Considering to develop a desktop application with Qt for Windows. It will be a free download application, but for a commecial SERVICE. (need an account with our commercial service to work).
I think we could use the Qt for Windows from Nokia (LGLP version) because its free app. But the lastest one version of Qt needs a C++ complier from Microsoft.
Which one?
Do I need to pay for an C++ compiler from Microsoft, or do they have a free version to use with Qt?
Reading info docs, googling and we still cann't understand what tools do I need.
If you want to use the Visual Studio compilers, you can download the free Windows SDK. The following link takes you to the SDK for Visual Studio 2008:
Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1
This includes all the C++ compilers and tools you need. (There is a more recent version available, but Visual Studio 2010 is not yet a "level 1 supported" platform for Qt.) We are using this on standalone build machines and it works fine.
Just a personal opinion, but we have found that using anything other than MSVC on Windows (for example, MinGW) causes a lot of problems. It is not that the other toolchains are bad, it is just that they are all treated as second-class citizens. We had lots of problems with third-party libraries not being able to build in MinGW or having nonexistent build instructions and having to do a lot of manual Makefile editing, etc. You are much more likely to have things "just work" if using MSVC.
For the most part (static linking), you cannot mix and match. You need to pick one toolchain and stick with it. If I were starting from scratch, I'd definitely go with MSVC.
Just our experience (we started with MinGW); your mileage may vary.
No, you do not need to pay for anything.
The Microsoft toolchain is available for free as part of the Microsoft Windows Software Development Kit.
Additionally, the following article may also be of interest to you:
Developing Windows Applications in C++: The tools you need
The alternative supported by Qt is MinGW. The runtime libraries are free from copyright, so you can do whatever you want with them.
It is basically the Windows counterpart of the GNU Compiler Collection (GCC) under Unix.
I tried to use Boost thread local storage with Windows threads. I built the project without any problems.
However my question here is, is it okay to use Boost TLS with Windows threads?
Edit
Yes Boost is integrally supported on windows with all major compilers:
Supported compilers and platforms
The library should build and work with a reasonably compliant compiler. The library was > successfully built and tested on the following platforms:
Windows XP, Windows Vista. MSVC 8.0, 9.0. MSVC 7.1 may work too, but it was not tested.
Windows Vista. Intel C++ Compiler 10.1.022, 11.1.048.
Linux. GCC 4.2 and newer. GCC 4.1 may work too, but it was not tested.
Linux. Intel C++ 11.1.056.
The following compilers/platforms are not supported and will likely fail to compile the library:
MSVC 7.0 and older.
Borland C++ 5.5.1 (free version). Newer versions might or might not work.
GCC 4.0 and older.
Windows 9x, ME, NT4 and older are not supported.
I suppose you mean what "libraries do I need"?
You need to link to the import library for boost threads, usually a file like
C:\Program Files\boost\boot_1_47_0\lib\libboost_pthread....lib
This file can be added to the additional libraries to link box in the c++ linker settings. Don't forget to add it for debug and release builds.
PS. don't have Windows handy right now, so I can't do the screen shots.
I would like to use C/C++ for coding my apps, but I need my apps running on all versions of Windows from XP to Win8, independently by any platforms, run time libraries and so on.
Briefly: What kind/type of C/C++ I suppose to use, be able to run my apps on every type of Windows without any additional installation, just default one. e.g Windows XP SP1
C++ can run on just about any OS, as long as you avoid (or, via conditional compilation, provide alternatives for) anything specific to one OS or version. Win32 code is almost all the same between versions; the main difference is added functionality in newer versions. Between Windows and, say Linux, though? Not so much. You kinda need to pick a platform, unless you want to either stick to text mode (which is pretty close between OSes, thanks to standards) or learn some whole other platform-neutral API like OpenGL, wxWidgets, GTK, etc.
As for which compiler to use, if you're sticking with Windows, I'd recommend Visual Studio. Microsoft has a free (Express) edition that will let you compile Win32 code or .net. (You'll need the paid version, or some playing around with the Platform SDK, to play with 64-bit though.) And the IDE isn't too bad either. If you just want a compiler, the Platform SDK has the same compilers VS has, and includes 64-bit support (and even a bunch of code samples and tools) as well.
As for being independent of any runtime libs: Every C++ compiler that's worth using has a runtime library. If you link statically against it, though, the parts you need will be embedded in your EXE. Alternatively, you have permission to distribute the runtime libs with your app (though you may need to install it via a package they provide, that you bundle together with your app...i forget how all that works).
All popular C++ compilers support XP up. You can statically link the runtime, or, for mingw, you can link against the runtime supplied with Windows.