sfml

VS2012 Error: The application was unable to start correctly (0xc000007b)

走远了吗. 提交于 2019-11-29 14:12:17
I received the error "The application was unable to start correctly (0xc000007b)" after attempting to run my exe file of my C++ SFML 32-bit program I built in Visual Studio 2012. I statically linked the SFML dlls in my project, but incorporated the following dlls along with my program: libsndfile-1.dll openal32.dll msvcp110.dll msvcp110d.dll msvcr110.dll msvcr110d.dll What is the problem? The actual error code that you encountered is 0xC000007B . That is the NTSTATUS error code STATUS_INVALID_IMAGE_FORMAT . That error arises, almost invariably, because the application is 32 bit and attempted

Configuring SFML on Visual Studio manually

ε祈祈猫儿з 提交于 2019-11-29 13:04:49
This Q&A post comes from lots and lots of questions related to sfml library when people try to configure manually their VS projects. Sometimes answers aren't complete or they're too specific. I would like to compile in a single post how to configure VS to be able to use the SFML library both statically and dynamically. So: 1. How can I configure my VS project with sfml libraries dynamically , in a general way? 2. How can I configure my VS project with sfml libraries statically , in a general way? First, I recommend carefully follow the SFML tutorial about configuring the library in Visual

QUdpSocket: Cannot receive datagram

旧街凉风 提交于 2019-11-29 11:30:17
I am using QUdpSocket in order to receive data from a server. When i receive data With SFML its working, i can receive data throught SocketUdp but with qt it doesn't work. void TheClass::Bind() { m_sock_receive = new QUdpSocket(this); if (m_sock_receive->bind(QHostAddress::Any, port)) { std::cout << "Bind: OK" << std::endl; connect(m_sock_receive, SIGNAL(readyRead()), this, SLOT(QtReceive())); } else std::cout << "Bind: NOK" << std::endl; } void TheClass::QtReceive() { std::cout << "Pending data !" << std::endl; } I would make the connect before the bind. It's possible that after binding, the

Can't get depth testing to work in OpenGL

这一生的挚爱 提交于 2019-11-29 10:44:37
I use SFML to create the window. In this screenshot the cube should be behind the pyramid but it just doesn't work. Here is the minimal code I used: #include <OpenGL/gl.h> #include <OpenGL/glu.h> #include <SFML/Graphics.hpp> #include "ResourcePath.hpp" void resize(); void drawScene(); void initGL(); float rtri = 0; float rquad = 0; float z = -10.0f; int main (int argc, const char * argv[]) { // Create the main window sf::RenderWindow *window = new sf::RenderWindow(); window->Create( sf::VideoMode( 800, 600, 32 ), "Collision Detection", sf::Style::Close ); sf::Event event; bool run = true;

#error gl.h included before glew.h

风格不统一 提交于 2019-11-29 10:03:27
So I'm trying to move my OpenGL code from Main() into a specific class that will handle the 3D graphics only when necessary. Previously, the top of my main.cpp file looked like this: #define GLEW_STATIC #include <GL/glew.h> #include <SFML/Graphics.hpp> #include <cstdlib> #include <iostream> #include <fstream> #include "Game.h" This worked well enough. What I tried to do was move all the OpenGL-relevant code into methods of the Game class. So I removed #define GLEW_STATIC and #include <GL/glew.h> from the above, and put them into Game.h, such that the top of Game.h now looks like this: #define

Failed to Initialize GLEW. Missing GL version

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-29 03:00:58
I've tried to set up SFML 2.0 with the latest version of the qt creator, I've set up SFML right and I imported a small game I wrote in visual studio. Upon compilation, I get this: What I tried Reinstalling the entire qt SDK and qt creator IDE from scratch Reinstalling SFML reinstalling mingw I tried to write a simple program to make sure it's not my code, the program compiles correctly but when I close the application, I get OpenGL errors which is not normal I tried posting a thread on the SFML forums but to no avail. Googling the errors shows a few results, which are specific to OpenGL, and

I can not open and image using the SFML library

安稳与你 提交于 2019-11-28 11:52:37
问题 I am having trouble opening the test15.bmp. When I run the program it tries to open a window but crashes. The problem line as much as I could understand is image.loadFromFile(...); Exception thrown at 0x50E82CC4 (vcruntime140.dll) in MandelbrotProject.exe: 0xC0000005: Access violation reading location 0x00741000. This is the exception I get when I use image.loadFromFile("test15.bmp") instead of the absolute path. I have linked and included everything as it was described in the SFML tutorials.

Working With SFML, getting “Unresolved External Symbol” Output

…衆ロ難τιáo~ 提交于 2019-11-28 08:53:11
问题 So I'm making a pong clone, and I'm currently compiling it with the following output: 1>------ Build started: Project: Pong, Configuration: Debug Win32 ------ 1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Image::Create(unsigned int,unsigned int,class sf::Color const &)" (__imp_?Create@Image@sf@@QAEXIIABVColor@2@@Z) referenced in function "public: void __thiscall Display::load_resources(void)" (?load_resources@Display@@QAEXXZ) 1>main

Configuring SFML on Visual Studio manually

若如初见. 提交于 2019-11-28 06:46:24
问题 This Q&A post comes from lots and lots of questions related to sfml library when people try to configure manually their VS projects. Sometimes answers aren't complete or they're too specific. I would like to compile in a single post how to configure VS to be able to use the SFML library both statically and dynamically. So: 1. How can I configure my VS project with sfml libraries dynamically , in a general way? 2. How can I configure my VS project with sfml libraries statically , in a general

QUdpSocket: Cannot receive datagram

泄露秘密 提交于 2019-11-28 05:10:07
问题 I am using QUdpSocket in order to receive data from a server. When i receive data With SFML its working, i can receive data throught SocketUdp but with qt it doesn't work. void TheClass::Bind() { m_sock_receive = new QUdpSocket(this); if (m_sock_receive->bind(QHostAddress::Any, port)) { std::cout << "Bind: OK" << std::endl; connect(m_sock_receive, SIGNAL(readyRead()), this, SLOT(QtReceive())); } else std::cout << "Bind: NOK" << std::endl; } void TheClass::QtReceive() { std::cout << "Pending