Has any one compiled lib x264 using CLI backend for gcc compiler? (Compiled x264 into .net dll)
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Are you using C99 features? If not, Visual C++ with the
/clr:pureoption should do the trick. You will need a little bit of C++/CLI mixed in to define your entrypoints that other .NET projects can call, but those can be in completely separate files (you can share entire C-only source files with native projects).EDIT: Basic guide to making this work:
/clr:pure#includedirective for the header files which prototype the functions you want to use.ref classcreated by the new project wizard (in the aforementioned .cpp file), add some functions (maybe static functions) which call your C library functions.As a hint, instead of creating a forwarding function in the
ref classfor every function in the library, you may want to make functions that do useful work (for the particular definition of useful for your particular project) by calling a bunch of library functions.You’ll probably want to get comfortable with the
marshal_astemplate which is good for converting .NETSystem::Stringinto C strings and back again.