Advertisement

QT SFML C++

Started by July 20, 2012 06:42 PM
26 comments, last by Saint Squireen 12 years, 4 months ago
What should I do once I finish all of that up? Would I then build and run it?

~Saint Squireen
Yep, and if there were no typos or other problems, and if everything links properly, you should see a basic SFML window that looks like any other SFML window, except it's controlled by Qt behind the scenes.
Advertisement
By any chance would this same setup work for sfml 2.0 too?

~Saint Squireen
Okay so I just fiished up everything and I only have one error left but I dont know what it means or how to solve it. It says:


multiple target patterns. stop.
File not found: Makefile.Debug


Do you know what it means?

~Saint Squireen

By any chance would this same setup work for sfml 2.0 too?


It seems to be working fine (I just made the transfer yesterday and this morning).

With SFML 2.0, you probably need to compile it by source, and the tutorials aren't yet available for it. For learning purposes you'll want the tutorials to be exactly accurate. When you do move to SFML 2.0 on a different project, the API is mostly the same, but there are enough changes that you don't want to be following a tutorial and not know whether it's messing up because you did something wrong or because the API changed in that spot.

The transfer to SFML 2.0 for me only took a day, but I already know how to use SFML, and I haven't yet tested to make sure all the code is still working. I've already ran into one "gotcha" where everything compiles but doesn't work (easy to fix but tricky to find), and I'm sure there are a few more hidden away.

I'd recommend waiting for it to 2.0 to become officially release with complete tutorials, if you're trying to learn it at the same time.

On the other hand, SFML 2.0 is pretty much finished, and it's supposedly stable and cross-platform supporting already - it'll probably be official released real soon; a 'release client' was already released, so it'll probablly be officially released in a month or two. It's up to you to decide what makes the most sense for your learning process.

multiple target patterns. stop.
File not found: Makefile.Debug

Do you know what it means?


Copy+Paste your complete .pro file (between [ code ] and [ /code ] tags).
Advertisement
Im sorry, but where?

~Saint Squireen
In QtCreator, go to your .pro file. It'll be named after your project name: myProjectName.pro [size=2](Where 'myProjectName' is replaced with the name of your project)

Open it, select it all, and copy it. Then paste it here in a post.
hahahahahahahahahaha whoops sorry haha XD




[color=#008000]#-------------------------------------------------
[color=#008000]#
[color=#008000]#[color=#c0c0c0] [color=#008000]Project[color=#c0c0c0] [color=#008000]created[color=#c0c0c0] [color=#008000]by[color=#c0c0c0] [color=#008000]QtCreator[color=#c0c0c0] [color=#008000]2012-07-20T14:57:41
[color=#008000]#
[color=#008000]#-------------------------------------------------
[color=#800080]QT[color=#c0c0c0] +=[color=#c0c0c0] core[color=#c0c0c0] gui
[color=#800080]TARGET[color=#c0c0c0] =[color=#c0c0c0] SFML-Test
[color=#800080]TEMPLATE[color=#c0c0c0] =[color=#c0c0c0] app
[color=#800080]SOURCES[color=#c0c0c0] +=[color=#c0c0c0] main.cpp\
[color=#c0c0c0] mainwindow.cpp[color=#c0c0c0] \
[color=#c0c0c0] QSFMLCanvas.cpp
[color=#800080]HEADERS[color=#c0c0c0] +=[color=#c0c0c0] mainwindow.h[color=#c0c0c0] \
[color=#c0c0c0] QSFMLCanvas.hpp
[color=#800080]FORMS[color=#c0c0c0] +=[color=#c0c0c0] mainwindow.ui
[color=#008000]#Location[color=#c0c0c0] [color=#008000]to[color=#c0c0c0] [color=#008000]save[color=#c0c0c0] [color=#008000]your[color=#c0c0c0] [color=#008000]executable:
[color=#800080]DESTDIR[color=#c0c0c0] =[color=#c0c0c0] "C:\Users\Griffin[color=#c0c0c0] Laptop\Desktop\SFML-1.6-sdk-windows-mingw.zip"
[color=#008000]#Name[color=#c0c0c0] [color=#008000]of[color=#c0c0c0] [color=#008000]your[color=#c0c0c0] [color=#008000]executable:
[color=#800080]TARGET[color=#c0c0c0] =[color=#c0c0c0] MyGame
[color=#008000]#SFML[color=#c0c0c0] [color=#008000]libraries:
[color=#800080]LIBS[color=#c0c0c0] +=[color=#c0c0c0] -lsfml-audio[color=#c0c0c0] -lsfml-graphics[color=#c0c0c0] -lsfml-window[color=#c0c0c0] -lsfml-[color=#808000]system[color=#c0c0c0] -lsfml-main
[color=#008000]#Path[color=#c0c0c0] [color=#008000]to[color=#c0c0c0] [color=#008000]the[color=#c0c0c0] [color=#008000]linker[color=#c0c0c0] [color=#008000]import[color=#c0c0c0] [color=#008000]files:[color=#c0c0c0] [color=#008000](sfml-audio.a[color=#c0c0c0] [color=#008000]or[color=#c0c0c0] [color=#008000]whatever)
[color=#800080]LIBS[color=#c0c0c0] +=[color=#c0c0c0] -L"C:\Users\Griffin[color=#c0c0c0] Laptop\Desktop\SFML-1.6-sdk-windows-mingw.zip\SFML-1.6\lib"
[color=#008000]#Path[color=#c0c0c0] [color=#008000]to[color=#c0c0c0] [color=#008000]SFML[color=#c0c0c0] [color=#008000]headers:
[color=#800080]INCLUDEPATH[color=#c0c0c0] =[color=#c0c0c0] "C:\Users\Griffin[color=#c0c0c0] Laptop\Desktop\SFML-1.6-sdk-windows-mingw.zip\SFML-1.6\[color=#808000]include\SFML"

~Saint Squireen
Change:
INCLUDEPATH = "C:\Users\Griffin Laptop\Desktop\SFML-1.6-sdk-windows-mingw.zip\SFML-1.6\include\SFML"
To:
INCLUDEPATH = "C:\Users\Griffin Laptop\Desktop\SFML-1.6-sdk-windows-mingw.zip\SFML-1.6\include\"

I don't know if your destination directory (DESTDIR) can be inside a zip file. I'd set it to a normal folder just for your project.
You also have 'TARGET' listed twice (with different assignments). Only have one.

That last one should fix your error, since the error is stating that you have too many TARGETs.

This topic is closed to new replies.

Advertisement