Go Back   Cockos Confederated Forums > REAPER Forums > REAPER Developer Forum

Reply
 
Thread Tools Display Modes
Old 11-21-2011, 04:06 PM   #1
AudiOishi
Human being with feelings
 
Join Date: Dec 2009
Posts: 40
Default build sws extensions - redefinition errors, Other question.

I'm looking for an introduction to using the Reaper SDK, and as recommended, I'm looking at the SWS extensions as an example.

It looks like the sws extensions want the WDL source folder to live one level up from the sws-extensions folder, so I downloaded it and placed it appropriately.

When I try to build the sws extensions in VS 2008 Express I get the following errors:


Code:
1>------ Build started: Project: SWS_Extension, Configuration: Test Win32 ------
1>Checking for REAPER_DIR environment variable...
1>Compiling...
1>stdafx.cpp
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(920) : error C2365: 'LICE_Arc' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(469) : see declaration of 'LICE_Arc'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(922) : error C2365: 'LICE_Blit' : redefinition; previous definition was 'function'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(924) : error C2365: 'LICE_Blur' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(367) : see declaration of 'LICE_Blur'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(926) : error C2365: 'LICE_BorderedRect' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(498) : see declaration of 'LICE_BorderedRect'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(928) : error C2365: 'LICE_Circle' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(471) : see declaration of 'LICE_Circle'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(930) : error C2365: 'LICE_Clear' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(411) : see declaration of 'LICE_Clear'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(932) : error C2365: 'LICE_ClearRect' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(412) : see declaration of 'LICE_ClearRect'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(935) : error C2365: 'LICE_ClipLine' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(466) : see declaration of 'LICE_ClipLine'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(937) : error C2365: 'LICE_Copy' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(360) : see declaration of 'LICE_Copy'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(944) : error C2365: 'LICE_DrawChar' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(446) : see declaration of 'LICE_DrawChar'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(946) : error C2365: 'LICE_DrawGlyph' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(477) : see declaration of 'LICE_DrawGlyph'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(948) : error C2365: 'LICE_DrawRect' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(497) : see declaration of 'LICE_DrawRect'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(950) : error C2365: 'LICE_DrawText' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(448) : see declaration of 'LICE_DrawText'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(952) : error C2365: 'LICE_FillCircle' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(472) : see declaration of 'LICE_FillCircle'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(954) : error C2365: 'LICE_FillConvexPolygon' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(460) : see declaration of 'LICE_FillConvexPolygon'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(956) : error C2365: 'LICE_FillRect' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(408) : see declaration of 'LICE_FillRect'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(958) : error C2365: 'LICE_FillTrapezoid' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(459) : see declaration of 'LICE_FillTrapezoid'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(960) : error C2365: 'LICE_FillTriangle' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(462) : see declaration of 'LICE_FillTriangle'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(962) : error C2365: 'LICE_GetPixel' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(356) : see declaration of 'LICE_GetPixel'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(964) : error C2365: 'LICE_GradRect' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(402) : see declaration of 'LICE_GradRect'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(966) : error C2365: 'LICE_Line' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(454) : see declaration of 'LICE_Line'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(970) : error C2365: 'LICE_LoadPNG' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(320) : see declaration of 'LICE_LoadPNG'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(972) : error C2365: 'LICE_LoadPNGFromResource' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(322) : see declaration of 'LICE_LoadPNGFromResource'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(974) : error C2365: 'LICE_MeasureText' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(450) : see declaration of 'LICE_MeasureText'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(976) : error C2365: 'LICE_MultiplyAddRect' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(413) : see declaration of 'LICE_MultiplyAddRect'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(978) : error C2365: 'LICE_PutPixel' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(355) : see declaration of 'LICE_PutPixel'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(981) : error C2365: 'LICE_RotatedBlit' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(377) : see declaration of 'LICE_RotatedBlit'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(983) : error C2365: 'LICE_RoundRect' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(473) : see declaration of 'LICE_RoundRect'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(985) : error C2365: 'LICE_ScaledBlit' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(370) : see declaration of 'LICE_ScaledBlit'
1>C:\Program Files\Reaper4\reaper_plugin_functions.h(987) : error C2365: 'LICE_SimpleFill' : redefinition; previous definition was 'function'
1>        c:\projects\reaperdev\wdl\sws-extension\reaper\../../WDL/lice/lice.h(421) : see declaration of 'LICE_SimpleFill'
1>Build log was saved at "file://c:\Projects\ReaperDev\WDL\sws-extension\Test\BuildLog.htm"
1>SWS_Extension - 30 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Any ideas what could be causing this?

I also noticed that as source file for the SWS extensions #includes afxres.h. I believe afxres is only available as part of some MSDN SDK that is not available in visual studio express. Can anyone confirm this? Does that mean that there's no way to build the sws extensions without Visual Studio Professional?
AudiOishi is offline   Reply With Quote
Old 11-21-2011, 08:44 PM   #2
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 4,139
Default

Quote:
Originally Posted by AudiOishi View Post
I'm looking for an introduction to using the Reaper SDK, and as recommended, I'm looking at the SWS extensions as an example.
That wasn't a very good advice given to you. The SWS codebase is large and complicated. I can't even myself deal with it too well anymore even though I originally did large portions of it.

I'd recommend you rather start with the "random ninjam loop" example that comes with the Reaper extensions SDK, and start adding things to that(*). Of course if your goal is to work on fixing/extending the SWS extension, then it's a different matter and the best starting point probably is trying to get the SWS plugin compiled...

(*)Though I think also that relies on afxres.h, which is tricky to deal with the Express editions of Visual Studio.
__________________
For info on Reaper extension plugins (including Xenakios' previous extensions) :
http://www.standingwaterstudios.com/reaper
http://code.google.com/p/sws-extension/
--
Xenakios blog :
http://xenakios.wordpress.com/
Xenakios is offline   Reply With Quote
Old 11-22-2011, 11:16 AM   #3
AudiOishi
Human being with feelings
 
Join Date: Dec 2009
Posts: 40
Default

Quote:
(*)Though I think also that relies on afxres.h, which is tricky to deal with the Express editions of Visual Studio.
Sure enough!

Thanks for the input though.

I found that I am able to compile "example_m3u" in VS Express, so that's a good start.
AudiOishi is offline   Reply With Quote
Old 01-03-2013, 11:44 AM   #4
rekliner
Human being with feelings
 
Join Date: Jan 2013
Location: Nashville
Posts: 4
Default

I know it's more than a year late but I just went through your same issue. The redefinitions happen when you generate the reaper_plugins_functions.h while you already have reaper_sws.dll installed. You must first remove that DLL from the reaper plugins directory...THEN generate the API header. Otherwise it's putting references in reaper_plugins_functions.h to the same functions you are trying to build in the SWS project.
rekliner is offline   Reply With Quote
Old 01-09-2013, 01:12 AM   #5
Jeffos
Mortal
 
Jeffos's Avatar
 
Join Date: Dec 2008
Location: France
Posts: 1,721
Default

Guys, make sure you have read the Building wiki: http://code.google.com/p/sws-extension/wiki/Building
Everything is detailed there.

On a sidenote, I disagree with Xenakios, I find the SWS dead easy to setup/compil.
[EDIT].. but I agree this is not the best code to get started. Personnaly, I also started with the "random ninjam loop" example which is provided with the REAPER SDK[/EDIT]

Also, what rekliner says is totally right, tbut he OP's issue had nothing to do that (nor with afxres.h/winres.h issues) but with some WDL/LICE funcs redefinitions that we have fixed a long time ago.
(BTW, I remember this thread and why I did not reply at the time: we can read "[...]\wdl\sws-extension\reaper[...]" in the compil errors, which is a very weird dev directory structure..

Probable pitfalls when you have not read the wiki:
  • On Win/OSX: as rekliner said, make sure you have uninstalled the sws extension before generating the API (i.e. before you run the action "[developer] Write C++ API functions header")
  • On OSX: you have to SVN patch Cockos' WDL as explained, the extension will compile fine but will be totally buggy otherwise
  • On Win: make sure to define REAPER_DIR (and/or REAPER64_DIR) env var
  • On Win: if you checkouted the codebase recently but before r946, I recommend you to update yourcodebase
    (we've just gone through some turbulences recently, commit r946 made some stuff optionnal rather than breaking builds..)
  • On Win: if you have any compil issue with "winres.h", get in touch (PM)

BTW, we need more contributors in the open source, you're welcome!

Last edited by Jeffos; 01-09-2013 at 03:12 AM.
Jeffos is offline   Reply With Quote
Reply

Tags
reaper sdk, sdk, visual studio

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 08:56 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.