Old 03-02-2021, 08:59 AM   #1
kalidea
Human being with feelings
 
Join Date: Feb 2021
Posts: 4
Default csurf and WDL

Hello!
I've been trying to get the reaper_csurf example in the Reaper SDK to work on Linux before I modify it for my own project. I'm failing miserably.

My Steps:
1. Build via: c++ -fPIC -O2 -IWDL/WDL -shared csurf_main.cpp -o reaper_org.so
- Received errors about res.rc_mac_dlg and res.rc_mac_menu being missing.
2. Commented out the lines including res.rc_mac_dlg and res.rc_mac_menu.
3. Built and copied to ~/.config/REAPER/UserPlugins
4. Launched Reaper from the command line
- received the error message: swell: dlopen() failed: /home/kali/.config/REAPER/UserPlugins/reaper_org.so: undefined symbol: SWELL_curmodule_dialogresource_head


What have I done or not done?

Last edited by kalidea; 03-02-2021 at 09:06 AM. Reason: The tab key is evil
kalidea is offline   Reply With Quote
Old 03-02-2021, 06:04 PM   #2
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Quote:
Originally Posted by kalidea View Post
2. Commented out the lines including res.rc_mac_dlg and res.rc_mac_menu.
Those two files must be generated from res.rc using SWELL's mac_resgen.php tool.

Code:
WDL/WDL/swell/mac_resgen.php res.rc
cfillion is offline   Reply With Quote
Old 03-03-2021, 08:51 AM   #3
kalidea
Human being with feelings
 
Join Date: Feb 2021
Posts: 4
Default

Quote:
Originally Posted by cfillion View Post
Those two files must be generated from res.rc using SWELL's mac_resgen.php tool.

Code:
WDL/WDL/swell/mac_resgen.php res.rc
Done and rebuilt. Still receiving swell: dlopen() failed: /home/kali/.config/REAPER/UserPlugins/reaper_org.so: undefined symbol: SWELL_curmodule_dialogresource_head when Reaper tries to load it
kalidea is offline   Reply With Quote
Old 03-03-2021, 03:50 PM   #4
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Define SWELL_PROVIDED_BY_APP and build WDL/WDL/swell/swell-modstub-generic.cpp.
cfillion is offline   Reply With Quote
Old 03-05-2021, 07:45 AM   #5
kalidea
Human being with feelings
 
Join Date: Feb 2021
Posts: 4
Default

Quote:
Originally Posted by cfillion View Post
Define SWELL_PROVIDED_BY_APP and build WDL/WDL/swell/swell-modstub-generic.cpp.
OK. I added #define SWELL_PROVIDED_BY_APP to csurf_main.cpp and bullt via:
c++ -fPIC -O2 -IWDL/WDL -shared reaper_csurf/csurf_main.cpp ../WDL/swell/swell-modstub-generic.cpp -o reaper_org.so

After copying and launching I'm now seeing:
swell: dlopen() failed: /home/kali/.config/REAPER/UserPlugins/reaper_org.so: undefined symbol: SWELL_DialogBox
kalidea is offline   Reply With Quote
Old 03-05-2021, 07:57 AM   #6
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

SWELL_PROVIDED_BY_APP must be defined when building swell-modstub-generic.cpp too, so it's best to define it in the compiler command line.

Code:
c++ -fPIC -O2 -IWDL/WDL -DSWELL_PROVIDED_BY_APP -shared reaper_csurf/csurf_main.cpp ../WDL/swell/swell-modstub-generic.cpp -o reaper_org.so
cfillion is offline   Reply With Quote
Old 03-06-2021, 08:40 AM   #7
kalidea
Human being with feelings
 
Join Date: Feb 2021
Posts: 4
Default

Quote:
Originally Posted by cfillion View Post
SWELL_PROVIDED_BY_APP must be defined when building swell-modstub-generic.cpp too, so it's best to define it in the compiler command line.

Code:
c++ -fPIC -O2 -IWDL/WDL -DSWELL_PROVIDED_BY_APP -shared reaper_csurf/csurf_main.cpp ../WDL/swell/swell-modstub-generic.cpp -o reaper_org.so
Worked like a charm
Thank you so much for all your help!
kalidea 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 06:40 AM.


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