Questions tagged [physfs]

PhysicsFS is a C library to provide abstract access to various archives. It is intended for use in video games, and the design was somewhat inspired by Quake 3's file subsystem.

PhysicsFS provides a way to effectively set up file systems through zip-files and similar archives. You can mount one or more archives into a virtual file system, through which you can access the directory structure and file contents of those archives.

This is primarily used for file reading, but writing is also permitted, though not to archives, just to the regular filesystem.

This tool is intended for use by videogames, but any application could use it.

19 questions
2
votes
1 answer

undefined reference errors after running cmake

I've tried to essentially build the PhysFS library with Cmake, what I used was Code::Blocks mingw makefiles. I can import in my project, I can technically declare the PhysFS_init() function (although that gives me too few arguments error) yet when…
Bugster
  • 1,552
  • 8
  • 34
  • 56
1
vote
2 answers

Can't link PhysFS into my C++ project under Visual Studio 2010

I'm trying to use PhysFS in my C++ game (using a C++ wrapper) under Visual Studio 2010, but the linker refuses to link the library. I built the library as per the INSTALL.txt file and have a physfs.lib in C:\include\physfs-2.0.2\lib\Debug, but it…
Lexi
  • 1,670
  • 1
  • 19
  • 35
1
vote
1 answer

How do I get Boost.Serialization to work with PhysicsFS

I would like to use PhysFS in conjunction with Boost.Serialization. I found an implementation here which uses Boost.Iostreams to create a PhysFS file stream. It works for basic operations, buy if I try ti use it with Boost.Serialization, I get the…
Chris_F
  • 4,991
  • 5
  • 33
  • 63
1
vote
2 answers

Pointer of a C# object for unmanaged interop

I am currently writing a wrapper for the PhysFS library, and I stumbled across a bit of troubles regarding the marshalling of managed objects. Take for example the PHYSFS_enumerateFilesCallback method, which takes a function pointer and a…
1
vote
1 answer

PhysFS corrupting first few bytes of data

So, this PhysFS class I'm writing seems to be corrupting the first few characters of all the data it reads. The rest of the data seems fine... Here is the code being called: std::vector FileIO::vectorFromFile(std::string fileName) { …
user1834037
  • 65
  • 1
  • 5
1
vote
0 answers

Code::blocks cmake makefile nothing to be done when building

I've downloaded PhysFS and attempted to build it with Cmake. The option I generated with is Code::Blocks makefiles, which generated a project file. I supposed it was as easy as opening that project file and trying to build but that didn't…
Bugster
  • 1,552
  • 8
  • 34
  • 56
1
vote
2 answers

Can PhysFS use ifstreams?

I have a problem. I have lots of code that uses ifstreams in this manner: ex: bool AudioManager::_loadSounds( const std::string& path, const std::string& appendPath ) { //open the file std::ifstream ifs( path.c_str() ); //ensure it is…
jmasterx
  • 52,639
  • 96
  • 311
  • 557
0
votes
2 answers

PhysFS and Python embedding

I am writing a game engine and I'd like it to have Python scripting as well as support for mods using PhysFS. My game data is stored something like this: / native scripts sprites ... mods mymodname scripts What I want is for the mod…
Paul Manta
  • 30,618
  • 31
  • 128
  • 208
0
votes
0 answers

How link PhysFS with CMAKE?

I'm trying to use the PhysFS in my game in C. I'm using CMake to generate the Makefile. CMake indicates well found the include folder and the lib, but I get an error during the build: undefined reference to "PHYSFS_init". Here is my CMakeLists.txt…
shingosan
  • 21
  • 4
0
votes
1 answer

PhysFS_init() returns non-zero with error: "no error"

Im experiencing a rather weird crash in my code and im unsure as to what causes it. Im trying to use PhysFS in my c++ code. the code below is part of a class and Visual Studio 2017 tells me that the crash appears in PHYSFS_mount() and subsequently…
Raphl10
  • 56
  • 2
  • 6
0
votes
1 answer

#include with custom IO for GLSL/C?

I have two questions, two very important ones: Is there a C preprocessor out there that will be able to to take any custom function for locating a file invokved by #include? Because, say, I have my codes stored in a ZIP file or something, and rely…
0
votes
0 answers

How to load a dynamically library via PhysFS?

Here's my predicament: I am using PhysFS, which allows me to treat multiple directories and archives as one virtual directory. This is for a video game in the future, which I intend to make modder-friendly. PhysFS is the best way to make it…
0
votes
1 answer

R6025 pure virtual function call (class derived from sf::InputStream)

For my game, I want to use PhysFs to extract music files that are in a zip file I created a custom class MusicStream that inherits from sf::InputStream that I use as an sf::Music's stream. This is my basic program: #include…
A. D.
  • 728
  • 1
  • 9
  • 27
0
votes
2 answers

Why is my compiler trying to convert from signed long long to unsigned int

The line std::unique_ptr myBuf(new PHYSFS_sint64[PHYSFS_fileLength(myfile)]); produces the warning warning C4244: 'initializing' : conversion from 'PHYSFS_sint64' to 'unsigned int', possible loss of data PHYSFS_sint64 is a typedef…
A. D.
  • 728
  • 1
  • 9
  • 27
0
votes
1 answer

Magick++ not loading from blog

I am using Magick++ to load some images. Because I want to wrap PhysFS for all of my image loads, I needed to load an image by blob instead of file path. This code: Magick::Image test("path/to/some.png"); Works without issue. However once I do…
Kansha
  • 570
  • 4
  • 12
1
2