COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 02-21-2017, 11:30 AM   #1
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 90
Default Compiling in Windows

Hi masters!

My current system is Mac.I'm building my plugins on Mac.My plugins are done.But now i will start to build in Windows.I will buy Windows PC with Windows 10.And i will download Visual Studio Express(free one).

How should i build in Windows?I guess,i will move plugin's project to Windows and just compile in Visual Studio,right?Should i change or set anything?

I just want to know what should i do before start build for Windows.

Thanks.
Tunca is offline   Reply With Quote
Old 02-21-2017, 12:29 PM   #2
earlevel
Human being with feelings
 
Join Date: Dec 2015
Posts: 164
Default

An option: You can get VMware Fusion (or Parallels) and run Windows 10. You can download Windows 10 from Microsoft and run it for free. They encourage but do not enforce licensing at this time.

Everything works, and it's convenient. VMware will let you share folders with Mac OS, so you can compile and run on Windows and on Mac from the same folder. You can share an iLok between the two—though only one at a time (pull out the iLok and re-insert it while running the VM, to get it to see the iLok.
earlevel is online now   Reply With Quote
Old 02-21-2017, 12:48 PM   #3
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 90
Default

Quote:
Originally Posted by earlevel View Post
An option: You can get VMware Fusion (or Parallels) and run Windows 10. You can download Windows 10 from Microsoft and run it for free. They encourage but do not enforce licensing at this time.

Everything works, and it's convenient. VMware will let you share folders with Mac OS, so you can compile and run on Windows and on Mac from the same folder. You can share an iLok between the two—though only one at a time (pull out the iLok and re-insert it while running the VM, to get it to see the iLok.
Thanks for idea!After little research,i found it really useful!But is this good for plugin development?Can i use Windows on Mac as normal Windows PC?For example i will install Visual Studio,Reaper,Cubase and Pro Tools...
Tunca is offline   Reply With Quote
Old 02-21-2017, 03:17 PM   #4
earlevel
Human being with feelings
 
Join Date: Dec 2015
Posts: 164
Default

Quote:
Originally Posted by Tunca View Post
But is this good for plugin development?Can i use Windows on Mac as normal Windows PC?For example i will install Visual Studio,Reaper,Cubase and Pro Tools...
I built a Windows 10 VM specifically for AAX plugin development, in VMWare Fusion 8. I build my AAX plugin in VS2015, run Pro Tools, test the plugin and debug. I run Avid's control surface simulator on the Windows side, and use it to test my control mapping for the plugin under Pro Tools on the Mac OS side—no external connections needed.

I haven't booted my Dell tower in many years. I used to run real-time stock market analysis programs every day in Windows XP under Parallels on my Mac, as well as many other kinds of programs. Because I have a couple of large screen on my Mac, it was nicer to just run in a VM. And I have a single computer to back up.

A great thing about using a VM is that you can share locals disks, and copy/paste between the two operating systems.

VMs are also very handy putting together a quick Unix system that's isolated from your main system—you don't need to worry about mucking things up to the point that the Mac OS has problems. And you can take snapshots of the system. For instance, if you're concerned about updating the OS or applications, just take a snapshot beforehand. I did some kind of update last week that locked things up, somehow—restarted the VM with the previous state via the snapshot and tried the update again, everything went fine.
earlevel is online now   Reply With Quote
Old 02-21-2017, 10:59 PM   #5
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 45
Default

If you want to get a legit Windows 10 for cheap, I recently bought an unused Windows 7 product key from eBay for £4, then it's a case of tracking down a retail disk or iso. Upgrading is free if you use/say you use Accessibility features. Microsoft want everyone on their new OS and are doing the opposite of clamping down!
Bobflip is offline   Reply With Quote
Old 02-22-2017, 01:47 AM   #6
stw
Human being with feelings
 
Join Date: Apr 2012
Posts: 199
Default

Quote:
Originally Posted by earlevel View Post
A great thing about using a VM is that you can share locals disks, and copy/paste between the two operating systems.
I just want to subscribe this and everything else said about a VM solution.
It makes crossplatform development very convenient.
However it's not always acting 100% like a native system. Means, you should definitely test your plug on a PC environment. Take a look here:
http://forum.cockos.com/showthread.php?t=186686
stw is offline   Reply With Quote
Old 02-22-2017, 02:05 AM   #7
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 90
Default

Okay.

I spent all night with VM.Downloaded VM Demo,Windows 10 and Virtual Studio Express.

Everything installed well.

When i load my project into Virtual Studio,it started download Virtual Studio C++ Compiler.Now waiting for it.

After all what should i do to compile my projects?

Can you show the way?

I think i just load my projects and build it?
Tunca is offline   Reply With Quote
Old 02-22-2017, 06:44 AM   #8
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 90
Default

I tried to build my first Windows vst plugin.And now i have some errors...

For example i'm trying to build my baxandall eq plugin(BXQ).I'm getting "BXQ.obj : error LNK2001: unresolved external symbol" and "build-win\vst2\x64\bin\BXQ.dll : fatal error LNK1120: 4 unresolved externals" errors.

I tried some fixing methods but no luck.
Tunca is offline   Reply With Quote
Old 02-22-2017, 08:11 AM   #9
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 272
Default

Quote:
Originally Posted by Tunca View Post
I tried to build my first Windows vst plugin.And now i have some errors...

For example i'm trying to build my baxandall eq plugin(BXQ).I'm getting "BXQ.obj : error LNK2001: unresolved external symbol" and "build-win\vst2\x64\bin\BXQ.dll : fatal error LNK1120: 4 unresolved externals" errors.

I tried some fixing methods but no luck.
Typically this is the result of not including a *.c/cpp file in the project. You need to copy each of these files into each project in Visual Studio (e.g., VST, VST3, AAX, etc.).
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 02-22-2017, 09:29 AM   #10
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 90
Default

Quote:
Originally Posted by random_id View Post
Typically this is the result of not including a *.c/cpp file in the project. You need to copy each of these files into each project in Visual Studio (e.g., VST, VST3, AAX, etc.).
Thanks! Now there is no linker error.

But now getting some other errors with math formulas.

For example there are "M_PI" and "MAX".And i'm getting "'M_PI': undeclared identifier" and "'MAX': undeclared identifier".

I guess i have to include math.h? But already included...

EDIT:I added "#define _USE_MATH_DEFINES" before include math.h and now it's ok!

Last edited by Tunca; 02-22-2017 at 09:41 AM.
Tunca is offline   Reply With Quote
Old 02-22-2017, 09:51 AM   #11
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 90
Default

Yes!

Finally i've built my first Windows vst.

Added all resources(images) to .rc.
Added all .cpp and .h files.
Added "#define _USE_MATH_DEFINES".

And now it's working.

After eq plugins i will build compressor plugins.I hope compressor will be easy like eq...
Tunca is offline   Reply With Quote
Old 02-24-2017, 05:58 AM   #12
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 90
Default

Now i have issue with "MAX"

As you can see,meter uses MAX.

peakL = MAX(peakL , 1.4 * fabs(*in1 - input));

But i'm gettin " 'MAX': undeclared identifier " error.

I tried some methods but no luck.

Any idea?
Tunca is offline   Reply With Quote
Old 02-24-2017, 09:55 AM   #13
stw
Human being with feelings
 
Join Date: Apr 2012
Posts: 199
Default

Quote:
Originally Posted by Tunca View Post
Now i have issue with "MAX"

As you can see,meter uses MAX.

peakL = MAX(peakL , 1.4 * fabs(*in1 - input));

But i'm gettin " 'MAX': undeclared identifier " error.

I tried some methods but no luck.

Any idea?
I don't know where MAX comes from. But you could try to use IPMAX. This is defined in Containers.h which should be known by your plug.
stw is offline   Reply With Quote
Old 02-24-2017, 01:15 PM   #14
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 90
Default

Thanks for reply,stw.

Solved it.Included algorithm and used std::max instead of MAX.

#include <algorithm>

std::max()
Tunca is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:23 AM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.