Comments (9)
It seems MSVC doesn't support creating arrays like this... I've replaced them with vectors for now, and also fixed some other Visual Studio compile errors. It might work now, though I still have some linker errors, which may or may not occur to you too.
from supermariowar.
I always thought this kind of declaration was forbidden in C++. I replaced them with std::string
s, but, like you, I get linker errors.
I spent hours trying to figure it out, to no avail:
I get LINK : fatal error LNK1104: cannot open file 'SDL_image.lib'
, even though I used SDL2_image.lib.
I never entered SDL_image.lib once in cmake, and it's not anywhere in my project options.
I have no clue where MSVC finds this name, so I can't change it.
Can you help me?
EDIT: I found a series of pragma directives as such: #pragma comment(lib, "SDL_image.lib")
in the source. Even though I don't know why they're needed, I changed the occurrences of SDL
to SDL2
.
Now I get unresolved external symbols (zlib functions), and a host of errors that look like SDL1.X code not working with SDL2.
EDIT2: BTW I found this: http://stackoverflow.com/questions/5424549/unresolved-externals-despite-linking-in-zlib-lib. Is it true, in your experience, that I must recompile zlib?
from supermariowar.
I've just pushed some more MSVC patches, it should build and link correctly now. I've set up automated build testing on Appveyor too, but only for SDL1 at the moment.
#pragma comment
can be used to add additional linker parameters to the generated object file. I guess it was easier for the original developers to add dependencies like this, but such tasks are now handled by the build system (CMake).
You won't need to recompile the dependencies; zlib works perfectly, only SDL1 had some problems due to certain internal changes between the Visual Studio version. I've added a workaround which should work, but I haven't done too much testing on Windows yet.
Building with SDL2 should work too, just set the USE_SDL2_LIBS
CMake flag to ON
. Note that only SMW itself has been converted to SDL2, the Level and World Editors won't compile.
from supermariowar.
I'm sorry, but even with your updates, I still get:
Error LNK2019 unresolved external symbol compress referenced in function (...)
I tried linking to zlib\lib\zdll.lib
without success, then I downloaded "zlib 1.2.3 for Windows 9x/NT (DLL and static version)" and tried linking to zlib-1.2.3-lib\lib\zlib.lib
, to no avail.
I only tried with SDL2 and USE_SDL2_LIBS
enabled, if that's of any consequence.
Maybe you could provide me with a copy of your Zlib .lib/.dll file(s) for Windows x64 ?
from supermariowar.
I'm using "zlib compiled DLL, version 1.2.8" from zlib.net
, and it seems to be working on both x86 and x64. Also I've added the SDL2 build to Appveyor, so I can confirm that SDL2 works too on x86. I have some troubles linking the x64-specific libs of SDL1/2, but zlib itself seems to work correctly (probably SDL too if you use its x86 libs even on x64).
from supermariowar.
In case you want to try it, here is the smw.exe
for x86 using SDL2.
from supermariowar.
Have you managed to build it?
from supermariowar.
No I haven't, couldn't get it to work :/
from supermariowar.
Since the original issue, there have been quite some changes in the configuration and testing system; the build are tested with Visual Studio, with SDL1 and 2, so not sure if the issue is still valid. I'm closing this for now, but if it turns out to be still an issue, feel free to report it!
from supermariowar.
Related Issues (20)
- Controller list on screen HOT 4
- Widescreen (16:9) HOT 4
- Unable to run it due to a wrong directory searching HOT 6
- CMake command error. How can I fix this? HOT 11
- Windows ARM64? HOT 2
- Flatpak for SteamDeck HOT 8
- Tileset Limit Break HOT 2
- Suggestion: Animated Backgrounds HOT 2
- SMB1 Tileset Fixes HOT 2
- New Eyecandy Effects HOT 2
- Idea: Challenge Mode HOT 2
- Weird Tileset Behavior HOT 1
- cmake .. -G 'Unix Makefiles' -DUSE_SDL2_LIBS=1 error HOT 4
- missing windows guide on how to build the tools for smw (level, and world editor and server)
- Music in game not working HOT 5
- Including ip:port won't work. HOT 4
- Level editor & World editor doesn't launch HOT 4
- Super Mario War get stuck while loading HOT 4
- Add support for per-map secret powerup effect in worlds
- Segfault during shutdown (SDL2, Linux KMS/DRM video driver) HOT 2
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 supermariowar.