Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 14 years ago.
Improve this question
Is there anyway to build a solution to target 64 bit environment in vs2003? My solution is native c++ not visual c++. Any help would be greatly appreciated.
cheers,
RWendi
This page on 2003's lack of 64-bit targeting seems to address your issue: http://www.toymaker.info/Games/html/64_bit.html.
The first step was to set up my development environment for 64 bit development. I use Visual Studio 2003 which has little built in support for 64 bit development.
In order to create 64 bit applications you need to install the latest Platform SDK from Microsoft (Microsoft Platform SDK for Windows Server 2003). The SDK, as well as having libraries for 32 bit programming, has 64 bit versions for AMD64 and IA64 (Intel) development.
Getting the correct library and header file paths set up in Visual Studio proved surprisingly difficult. I wanted the choice of developing 32 bit or 64 bit projects. While the platform SDK comes with command files to set up the correct paths they wipe out any other paths. Since T2 uses DirectX I also needed the DirectX paths setting correctly.
Upgrading to a newer edition of Visual Studio looks like the safer, non-hackish solution, if possible.
As Warren points out, this isn't easy with VS2003. You need to install the x64 compiler from the platform SDK.
We ran this way for a couple of years (starting with even earlier versions and the IA64 compiler). There were separate project configurations for X64 builds, so in addition to the normal DEBUG and RELEASE configurations we had DEBUG_X64 and RELEASE_X64.
But you have to launch VS studio with the paths set up for either the x86 or x64 compilers & libraries. You couldn't switch between them on the fly. I believe there was a command line switch /useenv that told VS to set its various paths from environment variables. We had bat files to set this all up.
It is messy, and every now and then we'd build the wrong project configuration for the environment which always took a while to sort out. You are much better off upgrading to VS2005/VS2008 where the target architecture is exposed directly in the GUI.
Sounds like a viable solution... going to try it before accepting the answer. votes up!
RWendi
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 months ago.
Improve this question
I've been unable to build C++ projects since upgrading to VS2022. No matter what I do, it cannot programmatically find the Windows SDK files it needs, always claiming MSB8036 (the extremely generic "it can't find the Windows SDK" error).
To be absolutely clear, the version of the Windows SDK that it is looking for (10.0.19041.0) is the one that is installed. At various times, it has been installed using both the Visual Studio installer and the standalone installer (the latter of which apparently fixed this issue for some people). I had even tried installing an older SDK several times, which still failed, even when solutions were specifically retargeted.
EDIT: To be even more clear, I've also tried simple solutions like the one outlined here.
So far, I have tried:
uninstalling and reinstalling (after a recent reinstall, the VS IDE won't load anymore, so I'm stuck with Build Tools)
installing a different edition (Build Tools vs Community)
running sfc /scannow (it found and fixed some errors, but none fixed the issue with MSBuild)
removing the symlinks I had and allowing Visual Studio to install directly to my system drive (to be clear, the symlinks did not cause issues with VS2019, but I was unsure whether VS2022 had issues with them)
running InstallCleanup.exe -f
installing VS2019 again (despite working before, it won't anymore)
checking the environment variables manually (everything points to where the files are located)
checking the registry manually (couldn't find anything, not sure what I'd be looking for)
I was able to get it to pass the check for the Windows SDK by hardcoding the (x64) paths (which were literally the same) into the Microsoft.Cpp.WindowsSDK.targets file, but it would then fail to find windows.h at build time (this is also untenable for non-x64 targets).
I am out of ideas. Has anyone else had this issue? Are there any fixes that don't involve reinstalling Windows?
#john's comment here provided the answer. I then was able to grab the proper SDKManifest.xml from here, which is basically the same as the version given in the video with the Windows SDK version swapped out.
This question is much asked and much answered, but I can't find a single answer that really seems to get to the nub of the problem and which really answers the question as asked. Which is to say, if I simply Create New Project -> Console App -> (choose a name for the project) -> Create then the project is in 32-bit mode. It's trivial to click where it says X86 in the tool bar and change it to X64. Problem solved. You don't even have to go into Configuration Manager or any similar complicated strategies that many answers through the years have suggested. But still, I have to change the X86 to X64 every single time I make a new project. And in addition, the very process of defaulting to X86 has created a gazillion little files and folders for the X86 version of the project that really aren't needed. So the question is not how to make a 64-bit app. That's extremely easy. And the question is not about how to convert a 32-bit app into a 64-bit app. That's also extremely easy. The question is how to configure Visual Studio 2019 Community Edition so that a new project defaults to 64-bit in the first place.
By the way, all the answers on the Microsoft forums start out with "Open the C++ project that you want to configure." But there is no existing project if what you are trying to do is to set the default for new projects. Also, I did find default.vcxproj and played with it a bit. I didn't see anything there that established a default of X86 vs. X64. But I did see that the X86 entries were in front of the X64 entries. I moved the X64 entries in front of the X86 entries, but that did not change the default. It did change the order of the way entries were displayed when I clicked the X86 vs. X64 box in the tool bar. Another promising file was shared.vcxproj. It appears that it may hold the default, but there I haven't yet found any forum messages suggesting that it should be changed to solve this problem.
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
My company is interested in developing a GPIO Driver for Windows to use with proprietary peripherals and would like to save money by using an IDE other than Visual Studio.
After researching on Google, the MSDN, and StackOverflow, I was unable to determine if I am able to develop a Windows GPIO Driver using an IDE other than Visual Studio. The MSDN only gives tips on how to develop a Windows GPIO driver using Visual Studio and the StackOverflow questions pertain to specific development issues, while Google gave me a combination of the two. None of the methods gave me any kind of concrete or even ballpark answer, so I decided to post my first StackOverflow question.
If it is useful, I am using Windows 10 but I have access to, and can develop on, a Windows 7 system as well.
So the first question would be: Can I use an IDE other than Visual Studio to develop a Windows GPIO Driver and if so, what would I need from VS to do so?
Can I use an (open source/free) IDE other than Visual Studio, considering I am developing on Windows?
If I have to use Visual Studio, what is the reason that another IDE would not work (i.e. missing tools, missing libraries, poor Microsoft design decision, etc)?
So the first question would be: Can I use an IDE other than Visual Studio to develop a Windows GPIO Driver and if so, what would I need from VS to do so?
Yes, you can.
There's no officially recommended or best IDE to choose. Just get one that fit's your comforts regarding
syntax highlighting
debugging support
toolchain support
intellisense support when typing code
etc. frills and gadgets ...
The question merely is, if you are required to use the MSVC compiler to develop any artifacts (executables, shared libraries) for a windows target.
And the answer fortunately is: No.
There are alternative free toolchains like MinGw GCC or Clang available, and you can use any IDE that supports to choose support for that toolchain.
You can even use a simple text editor like Notepad++.
Can I use an (open source/free) IDE other than Visual Studio, considering I am developing on Windows?
You can do anything you need using the free tools available.
But take care about correct licensing (regarding standard library implementations etc.), supposed you're developing commercial product.
Yes, you can use any toolchain you want to develop drivers for Windows. You can use any editor and compiler.
You need to focus on the requirements of a Windows driver. Microsoft is always going to recommend you use their products. For example, they may suggest using C# with Visual Studio. Microsoft may make driver development easier by using their tools (more money for them).
The final "executable" driver leaves no clues as to the language or toolchain used to create it.
The are other resources available for information about Windows Drivers than MSDN.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I developed a C++/QT application and I am trying to compile it for Mac, Windows and Linux. I chose C++ just so I can make it compatible with these major operating systems. I can compile it for mac just fine.
I found out about Cross Compiling but some are outdated or not well documented... or does not guarantee they will work on the latest version of Windows or a Mac.
I do have Virtual Windows and Cent OS installed on my machine but I feel that compiling the application manually would be over kill.
So, do you recommend any reliable cross-compiler? Or is there any way to automate the compilation so if I have to, it can compile by logging on to my Virtual Windows or Cent OS installations?
FYI... not only cross compile but also generate 32 bit and 64 bit versions!
For Mac and linux you don't have a big issue here if you got the g++ compiler installed in your OS. But you will need to install Mingw or cygwin in the Windows installation to provide the gcc and the g++ compilers for your programs and if you want to automate your compilation process you can use a Makefile or try to see the autotools.
The only cross compiler that I know of is GCC. I have actually used it on Linux to cross-compile for S/390 a while back, and also to cross-compile ARM code on a Power Mac (I used the instructions here to set it up).
That said, I think that what you want is to cross-compile Windows x64 on a 32 bit virtual machine running Windows. If that is the case you are lucky, because Microsoft actually gives away the cross compilers for free with the Windows SDK since Windows 2000 SDK. I actually use the Windows Vista SDK (ver 6.1) on Virtual PC running XP to compile for Windows x64. Here you can download the latest version of the SDK, which comes with the compilers. I looked on the system requirements and it still supports XP, so this should be good for you.
Please note that the compilers are the same that come with Visual Studio, but you will have to invoke them from the command line environment installed by the SDK by either using 'cl' or 'nmake'.
You can chose the compilation mode by issuing SETENV /x86 for 32 bit or SETENV /x64 for 64 bits -there is another mode for Itanium but I have never used it-. The Visual Studio IDE is not included because it is a paid product, but good quality compilers for free is a good enough to anyone.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
For many years I have used two great tools BoundsChecker & Purify, but the developers of these applications have let me down, they no longer put effort into maintaining them or developing them. We have corporate accounts with both companies, and they both tell me that they have no intention of producing versions to support 64 bit applications.
Can anyone recommend either open source or commercial alternatives that support 64 bit native C++/MFC applications?
Viva64 (http://www.viva64.com/viva64-tool/) tool provides detection of errors typical of 64-bit Windows applications. Viva64 is a lint-like static analyzer of C/C++ code. Viva64 integrates into Visual Studio 2005/2008 environment and provides user-friendly interface to test your software projects.
Parasoft has a tool called Insure++ (link: http://www.parasoft.com/jsp/products/quick_facts.jsp?product=Insure) which says it'll do that.
I've used Insure++ on 32-bit and 64-bit apps on Linux and it worked okay. It sometimes got confused when it was trying to parse template/stl code and would fall over.
That url says it works on 32- and 64-bit windows, good luck!
BoundsChecker 9.01 now supports VC2008 and x64 bit, at last.
insure++ only workse if you instrument your code. I once tried it. It took about 5 minutes to compile about 1000 lines of code. Since the project that I needed to compile was huge, I quickly determined that Insure++ was not going to work.
Not to mention their reporting, or output from Insure++ is pretty archaic. also the runtime performance penalty was attrocious.
Note about boundschecker from numega/compuware/other_new_company: Don't buy it. It's only profiles 32 bit apps. It does NOT do 64 bit apps. It can be installed on a 64 bit OS though. I stopped using it years ago on our app. I do use it on CppUnit Tests though... sometimes.
In general I'm completely disgusted with all the native memory leak tools out there. They all don't work, or just lock up your application on shutdown.
FYI: BoundsChecker 10.0 runs on Windows XP through Windows 7, on both 32 and 64 bit versions. It supports WOW64 applications, and it also supports Visual Studio 2010. In fact, we released VS2010 support within 30 days of Microsoft's release.
We are catching up with our backlog. We were very late getting the VS2005 and VS2008 support out (with BC 9.0, Fall 2008), but there were a variety of reasons why this happened. The miracle was that we got it out at all.
BoundsChecker 10.5, when it comes out, should have some more goodies. Stay tuned.
Disclosure: I work for MicroFocus.
Intel(R) Parallel Inspector (http://software.intel.com/en-us/intel-parallel-inspector/) is a threading and memory-checking plugin tool to Microsoft* Visual Studio; it supports 32-bit and 64-bit C/C++ on Windows. It's a commercial application with a 30-day free evaluation.
Disclosure: I work for Intel.
I've used bounds checking and other dynamic analysis tools, and while the architectures are different it's the code that you're checking - in theory you could run bounds checking on any backend and the result would be the same - the code either steps outside its bounds or it does not.
The only complications are addressing more than 4GB of memory space, dealing with pieces of code you can't cross-compile to a 32-bit architecture (64 bit object files for which you have no source, etc), and general 64 bit migration issues (platform specific code such as checking for 0xFFFFFFFF instead of -1)
What other problems are you running into doing bounds checking on your program? Are you unable to compile a 32 bit version?
It's not your ideal solution, certainly, and one should always check the code they're going to run, but in this case you might not have a choice, unless you want to do your own bounds checking (which is a good idea in any case...).
-Adam
it is my understanding that BC 9.0 will support WOW64
Application verifier, for x64 and x86, detects heap corruption
http://www.microsoft.com/download/en/details.aspx?id=20028
From IBM PurifyPlus support for 64-bit versions of Microsoft Windows:
Technote (FAQ)
Question
Is IBM Rational PurifyPlus supported on 64-bit versions of Microsoft Windows?
Cause
64-bit versions of Microsoft Windows are getting popular.
Answer
Beginning with version 7.0.1 iFix 003, PurifyPlus supports testing 64 bit applications on Windows.
More information about iFix 003 can be found in the following technote IBM Rational PurifyPlus for Windows v7.0.1.0-003
You install this version of Purify and you get a "Purify (for 64-bit applications)" entry in your start menu.