Comments (9)
If you're using precompiled binaries for tmxlite and sfml then they were probably compiled with different settings. Recompile one or the other (or both) so that the settings match, then make sure your own project settings match too.
from tmxlite.
Could you give me an example of how to do that with the tmxlite stuff you uploaded ?
I'm sorry if this seems noobish but I don't actually know how to do it myself... I'm completely self thought and I've only been programming for about a year so sometimes I don't know things that come as a given to most people.
from tmxlite.
It sounds like you're using Visual Studio so that's what I'll assume.
Clone or download the tmxlite repository to your computer. Open the visual studio solution, right click on the tmxlite project and choose properties. Make sure the configuration is set to DebugStatic, and set the runtime library as you were on your project. Do the same for ReleaseStatic.
At the top of VS where the drop down contains the selection for Release and Debug builds, select configuration manager. For the release configuration set the tmxlite project to ReleaseStatic. Do the same for Debug. You can also choose here if you're building for x86 or x64. You should be able to hit build and get the compiled tmxlite library. If you get a build failure it may be because the v140 compiler tools are not installed - either upgrade the project to v141 (project properties) or install the tools from the VS2017 installer program.
For SFML it's pretty much the same, only you first have to create the VS solution with CMake. There are instructions on the SFML site. When you have the solution created you can set the runtime libraries in the same way. It's also worth noting that if you want to use static SFML libraries your project needs to define SFML_STATIC in the preprocessor options of the project properties. You also need to link a set of further libraries, listed on the SFML site (under setting up SFML for visual studio). This isn't necessary when using dll/shared libraries but you will get errors if you accidentally mix the two up.
from tmxlite.
Ok, great explanation, it sounds like I'll be able to figure it out. I know about SFML's usual requierments , I've been playing around with it for a few months now, learning to build a pretty basic game framework.
I'll give it a try tomorrow, I've already spent like 5 hours today trying to get it all up and running..... thanks a lot for helping out :)
from tmxlite.
No problem, we've all been there :)
from tmxlite.
I've compiled both the tmxlite and the SFML libs manually and linked them together for the most part, however I'm still left with this :
1>sfml-window-s-d.lib(JoystickImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__joyGetPosEx@8 referenced in function "public: static bool __cdecl sf::priv::JoystickImpl::isConnected(unsigned int)" (?isConnected@JoystickImpl@priv@sf@@SA_NI@Z)
1>sfml-window-s-d.lib(JoystickImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__joyGetDevCapsW@12 referenced in function "public: bool __thiscall sf::priv::JoystickImpl::open(unsigned int)" (?open@JoystickImpl@priv@sf@@QAE_NI@Z)
1>sfml-system-s-d.lib(SleepImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__timeGetDevCaps@8 referenced in function "void __cdecl sf::priv::sleepImpl(class sf::Time)" (?sleepImpl@priv@sf@@YAXVTime@2@@z)
1>sfml-system-s-d.lib(SleepImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__timeBeginPeriod@4 referenced in function "void __cdecl sf::priv::sleepImpl(class sf::Time)" (?sleepImpl@priv@sf@@YAXVTime@2@@z)
1>sfml-system-s-d.lib(SleepImpl.cpp.obj) : error LNK2019: unresolved external symbol __imp__timeEndPeriod@4 referenced in function "void __cdecl sf::priv::sleepImpl(class sf::Time)" (?sleepImpl@priv@sf@@YAXVTime@2@@z)
I've tried linking manually compiled libraries as well as linkining manually compiled tmxlite against my usual sfml settings and I still get these same errors.... Do you know what the issue could be ?
Sorry to keep bugging :)
from tmxlite.
These are sfml errors, probably because you're statically linking it:
Starting from SFML 2.2, when static linking, you will have to link all of SFML's dependencies to your project as well. This means that if you are linking sfml-window-s.lib or sfml-window-s-d.lib for example, you will also have to link opengl32.lib, winmm.lib and gdi32.lib. Some of these dependency libraries might already be listed under "Inherited values", but adding them again yourself shouldn't cause any problems.
As the errors are from sfml-system and sfml-window at a guess I'd say you're missing winmm.lib. Check the table in the link for the full list of libs :)
from tmxlite.
It looks like it really was the winmm.lib file ! I actually checked the lib files in my other sfml project to see if I'm missing something, and somehow I skipped that one , even though I can see that it's there now .
Well , thanks a lot man, it's up and running now - time to get down to the interesting stuff :)
from tmxlite.
You're welcome, have fun!
from tmxlite.
Related Issues (20)
- Problem with getLayerAs for const pointers HOT 6
- Can't find package when installing using vcpkg HOT 1
- CAN SOMEONE JUST EXPLAIN HOW TO USE THIS HOT 9
- Problem with "std::localtime" in Log.hpp line 145 HOT 1
- meson.build version doesn't match git tags HOT 1
- Enough with the unsigned integers
- Find tmxlite on Windows HOT 4
- Feature Request: Allow independent parse of tsx to TileMap. HOT 2
- How hard would it be to adapt the library to render an isometric map? HOT 2
- map.load() not getting any path HOT 10
- Unable to start program. libtmxlite-s-d.lib is not a valid win32 application HOT 6
- When the camera zooms out, the animation speeds up HOT 1
- Not orthogonal and will not be shown HOT 3
- How to use tmxlite on Windows and CLion HOT 3
- Not a valid orthogonal layer, nothing will be drawn. HOT 3
- Failed opening tsx file for tile set
- I can't load every tsx file HOT 1
- test colission HOT 1
- i cant find example for rendering tilemap inSDL2 c++ HOT 1
- Anything against making MapLayer::Chunk public? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmxlite.