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 - tomizzo11

Pages: [1]
1
Ahhh, interesting. I had defined the SFML_STATIC macro but did not do the second part. Let me give that a try and I will edit this with an update.

EDIT: This indeed was the problem! I do recall this dependency issue a while back but must have forgotten about it. Thank you very much!

2
I had previously posted a question trying to inquire about the difference between the MSVC x86 SFML lib downloads. I had been having library problems and I assumed I had downloaded the wrong library version and downloading the correct library would fix it. However, I'm still having issues so I've decided to post this thread as a more direct request for help. Now onto the issue.

I'm currently working on a Qt project where I plan on using SFML. I'm running into a problem when I attempt to statically link to the library.My Qt project is configured to use the MSVC2015 32bit compiler and I have downloaded the MSVC2015 32 bit SFML library.

A screen shot of the Qt project configuration is located here: http://imgur.com/a/uQpTd

The corresponding qmake code is added to the .pro file: http://imgur.com/a/DkIjp

So I believe I should be all set to start using the static library. I will attempt to create an SoundBuffer instance (a class defined within the static library).

Quote
#include "mainwindow.h"
#include <QApplication>
#include <SFML/Audio.hpp>

int main(int argc, char *argv[])
{
    sf::SoundBuffer buffer;
    QApplication a(argc, argv);
    MainWindow w;
    w.show();

    return a.exec();
}

I then proceed to get the following errors: http://imgur.com/a/tz9lK

The build process fails when I attempt this. However, if I comment out the SoundBuffer, the project builds fine.

It states that there are unresolved external symbols. Now I am a noobie with linking to static libraries, but I assume this means that it can't find the corresponding class in the .lib file. It knows that it exists due to the header file, but it can't actually determine how it is defined. Am I correct in assuming this?

The next red flag that is raised is the the fact that it is generating .dll related messages even though I'm using a static library. I have also verified countless times that the library I'm trying to link to is in face a static library.

HOWEVER, if I decide the link against the dynamic library (via the import library), the project builds just fine. I then move the dll's to the directory containing the .exe files and the project runs just fine with no crash.

So what exactly is going on? Why can't I link against the static library, but I can link against the dynamic version just fine? Furthermore, why does the compiler generate linker issues stating that there are unresolved external symbols and then proceeds to mention the declspec(dllimport)? I'm not using the library as a dynamic library...

Any recommendations of the next step of troubleshooting?

3
Hello there,

I'm currently developing a project in Qt and am trying to link in the SFML libraries. I'm trying to target x86 architecture. However, I'm facing many linking issues...

I believe the issue is due to compiler mismatches, however, I'm confused on all of the technical details. So my question: is it necessary that my project is being compiled with the same compiler that compiled the SFML library?

For example, if my project is using MVCC 14(2015), it is thus necessary for me to link to SFML library compiled with that compiler?

If so, why is this? Aren't all of the MVC++ compilers targeting the same x86 architecture? Thus should the correspond .obj within the .lib be compatible?

I will greatly appreciate any help!  :D

Pages: [1]