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

Author Topic: Visuel c++ 2010  (Read 9272 times)

0 Members and 1 Guest are viewing this topic.

Xyro

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Visuel c++ 2010
« on: December 12, 2009, 10:07:02 pm »
Is it possible to let it work, I just tried to use the 2008 libary from the none svn but it ain't working :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Visuel c++ 2010
« Reply #1 on: December 12, 2009, 10:13:51 pm »
You can recompile SFML, it should work.
Laurent Gomila - SFML developer

Xyro

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Visuel c++ 2010
« Reply #2 on: December 12, 2009, 11:26:11 pm »
Quote from: "Laurent"
You can recompile SFML, it should work.


Never recompiled a libary :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Visuel c++ 2010
« Reply #3 on: December 12, 2009, 11:42:55 pm »
I guess you've already compiled your own source code? Well, compiling SFML is not more complicated: just open the solution file and press "rebuild all" ;)

It is even explained in the "getting started" tutorial, if you need more details.
Laurent Gomila - SFML developer

Xyro

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Visuel c++ 2010
« Reply #4 on: December 28, 2009, 10:15:46 pm »
Quote from: "Laurent"
I guess you've already compiled your own source code? Well, compiling SFML is not more complicated: just open the solution file and press "rebuild all" ;)

It is even explained in the "getting started" tutorial, if you need more details.


Cant get it to work, I downloaded the full sdk then I tried to open it with vc++ 10 I had to convert the file(from the 2008 build) so I did, then I Compiled it all and tried to use the library files but they still don't work.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Visuel c++ 2010
« Reply #5 on: December 28, 2009, 10:17:10 pm »
What error do you get?
Laurent Gomila - SFML developer

Xyro

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Visuel c++ 2010
« Reply #6 on: December 28, 2009, 10:22:06 pm »
Quote from: "Laurent"
What error do you get?


Code: [Select]

1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Display(void)" (?Display@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Close(void)" (?Close@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::GetEvent(class sf::Event &)" (?GetEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::IsOpened(void)const " (?IsOpened@Window@sf@@QBE_NXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>C:\Users\Quincy\documents\visual studio 2010\Projects\Neural\Debug\Neural.exe : fatal error LNK1120: 5 unresolved externals


Just tried to build the solution again and replaced all the files but still no luck.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Visuel c++ 2010
« Reply #7 on: December 28, 2009, 10:26:34 pm »
You can just press the green arrow (that starts the application with the debugger), it will recompile what's not up-to-date.

Regarding your linker errors, I think that you just forgot to link sfml-window.lib.
Laurent Gomila - SFML developer

Xyro

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Visuel c++ 2010
« Reply #8 on: December 28, 2009, 10:32:10 pm »
Quote from: "Laurent"
You can just press the green arrow (that starts the application with the debugger), it will recompile what's not up-to-date.

Regarding your linker errors, I think that you just forgot to link sfml-window.lib.


Wow, Didn't know I had to add the window library to the additional dependencies also, but now its compiling and giving me a popup error : (i'm dutch so i'l try to translate it)

Cannot correctly initialize the application (0xc0150002).  

and then it shuts down the program. I'm trying to compile the basic code the tutorial(graphics) provided for testing.

I really like the new vc++ 10 but on the old one sfml at least worked xD

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Visuel c++ 2010
« Reply #9 on: December 28, 2009, 11:31:53 pm »
Are you sure that you're not mixing debug mode and release libraries?
Laurent Gomila - SFML developer

Xyro

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Visuel c++ 2010
« Reply #10 on: December 29, 2009, 12:03:26 am »
Quote from: "Laurent"
Are you sure that you're not mixing debug mode and release libraries?


I used sfml-graphics-d.lib :S

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Visuel c++ 2010
« Reply #11 on: December 29, 2009, 12:14:16 am »
Can you give the complete list of libraries for your debug configuration?
Laurent Gomila - SFML developer

Xyro

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Visuel c++ 2010
« Reply #12 on: December 29, 2009, 01:08:00 am »
Quote from: "Laurent"
Can you give the complete list of libraries for your debug configuration?


Sorry, I've started programming some months ago and this is the first external library I'm using care to explain ? If you mean what libraries I'm using  these :

sfml-graphics-d.lib;sfml-window-d.lib

blewisjr

  • Newbie
  • *
  • Posts: 23
    • View Profile
Visuel c++ 2010
« Reply #13 on: December 29, 2009, 01:22:16 am »
Yea those are what he is asking for.  What definition of the main function are you using.  if you are using the standard...

int main() or int main(int argc char** argv) you need to also include the sfml-main.lib  or you will get unresolved externals.  Yours look like this might be the issue.

Xyro

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Visuel c++ 2010
« Reply #14 on: December 29, 2009, 01:47:02 am »
Code: [Select]
#include <SFML/Graphics.hpp>

int main()
{
    // Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
   
    // Start game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

        // Clear the screen (fill it with black color)
        App.Clear();

        // Display window contents on screen
        App.Display();
    }

    return EXIT_SUCCESS;
}


Added the sfml-main still keeps crashing with the bad init.

 

anything