|
|
|
06-10-2018, 07:26 AM
|
#1
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
Is it possible to compile SWS with anything other than MSVC?
I would like to add a few simple functions to SWS to expose some window-related functions (WindowFromPoint, ClientToScreen and GetClientRect) to the Lua API.
Unfortunately, installing VC is turning out to be more difficult than the actual coding: None of my online devices use Windows, and there doesn't seem to be any easy way to get an offline installer for VC.
In the extensions SDK page, Justin wrote that "Extensions for REAPER/win32 should be written in C++ and compiled using MSVC (pure virtual interface classes are used and as such the C++ ABI must be compatible -- sorry, mingw users)." However, that was written in 2009, so hopefully other compilers have become compatible since then.
I have tried building SWS with MinGW, but I get lots of errors. It seems that the SWS code uses lots of compiler-specific stuff such as "i64" suffixes.
Last edited by juliansader; 06-10-2018 at 09:40 AM.
|
|
|
06-10-2018, 07:39 AM
|
#2
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Nope, you have to use the Microsoft compiler on Windows.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
06-10-2018, 11:06 AM
|
#4
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by nofish
|
Right, but to get binaries that work on Windows, they have to be built on Windows using the Microsoft compiler.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
06-10-2018, 11:19 AM
|
#5
|
Human being with feelings
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
|
Quote:
Originally Posted by Xenakios
Right, but to get binaries that work on Windows, they have to be built on Windows using the Microsoft compiler.
|
Ok, wasn't clear to me from the question if meant Windows related or building SWS in general.
|
|
|
06-19-2018, 01:29 PM
|
#6
|
Human being with feelings
Join Date: Jul 2009
Posts: 3,714
|
I finally figured out how to install Visual Studio offline: The older versions -- from before online installer became trendy -- were still available as .iso downloads.
|
|
|
06-20-2018, 10:36 AM
|
#7
|
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
Quote:
Originally Posted by juliansader
In the extensions SDK page, Justin wrote that "Extensions for REAPER/win32 should be written in C++ and compiled using MSVC (pure virtual interface classes are used and as such the C++ ABI must be compatible -- sorry, mingw users)." However, that was written in 2009, so hopefully other compilers have become compatible since then.
|
I just want to say that it is theoretically possible to compile REAPER extensions with mingw (I do this), but that to too tricky for "mainstream" developers
|
|
|
06-20-2018, 10:54 AM
|
#8
|
Human being with feelings
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
|
Quote:
Originally Posted by azslow3
I just want to say that it is theoretically possible to compile REAPER extensions with mingw (I do this), but that to too tricky for "mainstream" developers
|
Why do some horrible tricks that might fail, when the simple solution is to just download the free of charge Visual Studio from Microsoft?
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
|
|
|
06-20-2018, 11:31 AM
|
#9
|
Human being with feelings
Join Date: Feb 2016
Posts: 7
|
Quote:
Originally Posted by Xenakios
Why do some horrible tricks that might fail, when the simple solution is to just download the free of charge Visual Studio from Microsoft?
|
a better question !
Why to be strict to a not so popular compiler ?
|
|
|
06-21-2018, 02:52 AM
|
#10
|
Human being with feelings
Join Date: Nov 2017
Location: Heidelberg, Germany
Posts: 797
|
Quote:
Originally Posted by junko
a better question !
Why to be strict to a not so popular compiler ?
|
+. If one program should work on 3 platforms, why not use a compiler which works on all these platforms?
Also "tricks" are not really horrible. Just several defines before including REAPER API headers and several "mods" to replace (not so many) "classes" with proper defined "structures".
I write plug-ins in "plain C" (to avoid g++ library, compiles faster and I know what exactly is going to be generated), that requires a bit more "tricks".
The only requirement - understanding what C++ ABI is exactly and the differences in it between VC and (cross)GCC. Most programmers I know, which write C(++) code for decades, have rather fussy knowledge in that topic (for most people digging so deep without practical application is a waste of time).
Note that I am writing about REAPER API itself, not about re-compiling C++ extensions.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 03:22 AM.
|