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

Author Topic: Project can't find main function after changing computer.  (Read 1812 times)

0 Members and 1 Guest are viewing this topic.

Euqcerin

  • Newbie
  • *
  • Posts: 6
    • View Profile
Project can't find main function after changing computer.
« on: October 26, 2012, 09:46:06 am »
So I currently work on a project in school using sfml. So I use two different computers to do this, but my project is in a dropbox folder on both computers so I ain't altering any of the files when I switch computers.

Anyways, to the problem. When I worked from home this morning it worked perfectly fine and when I was finished I updated the project in my db folder. Now when I got to school and try to start the exact same program all I get is a console window instead of the sfml game.

I'm using Visual Studios Ultimate 2010 C++.
With sfml 1.6 (this is due to a tutorial I choose to follow to get me started).

Any help is appreciated.
BR, Fredrik

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10916
    • View Profile
    • development blog
    • Email
AW: Project can't find main function after changing computer.
« Reply #1 on: October 26, 2012, 09:50:28 am »
My guess would be that the window resolution is bigger than the screen resolution and thus it doesn't show (see the issue tracker for thos bug).
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Euqcerin

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Project can't find main function after changing computer.
« Reply #2 on: October 26, 2012, 09:54:04 am »
The resolution of the program is 1024x768 and the resolution on both my computers are 1920x1080.

This is my main function.

#include "stdafx.h"
#include "Game.h"

int main()
{
        HWND hwnd = GetConsoleWindow();
    ShowWindow(hwnd, 0);

        Game::Start();
 
        return 0;

}

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Project can't find main function after changing computer.
« Reply #3 on: October 26, 2012, 09:56:26 am »
ATI/AMD graphics card?
Laurent Gomila - SFML developer

Euqcerin

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Project can't find main function after changing computer.
« Reply #4 on: October 26, 2012, 09:59:41 am »
At home it's a GTX 470.
At school it's something in the Radeon 7800 series.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Project can't find main function after changing computer.
« Reply #5 on: October 26, 2012, 10:03:14 am »
This is a known bug. Link SFML statically, or use SFML 2.
Laurent Gomila - SFML developer

Euqcerin

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Project can't find main function after changing computer.
« Reply #6 on: October 26, 2012, 10:05:44 am »
Thanks for answering. Will change to SFML 2.0!