I'm watching some tutorial videos on x64 C++ and ASM
The guy is using Visual Studio 2010
I put the simplistic app together. I'll paste it below.
It builds successfully.
I cannot see any output.
I don't get it. He (i.e., the video tutorial author) gets a command window with ascii text output. I get no action at all.
In fact, when I choose to debug, the commands for step into
, step out
, and step over
of are all grayed out.
So I hit Break All
and I'm in some of the system's header files.
If I put breakpoints in any of the real code, they never hit, not even the first line in main()
The only suspicious thing that I can think of is that I have Visual Studio 2010, Visual Studio 2010 Express, Visual Studio 2012, and Visual Studio 2012 Express, all on this same (Win'7, 64 bit) machine.
If that is indeed the reason, then why is VS C++ properly building the app ?
I haven't done any Visual C++ before; this is my first attempt. Hopefully this is something simple, and I won't have to uninstall any of the apps.
This is the code...
#include <iostream>
using namespace std;
extern "C" int GetValueFromASM();
extern "C" int TheExternalFunction();
int main()
{
int Fred;
long Frederick;
Fred = 123;
Frederick = 12345;
cout << Fred << endl;
cout << Frederick << endl;
cout << "Jones" << endl;
cout << 692317 << endl;
cout <<"When you see this, it Works"<<GetValueFromASM()<<endl;
cout <<"When you see this, it Works"<<TheExternalFunction()<<endl;
cin.get(); /* Pause the screen so it doesn't go away */
return 0; /* End Of Program */
}
Thanks for any help.
I see that five other users (with far higher reputation levels than I have) claim that this question already has an answer at the link stated, I spent a lot of time there, and the 453 word answer left me scratching my head while the 24 word answer in the comments section of this question was exactly on target. Contrasting the (reputedly) duplicate question and its (reputed) answer, I can honestly report that...
- The time spent on the 453 word answer was more than an hour.
- The time needed to put that into practice exceeded infinity.
- The time needed to read the 24 word answer was about 30 seconds.
- The time to put it into practice was about 3 or 4 minutes.
If that constitutes duplication, then so be it. The answer provided here was infinitely (quite literally) more helpful, more clear, and above all, was understood the moment I read it. This experience was the exact opposite of the (reputedly) "duplicate" question which had the "answer" I was seeking.
i.e., the 24 words communicated a message that worked. The 453 did not.