[QUOTE=AlienCat;36480366]You sure you fixed the linker errors? You need to add both libraries and headers to the project.[/QUOTE]
Well I didn't actually fix it, I found a way around.
Includes and linkers:
[img]http://s16.postimage.org/fzhotsgth/Includes.png[/img]
Main file
[cpp]
// SSX.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "Graphics.h"
[/cpp]
Graphics.cpp
[cpp]
#include "stdafx.h"
#include "Graphics.h"
[/cpp]
stdafx.h
[cpp]
#pragma once
#include "targetver.h"
#include <SFML/System.hpp>
#include <SFML/Graphics.hpp>
#include <stdio.h>
#include <tchar.h>
[/cpp]
My compiled program (using SFML) keeps crashing with the message "The application was unable to start correctly (0xc0150002)." In the event viewer, I get the following message:
[QUOTE]Activation context generation failed for "C:\Users\[my name]\Documents\Visual Studio 2010\Projects\Framework\Debug\sfml-graphics-d.dll". [/QUOTE]
with the source being "SideBySide". Obviously this is something to do with the Windows 7 re-installation I performed recently where I switched from 32-bit to 64-bit. However there doesn't seem to be a 64-bit version of SFML or anything that would help me. I DID install the 64-bit version of Visual Studio Express though. I have sfml-windows-d.lib, sfml-system-d.lib, and sfml-graphics-d.lib in the linker's input and have put SFML_DYNAMIC in the preprocessor. What is the problem?
[QUOTE=MrBob1337;36482021]My compiled program (using SFML) keeps crashing with the message "The application was unable to start correctly (0xc0150002)." In the event viewer, I get the following message:
with the source being "SideBySide". Obviously this is something to do with the Windows 7 re-installation I performed recently where I switched from 32-bit to 64-bit. However there doesn't seem to be a 64-bit version of SFML or anything that would help me. I DID install the 64-bit version of Visual Studio Express though. I have sfml-windows-d.lib, sfml-system-d.lib, and sfml-graphics-d.lib in the linker's input and have put SFML_DYNAMIC in the preprocessor. What is the problem?[/QUOTE]
Just re-compile SFML yourself? Problem solved?
[QUOTE=MrBob1337;36482021]My compiled program (using SFML) keeps crashing with the message "The application was unable to start correctly (0xc0150002)." In the event viewer, I get the following message:
with the source being "SideBySide". Obviously this is something to do with the Windows 7 re-installation I performed recently where I switched from 32-bit to 64-bit. However there doesn't seem to be a 64-bit version of SFML or anything that would help me. I DID install the 64-bit version of Visual Studio Express though. I have sfml-windows-d.lib, sfml-system-d.lib, and sfml-graphics-d.lib in the linker's input and have put SFML_DYNAMIC in the preprocessor. What is the problem?[/QUOTE]
Are you using Visual studio 2010? Don't. I downgraded to 2008 just to use SFML.
[QUOTE=Anthos;36482343]Are you using Visual studio 2010? Don't. I downgraded to 2008 just to use SFML.[/QUOTE]
If that's his problem he should probably just use G++ (MingW) and forget visual all together (only using it as a code editor and just ignoring the compiler part of it).
I compiled the dlls and lib files in debug configuration. It runs without crashing now, but even when I comment everything inside driver.cpp ( the actual program) leaving just this:
[CODE]
/*bunch of commented includes and 'using' directives*/
include <iostream>
int main()
{
/*bunch of commented logic and declares*/
std::cout << "Hello World!";
system("pause");
return 0;
}
[/CODE]
nothing appears in the console window and the program takes a while to close. Debug shows literally nothing happening, even with a breakpoint immediately after the std::cout statement. The program exits with 0, though. What the hell is up with this program?
-snip for rage-
Problem solved.
guys I think I successfully built a sfml 2.0 snapshot on my Ubuntu VM using this tutorial ([url]http://sfmlcoder.wordpress.com/2011/08/16/building-sfml-2-0-with-make-for-gcc/[/url])
but when I try to open a window,
it spits this out:
/tmp/cc2G7R2X.o: In function `main':
rlx.cpp:(.text+0x86): undefined reference to `sf::VideoMode::VideoMode(unsigned int, unsigned int, unsigned int)'
rlx.cpp:(.text+0xc2): undefined reference to `sf::Window::Window(sf::VideoMode, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, sf::ContextSettings const&)'
rlx.cpp:(.text+0xf0): undefined reference to `sf::Window::close()'
rlx.cpp:(.text+0x104): undefined reference to `sf::Window::pollEvent(sf::Event&)'
rlx.cpp:(.text+0x114): undefined reference to `sf::Window::isOpen() const'
rlx.cpp:(.text+0x129): undefined reference to `sf::Window::~Window()'
rlx.cpp:(.text+0x152): undefined reference to `sf::Window::~Window()'
rlx.cpp:(.text+0x17a): undefined reference to `sf::Window::~Window()'
collect2: ld returned 1 exit status
Are you linking properly?
tried a different sample program from the site:
[code]
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(300, 200), "SFML works!");
sf::Text text("Hello SFML");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(text);
window.display();
}
return 0;
}
[/code]
That generated a .o file.
So then I'm supposed to punch this in:
[code]g++ rlx.o -o sfml-app -Lhome/Home/Dev/SFML/lib -lsfml-graphics -lsfml-window -lsfml-system
[/code]
is that right?
[QUOTE=Richy19;36461658]I got it partially working but the image selection isnt working right.
I made a simple example:
...[/QUOTE]
Ought you to be using else if directives rather than just ifs. Obviously its not causing the problems unless something is really f-ed up but it would increase performance drastically.
[QUOTE=Blackwheel;36483286]That generated a .o file.
So then I'm supposed to punch this in:
[code]g++ rlx.o -o sfml-app -Lhome/Home/Dev/SFML/lib -lsfml-graphics -lsfml-window -lsfml-system
[/code]
is that right?[/QUOTE]
Looks correct to me.
[QUOTE=flayne;36483303]Ought you to be using else if directives rather than just ifs. Obviously its not causing the problems unless something is really f-ed up but it would increase performance drastically.[/QUOTE]
GLSL 120 doesnt seem to support "else if"
BTW the initial problem has been fixed
[QUOTE=Blackwheel;36483286]tried a different sample program from the site:
[code]
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(300, 200), "SFML works!");
sf::Text text("Hello SFML");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(text);
window.display();
}
return 0;
}
[/code]
That generated a .o file.
So then I'm supposed to punch this in:
[code]g++ rlx.o -o sfml-app -Lhome/Home/Dev/SFML/lib -lsfml-graphics -lsfml-window -lsfml-system
[/code]
is that right?[/QUOTE]
Alternatively you can just use rlx.cpp and skip running g++ once. But that should be correct.
Everything I did up above works,
but then I try:
[code]export LD_LIBRARY_PATH=home/Home/Dev/SFML/lib && ./sfml-app[/code]
and I get:
./sfml-app: error while loading shared libraries: libsfml-graphics.so.2: cannot open shared object file: No such file or directory
[QUOTE=Richy19;36483320]GLSL 120 doesnt seem to support "else if"
BTW the initial problem has been fixed[/QUOTE]
Doesn't support else if? How quant. I don't suppose it supports texture arrays :v:.
[editline]25th June 2012[/editline]
[QUOTE=Blackwheel;36483364]Everything I did up above works,
but then I try:
[code]export LD_LIBRARY_PATH=home/Home/Dev/SFML/lib && ./sfml-app[/code]
and I get:
./sfml-app: error while loading shared libraries: libsfml-graphics.so.2: cannot open shared object file: No such file or directory[/QUOTE]
Does the file actually end with .2? Because that could be related to the problem.
[QUOTE=Anthos;36482343]Are you using Visual studio 2010? Don't. I downgraded to 2008 just to use SFML.[/QUOTE]
[QUOTE=flayne;36482380]If that's his problem he should probably just use G++ (MingW) and forget visual all together (only using it as a code editor and just ignoring the compiler part of it).[/QUOTE]
I've been using VS2010 perfectly fine with SFML for the past year now.
I haven't read up the person's problem, but have you included the directory to look for? Just telling it to link sfml-graphics-d.lib isn't enough. You need to tell it where sfml-graphics-d.lib is.
[img]http://i.imgur.com/xVkFA.png[/img]
[QUOTE=flayne;36483378]Doesn't support else if? How quant. I don't suppose it supports texture arrays :v:.
[editline]25th June 2012[/editline]
Does the file actually end with .2? Because that could be related to the problem.[/QUOTE]
ya it does,
the file is: libsfml-graphics.so.2
[editline]25th June 2012[/editline]
So instead I tried:
export LD_LIBRARY_PATH=home/Home/Dev/SFML/lib/sfml-app
and that didn't return any complaints,
but still no window.
Is there another step I'm missing?
[editline]25th June 2012[/editline]
Actually, that doesn't make sense does it..
Are you, by any chance, running on an ATI/AMD card? If so, download atigktxx.dll and place it in your .exe directory.
//nevermind then
[QUOTE=WhatTheEf;36484473]Are you, by any chance, running on an ATI/AMD card? If so, download atigktxx.dll and place it in your .exe directory.[/QUOTE]
it's a virtualbox vm
Is there a fast way to calculate an AABB? Right now I am taking the Object Orientated Bounding Box in local space, converting it to global space<-VERY SLOW then taking the four corners of the OOBB and finding the Top-Left and Bottom-Right corners of the OOBB to get an AABB. This is really slow though anyone know of anyway to speed this up? Here is my code:
[cpp]
Vector2_Rect BaseObject::GetAABB()
{
if (mAABBNeedsUpdate)
{
Vector2 TL, TR, BL, BR; // The four coordinate of an OOBB
Vector2_Rect bounds = GetRenderBounds(); // Render bounds in local space
TL = ToGlobal(bounds.Position); // Convert the render bounds to global space
TR = ToGlobal(Vector2(bounds.Position.x + bounds.Size.x, bounds.Position.y));
BL = ToGlobal(Vector2(bounds.Position.x, bounds.Position.y + bounds.Size.y));
BR = ToGlobal(bounds.Position + bounds.Size);
Vector2 AABB_TL, AABB_BR, AABB_TR, AABB_BL; // The coordinates of the AABB
AABB_TL.x = std::min(TL.x, std::min(TR.x, std::min(BL.x, BR.x))); // Find the minimum X value of the corners
AABB_TL.y = std::max(TL.y, std::max(TR.y, std::max(BL.y, BR.y))); // Find the maximum Y value of the corners
AABB_BR.x = std::max(TL.x, std::max(TR.x, std::max(BL.x, BR.x))); // Find the maximum X value of the corners
AABB_BR.y = std::min(TL.y, std::min(TR.y, std::min(BL.y, BR.y))); // Find the minimum Y vaule of the corners
// Only found the Top-Left and Bottom-Right corners, but from these
// We can deduce the Top-Right and Bottom-Left
AABB_TR.x = AABB_BR.x;
AABB_TR.y = AABB_TL.y;
AABB_BL.x = AABB_TL.x;
AABB_BL.y = AABB_BR.y;
mAABB = Vector2_Rect(AABB_BL,AABB_TR-AABB_BL);
mAABBNeedsUpdate = false;
}
return mAABB;
}
[/cpp]
I'm still a bit confused on perspective matrix. I understand how it works and all but now I just need to know what values to use for the clipping plane coordinates.
I'm not to sure if this goes into programming help. But its with Excel. I've got a list made of two columns, its Bin locations and Part numbers for this small store I'm working for. Anyway, its making a graphical representation of the shelves.
Firstly, is this possible in Excel, secondly, if not, what would I use? (That interacts with Excel.) I can do basic code.
I tried google but I'm having no such luck with the functions and examples I can find.
What I am looking for is a function that scans down the list for a location then places that item in a table I have set up in a particular spot. Since there is many items per location, it needs to be able to scan for them all and have them all placed under the right spots.
I've been trying MATCH and VLOOKUP.
I need to know how to make a random.randint in python into a normal int when I call it next.
[QUOTE=thedekoykid;36506107]I'm not to sure if this goes into programming help. But its with Excel. I've got a list made of two columns, its Bin locations and Part numbers for this small store I'm working for. Anyway, its making a graphical representation of the shelves.
Firstly, is this possible in Excel, secondly, if not, what would I use? (That interacts with Excel.) I can do basic code.
I tried google but I'm having no such luck with the functions and examples I can find.
What I am looking for is a function that scans down the list for a location then places that item in a table I have set up in a particular spot. Since there is many items per location, it needs to be able to scan for them all and have them all placed under the right spots.
I've been trying MATCH and VLOOKUP.[/QUOTE]
There is something called VBA (Visual Basic for Applications) that is supposed to allow you to program within Microsoft Office. [url]http://msdn.microsoft.com/en-us/library/ee814737.aspx[/url] This will tell you all you need to know about it.
So I'm trying to make pong with SFML. I have the paddle control done, but I have no idea how to make the ball and do the collision with paddle and the ball.
[QUOTE=demoTron;36512030]So I'm trying to make pong with SFML. I have the paddle control done, but I have no idea how to make the ball and do the collision with paddle and the ball.[/QUOTE]
"Object-Oriented".
Create a class for the ball and the paddle, and maybe have both of them extend from some sort of entity class or something. Have all the input handling done on the paddles, and collision checks done before rendering by checking the position of the objects and their size, and then if they overlap with any other objects. That's a simple, and probably incredibly inefficent way of doing it, but you should be able to figure it out pretty quick.
[QUOTE=flayne;36508967]There is something called VBA (Visual Basic for Applications) that is supposed to allow you to program within Microsoft Office. [url]http://msdn.microsoft.com/en-us/library/ee814737.aspx[/url] This will tell you all you need to know about it.[/QUOTE]
VBA is the best choice for something like this. Trying to do it with conditional cell formulas, macros, etc. is not as easy, whereas VBA will bend to you whim.
[QUOTE=hexpunK;36516494]VBA is the best choice for something like this. Trying to do it with conditional cell formulas, macros, etc. is not as easy, whereas VBA will bend to you whim.[/QUOTE]
Yeah, but then every time you open the spreadsheet it'll be like "MACROS MAY BE DANGEROUS WHARRGARBL"
Hey guys, I've created a simple PHP script that uploads a file. It also allows you to create and edit text files as well as create directories. I got it to work ages a go but for some reason It's suddenly not working.
If anyone here could look at it and try to get it working for me, I would MASSIVELY appreciate it.
[url=http://www.gamefront.com/files/21910078/upload.zip]Here's the link to the code.[/url]
Sorry, you need to Log In to post a reply to this thread.