Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Making Windows applications  (Read 3453 times)

TSTwizby

  • Bay Watcher
    • View Profile
Making Windows applications
« on: June 27, 2012, 10:52:45 pm »

I'm not entirely sure whether or not I should have posted this in the programming thread, but it seemed distinct enough to warrant its own thread. I've been trying to learn how to make simple windows applications, using Microsoft Visual Studio. The version I currently have is the Microsoft Visual Studio 11 Professional beta, and I am incapable of finding any information anywhere about how to use it including in its own help documents. I have successfully written several console applications using tutorials meant for earlier versions of Visual Studio, but all of the tutorials I have found for applications using GUI's do not work, the problem seemingly being that some names of things have changed between versions. I am pretty new to this, though not new to programming in general, and have no clue what I am doing, largely why I have been searching out tutorials. Can anyone either recommend a source of tutorials, or give advice as to whether I should try an earlier verision of Visual Studio or else a different compiler entirely. I would prefer to stick with either C++ or assembly as a language as I have been trying to learn to use both recently. I have tried to use MASM to program in assembly, but my antivirus is constantly blocking it and not allowing me to retrieve it from quarantine. Thank you.
Logged
I got a female and male dragon on my embark. I got cagetraps on the exits but im struggling to find a way to make them path into it.
Live bait.
3 dwarfs out of 7 dead so far

kaijyuu

  • Bay Watcher
  • Hrm...
    • View Profile
Logged
Quote from: Chesterton
For, in order that men should resist injustice, something more is necessary than that they should think injustice unpleasant. They must think injustice absurd; above all, they must think it startling. They must retain the violence of a virgin astonishment. When the pessimist looks at any infamy, it is to him, after all, only a repetition of the infamy of existence. But the optimist sees injustice as something discordant and unexpected, and it stings him into action.

TSTwizby

  • Bay Watcher
    • View Profile
Re: Making Windows applications
« Reply #2 on: June 27, 2012, 10:57:08 pm »

Thank you. The second link helped me a lot.

Now I'm confused by the different versions of SDL available. Some seem to specify the compiler to be used with them. The site you linked to has a supply which includes many, but none corresponding to the version of Visual Studio I have. The SDL site has only two available and distinguishes between runtime and development libraries. The runtime libraries seem to not depend on the compiler, which makes sense, but the only two compilers for which they provide development libraries are Mingw32 and Visual C++, neither of which I am familiar with, so I must reiterate my original question.
« Last Edit: June 27, 2012, 11:06:32 pm by TSTwizby »
Logged
I got a female and male dragon on my embark. I got cagetraps on the exits but im struggling to find a way to make them path into it.
Live bait.
3 dwarfs out of 7 dead so far

kaijyuu

  • Bay Watcher
  • Hrm...
    • View Profile
Re: Making Windows applications
« Reply #3 on: June 28, 2012, 02:24:45 am »

(was hoping someone else could answer that. Alas)

Can't answer your question myself, as I've never used a Microsoft compiler. I use mingw with a wacky IDE that hasn't been updated since 2007.
Logged
Quote from: Chesterton
For, in order that men should resist injustice, something more is necessary than that they should think injustice unpleasant. They must think injustice absurd; above all, they must think it startling. They must retain the violence of a virgin astonishment. When the pessimist looks at any infamy, it is to him, after all, only a repetition of the infamy of existence. But the optimist sees injustice as something discordant and unexpected, and it stings him into action.

TSTwizby

  • Bay Watcher
    • View Profile
Re: Making Windows applications
« Reply #4 on: June 28, 2012, 02:26:51 am »

Alright then, I guess for now I'll give another compiler a shot. Thank you.
Logged
I got a female and male dragon on my embark. I got cagetraps on the exits but im struggling to find a way to make them path into it.
Live bait.
3 dwarfs out of 7 dead so far

olemars

  • Bay Watcher
    • View Profile
Re: Making Windows applications
« Reply #5 on: June 28, 2012, 04:06:01 am »

Switch to VS 2010. 11 seems to be a horrid mess and mostly geared for Metro/windows 8 development.

I'm a bit of a fanboy, but I would recommend the Qt library and looking through the heap of tutorials and examples that come with it.
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Making Windows applications
« Reply #6 on: June 28, 2012, 08:41:24 am »

If you don't need cross-platform portability or you're dead-set on using Assembler, you'd need to look into the Windows API. Here's a tutorial for C++: http://www.winprog.org/tutorial/. Here's one for C: http://www.zetcode.com/gui/winapi/, and here's the MSDN link: http://msdn.microsoft.com/en-us/library/cc433218(VS.85).aspx where you should be able to find the syscalls you need for Assembly programming. EDIT: Apparently they don't provide the syscalls there. I'm not exactly sure how or where to find that data and if Windows even uses syscalls for all these functions (There are a lot of them, but then again a 32-bit word is pretty big as well).
« Last Edit: June 28, 2012, 12:31:46 pm by Virex »
Logged

TSTwizby

  • Bay Watcher
    • View Profile
Re: Making Windows applications
« Reply #7 on: June 29, 2012, 03:11:53 pm »

Okay, Visual Studio 2010 is not working with SDL or even working with its own tutorials that I've been able to find, the most immediate difference being the replacement of the 'main' function with the '_tmain' function. From what I understand this shouldn't matter, and console applications work as expected, but nothing works the same in reference to windowed applications and SDL appears to just not work, as I mentioned. I've tried mingw, which doesn't seem to include the actual file which runs the compiler after I installed it. I can't find an up to date version of SDL for anything else. Virex, I checked out the C++ tutorial site and it seems to be based primarily off of Visual Studio 2008, which I'm somewhat leery of given my experience with 2010 and 11. The msdn videos as I mentioned have proven incompatible with what they are supposed to work with somehow, though the zetcode link looks promising. I haven't checked out the assembly links yet, but I should get around to it soon.
Logged
I got a female and male dragon on my embark. I got cagetraps on the exits but im struggling to find a way to make them path into it.
Live bait.
3 dwarfs out of 7 dead so far

Aklyon

  • Bay Watcher
  • Fate~
    • View Profile
Re: Making Windows applications
« Reply #8 on: June 29, 2012, 03:32:12 pm »

Just windows, or Metro applications?
Logged
Crystalline (SG)
Sigtext
Quote from: RedKing
It's known as the Oppai-Kaiju effect. The islands of Japan generate a sort anti-gravity field, which allows breasts to behave as if in microgravity. It's also what allows Godzilla and friends to become 50 stories tall, and lets ninjas run up the side of a skyscraper.

olemars

  • Bay Watcher
    • View Profile
Re: Making Windows applications
« Reply #9 on: June 29, 2012, 03:51:18 pm »

If you get any errors you should post them.
Logged

TSTwizby

  • Bay Watcher
    • View Profile
Re: Making Windows applications
« Reply #10 on: June 29, 2012, 07:26:02 pm »

I'm not sure what metro applications are. I should have thought to post what errors I was getting, sorry about that.

For the widowed program tutorials what I have been doing is opening up Visual studio, copying and pasting the text that you are supposed to copy and paste from the tutorials, and getting errors about undeclared identifier

code:
Spoiler (click to show/hide)

errors:
Spoiler (click to show/hide)

When I try to run a program which includes SDL, the computer cannot find SDL.dll, which I had put in my system32 folder. It didn't make a difference whether I used the 32 or 64 bit versions of SDL.dll.
Logged
I got a female and male dragon on my embark. I got cagetraps on the exits but im struggling to find a way to make them path into it.
Live bait.
3 dwarfs out of 7 dead so far

Aklyon

  • Bay Watcher
  • Fate~
    • View Profile
Re: Making Windows applications
« Reply #11 on: June 29, 2012, 07:30:58 pm »

Metro applications are things that use the (rather useless I'd say on the desktop) Metro interface in Windows 8.
Logged
Crystalline (SG)
Sigtext
Quote from: RedKing
It's known as the Oppai-Kaiju effect. The islands of Japan generate a sort anti-gravity field, which allows breasts to behave as if in microgravity. It's also what allows Godzilla and friends to become 50 stories tall, and lets ninjas run up the side of a skyscraper.

Tellemurius

  • Bay Watcher
  • Positively insane Tech Thaumaturgist
    • View Profile
Re: Making Windows applications
« Reply #12 on: June 29, 2012, 08:08:13 pm »

Metro applications are things that use the (rather useless I'd say on the desktop) Metro interface in Windows 8.
Metro was created on Windows Phone 7