Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] Crosscompiling and console application?  (Read 1447 times)

0 Members and 1 Guest are viewing this topic.

Burbruee

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
[SOLVED] Crosscompiling and console application?
« on: June 24, 2012, 04:12:14 am »
Hi.

First, a litle background. I'm in the process of migrating to using ubuntu as my main OS, and I'm a huge vim fan (just started using it as my IDE instead of say Code::Blocks)

With that in mind, I like to make my games available for both linux and windows. So I found I can use mingw32 for crosscompiling for win32 on linux. Created a Makefile for this purpose, it works wonders and builds my game for both platforms and even packages together everything in a MyGame-win32-release.zip with all resources and .dlls ready for distribution (couldn't link sfml statically but no worries, just stick the dlls in there, no big deal!)

I tested running this on a windows machine and it works fine. Window pops open and I can control the moving sprite in my demo app.

Problem: It also opens up a small debugging window if you will, a console window behind the main window. I'm sure you're all familiar with this as we all are. When using Code::Blocks all we do is go into project properties and change it from Console Application to GUI Application and we're all good to go. Similar for VS.

My question is how to do this manually. Something I need to tell the compiler? (mingw32-g++ in this case) I did try to search for this but all I found was how to do it in C::B or VS which is the more common question. :)
« Last Edit: June 24, 2012, 03:33:37 pm by Burbruee »

Celtic Minstrel

  • Jr. Member
  • **
  • Posts: 80
    • View Profile
Re: Crosscompiling and console application?
« Reply #1 on: June 24, 2012, 08:41:57 am »
I vaguely recall being told how to do this in Dev C++ (no, I don't use it), and I think it's something to do with the linking stage; I can't remember the details, but I found this which might possibly help you?

Burbruee

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: Crosscompiling and console application?
« Reply #2 on: June 24, 2012, 03:33:05 pm »
Great! That worked, thanks.