Comments (16)
You're welcome!
from faac.
Should be fixed now.
from faac.
still can't build libfaac project.
errMsg ex:
1>f:\github\faac\libfaac\frame.c(35): error C2065: “PACKAGE_VERSION”: 未声明的标识符
1>f:\github\faac\libfaac\frame.c(35): error C2099: 初始值设定项不是常量
1>f:\github\faac\libfaac\quantize.c(249): error C2088: “-”: 对于 union 非法
1>f:\github\faac\libfaac\quantize.c(249): error C2168: “_mm_max_ps”: 内部函数的实参太少
1>f:\github\faac\libfaac\quantize.c(250): error C2088: “=”: 对于 union 非法
1>f:\github\faac\libfaac\quantize.c(251): error C2088: “=”: 对于 union 非法
1>f:\github\faac\libfaac\quantize.c(253): error C2088: “+=”: 对于 union 非法
1>f:\github\faac\libfaac\quantize.c(158): error C2099: 初始值设定项不是常量
from faac.
@FoxesChen Any chance to provide these error messages in English?
@vividos Could you have a look, please?
from faac.
1>f:\github\faac\libfaac\frame.c(35): error C2065: “PACKAGE_VERSION”: undeclared identifier
1>f:\github\faac\libfaac\frame.c(35): error C2099: Initial settings are not constants
1>f:\github\faac\libfaac\quantize.c(249): error C2088: “-”: for union illegal
1>f:\github\faac\libfaac\quantize.c(249): error C2168: “_mm_max_ps”: inner function param too little
1>f:\github\faac\libfaac\quantize.c(250): error C2088: “=”: for union illegal
1>f:\github\faac\libfaac\quantize.c(251): error C2088: “=”: for union illegal
1>f:\github\faac\libfaac\quantize.c(253): error C2088: “+=”: for union illegal
1>f:\github\faac\libfaac\quantize.c(158): error C2099: Initial settings are not constants
from faac.
I'll take a look in the evening, maybe the visual studio project files are outdated again, or the PACKAGE_VERSION can't be read from the configure.ac file.
from faac.
1>f:\github\faac\libfaac\frame.c(35): error C2065: “PACKAGE_VERSION”: undeclared identifier
1>f:\github\faac\libfaac\frame.c(35): error C2099: Initial settings are not constants
PACKAGE_VERSION
is not defined for non-Autoconf builds.
1>f:\github\faac\libfaac\quantize.c(249): error C2088: “-”: for union illegal
1>f:\github\faac\libfaac\quantize.c(249): error C2168: “_mm_max_ps”: inner function param too little
1>f:\github\faac\libfaac\quantize.c(250): error C2088: “=”: for union illegal
1>f:\github\faac\libfaac\quantize.c(251): error C2088: “=”: for union illegal
1>f:\github\faac\libfaac\quantize.c(253): error C2088: “+=”: for union illegal
Seems to be some broken erithmetic with the __m128
data type.
1>f:\github\faac\libfaac\quantize.c(158): error C2099: Initial settings are not constants
There seems to be a logic error in that line. I guess to only compile it with GCC >= 4.6 and not clang it should read
#if !defined(__clang__) && defined(__GNUC__) && (GCC_VERSION >= 40600)
from faac.
Seems to be some broken erithmetic with the
__m128
data type.
Reverting parts of this commit might help:
02037bc
from faac.
@vividos you means i install vs tools lost some config, so that vs can't read the config file? because i build project with mingw, success.
from faac.
About PACKAGE_VERSION: @knik0 added a tool to faad2 to read the package version from autoconf files and write it to a win32_ver.h:
https://github.com/knik0/faad2/tree/master/utils/win32
faac doesn't have that tool, so it doesn't compile frame.c. I could port over that tool if you want.
Next issue is in input.c:
https://github.com/knik0/faac/blob/master/frontend/input.c#L293
bufi
is of type void*, and a value from isize is added to that pointer. MSVC complains because it isn't defined how far the pointer should be advanced; I guess this is a C++ issue (.c files are compiled as C++) and could be fixed by either changing bufi
to char*
or by forcing MSVC to compile as C.
The remaining issues are in quantize.c, where SSE2 code is used which doesn't compile with MSVC. I guess someone with expertise in SSE2 code on MSVC has to look at this.
from faac.
I could port over that tool if you want.
Yes, please!
either changing
bufi
tochar*
or by forcing MSVC to compile as C.
Let's please change the pointer type. So, void pointers are treated like char pointers in pointer arithmetics in C but not in C++?
The remaining issues are in quantize.c, where SSE2 code is used which doesn't compile with MSVC. I guess someone with expertise in SSE2 code on MSVC has to look at this.
I have already found a commit that I could revert in the critical parts and still hopefully achieve the same results.
from faac.
So, void pointers are treated like char pointers in pointer arithmetics in C but not in C++?
Only in GCC:
In GNU C, addition and subtraction operations are supported on pointers to void and on pointers to functions. This is done by treating the size of a void or of a function as 1.
https://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Pointer-Arith.html
from faac.
I didn't exactly for the C language, but in C++ arithmetic with void*
isn't valid.
from faac.
@FoxesChen @vividos Could you please check that the latest commits fixed compilation with MSVC without breaking anything?
from faac.
Compiling worked for me now. I'm using Visual Studio 2019, but the conversation when opening a 2017 project is straight-forward (the wizard does everything).
I also encoded a test wav file with faac.exe and an AAC file was produced that seems to be playing correct.
from faac.
Phew, thanks!
from faac.
Related Issues (20)
- How to read aac file? HOT 1
- Invalid memory address dereference in huffcode (in libfaac/huff2.c:115)
- Invalid memory address dereference in huffcode (in libfaac/huff2.c:132)
- Invalid memory address dereference in huffcode (in libfaac/huff2.c:167)
- Invalid memory address dereference in huffcode (in libfaac/huff2.c:184) HOT 2
- Invalid memory address dereference in huffcode (in libfaac/huff2.c:217)
- Invalid memory address dereference in huffcode (in libfaac/huff2.c:259)
- cppcheck -f -v . 2>cppcheck.log >/dev/null HOT 6
- how to build lib/dll with gcc in mingw, and use lib in msvc
- Time for a 1.30 release HOT 10
- Update the Sorceforge Home / faac-src files to 1.30. HOT 1
- Sample with heavy distortion at default settings (and up to ~160kbps)
- weird audio artifacts HOT 2
- apostrophes show up as � in the encoded file's id3 tag
- Reporting wrong libfaac version HOT 6
- Reduce memory HOT 1
- Croaking sound after encoding.
- LICENSE? HOT 1
- installation error HOT 6
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 faac.