Comments (11)
Hi. Good to know that you are trying to get this library working on Windows. I didn't try anything on Windows so probably the DLL
loading is not working because is not coded for windows yet. Sorry for that. I will try to test some stuff as soon as I can.
You said that you modified my code to allow the compilation on Windows. So, could you send me a pull request with the code so I could test on Windows?
Thanks for filling the issue.
from node-flac-bindings.
I've tried a few things out but haven't had any luck.
When I run "npm install" without any mods it fails:
> [email protected] install C:\Users\domin\source\repos\node-flac-bindings
> prebuild-install || node-gyp rebuild
prebuild-install info begin Prebuild-install version 2.3.0
prebuild-install info install installing standalone, skipping download.
C:\Users\domin\source\repos\node-flac-bindings>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_mo
dules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
index.cpp
encoder.cpp
decoder.cpp
format.cpp
c:\users\domin\source\repos\node-flac-bindings\node_modules\nan\nan_new.h(208): warning C4244: 'argument': conversion f
rom 'uint64_t' to 'double', possible loss of data (compiling source file ..\src\decoder.cpp) [C:\Users\domin\source\rep
os\node-flac-bindings\build\flac-bindings.vcxproj]
..\src\decoder.cpp(77): note: see reference to function template instantiation 'v8::Local<v8::Number> Nan::New<v8::Nu
mber,uint64_t>(A0)' being compiled
with
[
A0=uint64_t
]
c:\users\domin\source\repos\node-flac-bindings\node_modules\nan\nan_new.h(208): warning C4244: 'argument': conversion f
rom 'uint64_t' to 'double', possible loss of data (compiling source file ..\src\encoder.cpp) [C:\Users\domin\source\rep
os\node-flac-bindings\build\flac-bindings.vcxproj]
..\src\encoder.cpp(82): note: see reference to function template instantiation 'v8::Local<v8::Number> Nan::New<v8::Nu
mber,uint64_t>(A0)' being compiled
with
[
A0=uint64_t
]
metadata0.cpp
metadata1.cpp
metadata2.cpp
metadata.cpp
frame.cpp
streammetadata.cpp
streammetadata_application.cpp
streammetadata_cuesheet.cpp
c:\users\domin\source\repos\node-flac-bindings\node_modules\nan\nan_new.h(208): warning C4244: 'argument': conversion f
rom 'uint64_t' to 'double', possible loss of data (compiling source file ..\src\mappings\frame.cpp) [C:\Users\domin\sou
rce\repos\node-flac-bindings\build\flac-bindings.vcxproj]
..\src\mappings\frame.cpp(21): note: see reference to function template instantiation 'v8::Local<v8::Number> Nan::New
<v8::Number,uint64_t>(A0)' being compiled
with
[
A0=uint64_t
]
c:\users\domin\source\repos\node-flac-bindings\node_modules\nan\nan_new.h(208): warning C4244: 'argument': conversion f
rom 'uint64_t' to 'double', possible loss of data (compiling source file ..\src\mappings\streammetadata_cuesheet.cpp) [
C:\Users\domin\source\repos\node-flac-bindings\build\flac-bindings.vcxproj]
..\src\mappings\streammetadata_cuesheet.cpp(27): note: see reference to function template instantiation 'v8::Local<v8
::Number> Nan::New<v8::Number,uint64_t>(A0)' being compiled
with
[
A0=uint64_t
]
streammetadata_padding.cpp
streammetadata_picture.cpp
streammetadata_seektable.cpp
streammetadata_streaminfo.cpp
c:\users\domin\source\repos\node-flac-bindings\node_modules\nan\nan_new.h(208): warning C4244: 'argument': conversion f
rom 'uint64_t' to 'double', possible loss of data (compiling source file ..\src\mappings\streammetadata_streaminfo.cpp)
[C:\Users\domin\source\repos\node-flac-bindings\build\flac-bindings.vcxproj]
..\src\mappings\streammetadata_streaminfo.cpp(112): note: see reference to function template instantiation 'v8::Local
<v8::Number> Nan::New<v8::Number,uint64_t>(A0)' being compiled
with
[
A0=uint64_t
]
streammetadata_unknown.cpp
streammetadata_vorbiscomment.cpp
streammetadata_seekpoint.cpp
streammetadata_cuesheet_track.cpp
c:\users\domin\source\repos\node-flac-bindings\node_modules\nan\nan_new.h(208): warning C4244: 'argument': conversion f
rom 'uint64_t' to 'double', possible loss of data (compiling source file ..\src\mappings\streammetadata_seekpoint.cpp)
[C:\Users\domin\source\repos\node-flac-bindings\build\flac-bindings.vcxproj]
..\src\mappings\streammetadata_seekpoint.cpp(7): note: see reference to function template instantiation 'v8::Local<v8
::Number> Nan::New<v8::Number,uint64_t>(A0)' being compiled
with
[
A0=uint64_t
]
c:\users\domin\source\repos\node-flac-bindings\node_modules\nan\nan_new.h(208): warning C4244: 'argument': conversion f
rom 'uint64_t' to 'double', possible loss of data (compiling source file ..\src\mappings\streammetadata_cuesheet_track.
cpp) [C:\Users\domin\source\repos\node-flac-bindings\build\flac-bindings.vcxproj]
..\src\mappings\streammetadata_cuesheet_track.cpp(7): note: see reference to function template instantiation 'v8::Loc
al<v8::Number> Nan::New<v8::Number,uint64_t>(A0)' being compiled
with
[
A0=uint64_t
]
streammetadata_cuesheet_index.cpp
win_delay_load_hook.cc
c:\users\domin\source\repos\node-flac-bindings\node_modules\nan\nan_new.h(208): warning C4244: 'argument': conversion f
rom 'uint64_t' to 'double', possible loss of data (compiling source file ..\src\mappings\streammetadata_cuesheet_index.
cpp) [C:\Users\domin\source\repos\node-flac-bindings\build\flac-bindings.vcxproj]
..\src\mappings\streammetadata_cuesheet_index.cpp(7): note: see reference to function template instantiation 'v8::Loc
al<v8::Number> Nan::New<v8::Number,uint64_t>(A0)' being compiled
with
[
A0=uint64_t
]
Creating library C:\Users\domin\source\repos\node-flac-bindings\build\Release\flac-bindings.lib and object C:\User
s\domin\source\repos\node-flac-bindings\build\Release\flac-bindings.exp
format.obj : error LNK2001: unresolved external symbol "void __cdecl flac_bindings::structToJs<struct FLAC__StreamMetad
ata_SeekTable *>(struct FLAC__StreamMetadata_SeekTable * const *,class v8::Local<class v8::Object> &)" (??$structToJs@P
EAUFLAC__StreamMetadata_SeekTable@@@flac_bindings@@YAXPEBQEAUFLAC__StreamMetadata_SeekTable@@AEAV?$Local@VObject@v8@@@v
8@@@Z) [C:\Users\domin\source\repos\node-flac-bindings\build\flac-bindings.vcxproj]
metadata0.obj : error LNK2001: unresolved external symbol "void __cdecl flac_bindings::structToJs<struct FLAC__StreamMe
tadata *>(struct FLAC__StreamMetadata * const *,class v8::Local<class v8::Object> &)" (??$structToJs@PEAUFLAC__StreamMe
tadata@@@flac_bindings@@YAXPEBQEAUFLAC__StreamMetadata@@AEAV?$Local@VObject@v8@@@v8@@@Z) [C:\Users\domin\source\repos\n
ode-flac-bindings\build\flac-bindings.vcxproj]
C:\Users\domin\source\repos\node-flac-bindings\build\Release\flac-bindings.node : fatal error LNK1120: 2 unresolved ext
ernals [C:\Users\domin\source\repos\node-flac-bindings\build\flac-bindings.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1```
from node-flac-bindings.
The mods I made were:
- Hack in FLAC include files by copying them to FLAC subdir in top level and modifying binding.gyp
"include_dirs": [
"<!(node -e \"require('nan')\")","./FLAC/"
],
This blows up badly - here's a tiny snippet:
PS C:\Users\domin\source\repos\node-flac-bindings> npm install
> [email protected] install C:\Users\domin\source\repos\node-flac-bindings
> prebuild-install || node-gyp rebuild
prebuild-install info begin Prebuild-install version 2.3.0
prebuild-install info install installing standalone, skipping download.
C:\Users\domin\source\repos\node-flac-bindings>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_mo
dules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
index.cpp
encoder.cpp
decoder.cpp
format.cpp
C:\Users\domin\.node-gyp\6.11.4\include\node\node.h(322): error C3861: 'assert': identifier not found (compiling source
file ..\src\index.cpp) [C:\Users\domin\source\repos\node-flac-bindings\build\flac-bindings.vcxproj]
C:\Users\domin\.node-gyp\6.11.4\include\node\node.h(322): error C3861: 'assert': identifier not found (compiling source
file ..\src\encoder.cpp) [C:\Users\domin\source\repos\node-flac-bindings\build\flac-bindings.vcxproj]
C:\Users\domin\.node-gyp\6.11.4\include\node\node_object_wrap.h(20): error C3861: 'assert': identifier not found (compi
ling source file ..\src\index.cpp) [C:\Users\domin\source\repos\node-flac-bindings\build\flac-bindings.vcxproj]
C:\Users\domin\.node-gyp\6.11.4\include\node\node_object_wrap.h(20): error C3861: 'assert': identifier not found (compi
ling source file ..\src\encoder.cpp) [C:\Users\domin\source\repos\node-flac-bindings\build\flac-bindings.vcxproj]
C:\Users\domin\.node-gyp\6.11.4\include\node\node_object_wrap.h(55): error C3861: 'assert': identifier not found (compi
ling source file ..\src\index.cpp) [C:\Users\domin\source\repos\node-flac-bindings\build\flac-bindings.vcxproj]
from node-flac-bindings.
- Attempt to point to libFLAC_dynamic.lib to cure the linking error by adding
"libraries": ["../libs/libFLAC_dynamic.lib",], into binding.gyp after copying files. Made no difference.
from node-flac-bindings.
Hi, I'm trying to fix the errors right now. I managed to fix the compilation errors when using npm install
(without any modifications of the binding.gyp
) that's good for me :)
I will keep trying to fix the errors on Windows.
One thing that I didn't tell you is that the bindings doesn't require to have installed the FLAC headers anywhere. But to make it work, the FLAC library (.dll
) needs to be available in the PATH
variable or manually tell my library where to find it. That last is what I'm testing now.
Edit: It is also available to use FLAC_LIBRARY
env variable to tell where is the library.
from node-flac-bindings.
OK so no need for header files - that is good news.
Providing the .dll won't be a problem.
Thanks a lot and good luck with the fixes.
from node-flac-bindings.
Oops cloded in error!
So no need for flac headers - good news.
Thanks a lot!
from node-flac-bindings.
Reopening, until it's all tested and fixed :)
from node-flac-bindings.
76c3467 That commit fixed the compilation errors.
I uploaded a new version of the package, try with that new version and tell me if it's all OK.
from node-flac-bindings.
Superb - have tested FileEncoder and StreamEncoder and both are working perfectly.
I just had to put FLAC.dll in the app root dir and all worked.
Thanks a lot
from node-flac-bindings.
Good to know then :)
Issue fixed, so I'm closing it.
from node-flac-bindings.
Related Issues (20)
- Can't instantiate flac.FileDecoder HOT 9
- prebuild-install WARN install No prebuilt binaries found (target=12.18.0 runtime=node arch=x64 libc= platform=win32) HOT 8
- Any documentation on how to write metadata to a flac file? HOT 5
- FLAC StreamDecoder unable to decode file when FileDecoder does HOT 17
- "Encoder has not been initialized yet" Error raised while using StreamEncoder HOT 7
- Installation fails on Android HOT 4
- Crashes on node 14.x HOT 2
- how to create metadata HOT 4
- Illegal instruction (Core dumped) error on Synology DS718+ HOT 10
- Decoder initialization failed: Error_opening_file HOT 26
- When I packaged the Electron project, it didn't work HOT 8
- A specific song cannot be converted on windows HOT 16
- upgrade to 3.0.0, ES module error HOT 15
- New release breaks my code HOT 8
- macbook pro m1, 13.2 (22D49) can't load libflac HOT 6
- Support for foreign metadata RIFF chunks HOT 3
- 24bit encoding HOT 7
- FLAC compressionLevel parameter is ignored HOT 5
- Miss check object on ptr HOT 1
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 node-flac-bindings.