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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SmashMaster

Pages: [1]
1
System / Vector2 Problem
« on: November 30, 2009, 10:14:20 am »
Code: [Select]

//part 1
float Face(sf::Vector2<float> PosA, sf::Vector2<float> PosB)
{
    return 45.; //to be finished
}


// part 2
if (Event.Type == sf::Event::MouseMoved)
{
         sf::Vector2<float> PosMouse = sf::Vector2<float>(Event.MouseMove.X, Event.MouseMove.Y);
         Sprite.SetRotation(Face(Sprite.GetPosition, PosMouse));
}


I want to set up the function Face() to operate on two vectors and return a float, but it's giving me this error:

Main.cpp|55|error: conversion from `<unknown type>' to non-scalar type `sf::Vector2<float>' requested|

Also, I'm not sure if this belongs in Graphics, Window, or System, because I don't know which one sf:Vector2 belongs to.

EDIT: I guess it really belongs in general because it's more of a general C++ problem than it is a problem with me using SFML.

2
Window / Yet another unresolved external thread
« on: July 29, 2009, 08:48:03 am »
Quote from: "Laurent"

opengl32.lib ;)

You may also need glu32.lib, if you're using any glu* function


Thanks, problem solved.

3
Window / Yet another unresolved external thread
« on: July 29, 2009, 03:25:36 am »
Alright, I did the "Using OpenGL" tutorial, I'm using VS2005, I have sfml-window.lib added as a dependency, and I'm getting unresolved externals featuring my GL functions.

Example:
Code: [Select]
error LNK2019: unresolved external symbol __imp__glBegin@4 referenced in function _main

I didn't get any unresolved externals involving my SF functions so I think I might be missing an OpenGL library.

EDIT: I know you guys get a ton of threads like this so I'm sure this'll be fixed in a matter of seconds. I have to say that after 15 minutes of getting VS8 set up for SFML, I'm liking SFML a lot. I think I'll get into this.

Pages: [1]
anything