COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 04-11-2017, 12:28 PM   #1
s9dd
Human being with feelings
 
s9dd's Avatar
 
Join Date: Apr 2017
Location: UK
Posts: 3
Default WDL-OL - How to add common .h and .cpp

Hi Guys

I am trying to understand WDL-OL, specifically how to add some .cpp and .h files at the root level.

I created a new folder for these files in the WDL folder, and added the .cpp and .h files.

I created a new User Macro, $(NEW_INCLUDE) and added the folder reference using "..\..\WDL\new_folder" format.

Next I've added it to the C/C++\All Options"Additional Include Directories" in Project Manager/PropertySheet for the App, Vst and VSt3 projects.

In code, the compiler can see the files and Intellisense works just fine.

But I am getting unresolved external symbol errors LNK2019 (VS2013), when it tries to create my plugin.lib and exp.

I -think- instinctively I need to add something else to solve the Linker problem in the property sheet - do I add something to the Additional Library Directories in Linker\All Options?

Presently that reads:
$(WDL_PATH)\Iplug\build-win... etc.. as it comes supplied.

The "everything on top of everything else" multi-project structure is new to me, and it's probably this I am finding more confusing than it probably is, once more familiar with the framework.

A little help from the experienced would be appreciated.

Last edited by s9dd; 04-11-2017 at 12:32 PM. Reason: \
s9dd is offline   Reply With Quote
Old 04-11-2017, 03:56 PM   #2
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

In Visual Studio, this is typically caused when the .cpp file is not in the project folder. You need to have the .cpp file added to each project (pluginname-vst2, pluginname-vst3, etc.). You can copy/paste it there, or drag the file into each project from the file explorer. That should fix the linker errors.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 04-11-2017, 04:25 PM   #3
s9dd
Human being with feelings
 
s9dd's Avatar
 
Join Date: Apr 2017
Location: UK
Posts: 3
Default

Thanks for the reply.

Sure, if you add a new .cpp or .h file (create new item), that makes sense.
If you are sharing a folder in WDL - like rtaudiomidi is - would that mean you have to duplicate the .cpp file into the project as well? I don't see any evidence in the examples that's how it's achieved.

Instead, I added a new WDL folder - WDL\CoolExtras say - with snazzy.h and snazzy.cpp in it, I would hope it would be pathed to VST VST3 and APP simply by referencing $(COOLEXTRAS_INCLUDE) with "..\..\WDL\CoolExtras", somewhere in the .props file.

Are you saying I have to duplicate the contents into each folder that as well? That doesn't seem quite right.

I found by experimentation it can lead to duplicate definitions too - as app, seems to wrap the main plugin .cpp and .h files.

This has to be simple (when you know how!!)
s9dd is offline   Reply With Quote
Old 04-12-2017, 11:26 AM   #4
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

OK, now I understand your question. Too bad I don't know the answer.
I have all of my DSP-ish files in another folder and add all of the .cpp files to each project, depending on what I need.

I will try playing around and seeing if I can find out the answer. You are right, there has to be an easy way.
__________________
Website: LVC-Audio
random_id 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 02:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.