Comments (1)
How to solve the problem "unknown _findfirst" issue with luafilesystem / luarocks / mingw+MSVCR80
Background:
Starting with MSVCR71 Microsoft renamed a lot of routines for the sake of compatibility with 32/64 Windows.
luafilesystem (as of version 1.6.2) still uses the old "MSVCRT.dll" 32 Bit routines.
Current "luarocks" for Windows however uses MSVCR80.dll (as of November 2013)
So if you have a build environment with current luarocks and mingw32, you have the problem that luafilesystem is also built against MSVCR80.dll - and your lua program will fail using any of the lfs-functions.
The solution ist very simple: Don´t use MSVCR80.
The way ist not too hard. The caveat is: You cannot use the simple "luarocks install luafilesystem".
You have to do it by hand.
The way:
Start a Windows Command processor (cmd.exe)
Say "luarocks install luafilesystem"
-> Now you have a lfs.dll which does not work mit your installation (try it - if it works hooray you are done).
Otherwise continue:
Say "luaroks unpack luafilesystem"
-> luarocks fetches luafilesystem from the repo
Say "cd luafilesystem-1.6.2-1"
Say "cd luafilesystem-1.6.2"
Say "luarocks make"
-> It builds everything and installs it to your luarocks directory (still not functionning)
-> It builds with the following command:
mingw32-gcc -shared -o lfs.dll src/lfs.o c:/users/public/lua/LuaRocks/2.1/lua5.1.lib -lMSVCR80
-> "-lMSVCR80" is the enemy - it forces mingw32 to link against MSVCR80.dll
-> So take the same line without it:
Say "mingw32-gcc -shared -o lfs.dll src/lfs.o c:/users/public/lua/LuaRocks/2.1/lua5.1.lib"
Now there is a "lfs.dll" with around 64kb. Copy this dll to your lua installation directory
If size is a concern, you can make lfs.dll even smaller:
Say "strip lfs.dll"
-> Now around 19kb
If there is any better way, please tell!
Regards
Helmut
from luafilesystem.
Related Issues (20)
- Fatal Error - /usr/include/features.h:461:12: fatal error: sys/cdefs.h: No such file or directory HOT 2
- lfs.chdir Changes current working directory to volume without end slash wont work
- lfs.link (symlink, new[, symlink]) always create a symbolic link
- Why is luarocks saying : Error: unknown option '-e' when installing luacheck? HOT 4
- load on windows fails HOT 2
- Upload new dev-rockspec to LuaRocks.org HOT 4
- Update homepage link on this GitHub project HOT 1
- performance in windows of lfs.attributes inside lfs.dir loop
- lfs.link unsupported on windows even in developper mode HOT 1
- keep got warning message with openresty
- Function lfs.mkdir() is not idempotent and hence not thread safe
- error when retrieve symlinkatrributes at directory symlink HOT 1
- Copying/moving files HOT 5
- Documentation site 404 error? HOT 1
- Update homepage HOT 5
- error while installing HOT 3
- missing prototypes warnings when building on windows using msys2
- Error when installing on windows via luarocks HOT 3
- Does not compile in Windows in Unicode (WCHAR) mode
- pl.Path.isdir doesn't work properly if the path prefix start by "~" HOT 12
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 luafilesystem.