-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation with MSVC #11
Conversation
Thanks for this PR. I do have concerns as to how it'll affect our embedded projects (the SM1000 and ezDV). I'm also not sure about how much effort would be needed to keep VS support working in the future. I'm going to forward this along to the rest of the project team for further discussion and will update when we have more. |
Hi @0815employee - that's quite an impressive project. As per our README we have settled on gcc, and perhaps more generally standards based compilers that support C99. We are content to compile for Windows using gcc based tools, and like features like VLAs and We are an open source project so are not motivated to make extensive modifications to support proprietary, non standard compilers such as MSVC. However it's open source, so please feel free to work on your port as a fork, and even publish it as a separate project if you like. We'd be interested to hear more about the "fixes" if you can be more explicit and/or reproduce the problem using codec2/main on a Linux machine. Can you please tell us a little about your project? For example what are you using libcodec2 for, and why is MSVC support a requirement? |
I work for a company and we integrate codec2 in one of our products which we offer for Linux and Windows. So we had to make the decision whether to use mingw or integrate codec2 into our Windows toolchain. I understand the reasons why you don't want to support MSVC. But I do not like VLAs or complex float either.
Replacing all VLA with the macro is of course also not optimal and creates ugly code sometimes. At least it is possible to switch now easily between VLA and calloc/free. fixes
|
Historical reasons - the OFDM modem was written last and the primary author chose to use complex float, I didn't actually know Thanks for the tips on the bugs - we'll check them out. 2020B is likely to be removed soon as it doesn't offer any real advantage. It's likely the earlier FDMDV/COHPSK modems will be removed soon, along with many FreeDV modes. We're working on a more generic, single FreeDV mode that can handle many channels. Did you port all the ctests to MSVC and do they all pass? That's perhaps a far more important issue than coding and compiler preferences. |
Not complete. The source code itself is ported, but the tests and the executables do not build, as there are still some GCC-specific things here. As soon as I have time I will have another look. |
I have now ported many of the unit tests, see fork. Some unfortunately do not work for various reasons.
These tests are disabled. |
My name is Gary Sitton and I'm very interested in a port from C99 gcc to ANSI C in MSVS C. I have done ports like this before into Thetis which I am working on now. I have a complete Macro library for the complex data type which works very well in place of a native complex type in C99. I am very interested in porting Codec2 into Thetis and have extensive experience in LPC and other DSP technologies. I would like to get in contact with you. My personal e-mail is [email protected]. Thank you. |
Hi @GASitton - I emailed you yesterday, hope it made it through! As @tmiw has suggested in the email thread, our recommended path for use with MSVC is to use DLLs cross compiled from the C99 codebase. This will save you a lot of work, and you well get well tested and maintained code. A source level port is a very big project, and would require you to port many ctests and provide ongoing maintenance as Codec 2 evolves. |
We have recently ported the complete source code of codec2 for MSVC, for our needs.
This includes many changes - in almost all files:
Other changes
Fixes
It would be great if these changes (or parts of them) could be merged.