Quick Sign In:  

Forum: VirtualDJ Plugins

Topic: To write plugin with Dev-C++ ? - Page: 1

Dieser Teil des Themas ist veraltet und kann veraltete oder falsche Informationen enthalten

Hello,
Can you write plugin with DEV-C++ compiler ?
The My_plugin.cpp example does not Work for me.
Here the log of compilation :

Compilateur: Default compiler
Building Makefile: "C:\Dev-Cpp\Examples\plugin_vdj\Makefile.win"
Exécution de make...
make.exe -f "C:\Dev-Cpp\Examples\plugin_vdj\Makefile.win" all
g++.exe -D__DEBUG__ -c my_plugin1.cpp -o my_plugin1.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include" I"C:/Dev-Cpp/include/c++/3.4.2/backward" -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32" -I"C:/Dev-Cpp/include/c++/3.4.2" -I"C:/Dev-Cpp/include" -DBUILDING_DLL=1 -pg -g3

In file included from my_plugin1.cpp:3:
VdjDsp2.h:26: error: use of enum `EProcessingType' without previous declaration
VdjDsp2.h:27: error: use of enum `EInterfaceType' without previous declaration
VdjDsp2.h:28: error: use of enum `ENotify' without previous declaration

VdjDsp2.h:52: error: `OnNotify' declared as a `virtual' field

VdjDsp2.h:52: warning: `__stdcall__' attribute only applies to function types
VdjDsp2.h:52: error: expected `;' before '(' token
VdjDsp2.h:55: error: expected `;' before "int"

In file included from my_plugin1.cpp:3:
VdjDsp2.h:211:5: warning: no newline at end of file

make.exe: *** [my_plugin1.o] Error 1

Exécution terminée

Can you help me ?
How to configure DEV-C++ ?
Thank you.
 

geposted Wed 17 Aug 05 @ 9:27 pm
djcelPRO InfinityModeratorMember since 2004
I'm looking for a solution with dev-c++

Otherwise, there is no problem with dev-c++ and video plugin (effect + transition) whereas the idea of the SDK is the "same", i mean same COM , same idea of class so it should work with normal plugin too

Maybe Dev-C++ doesn't like "enum" ...???
 

geposted Thu 18 Aug 05 @ 2:53 pm
ChelHome userMember since 2005
what ?
 

geposted Sun 28 Aug 05 @ 10:10 pm
djcelPRO InfinityModeratorMember since 2004
Yes after testing, Dev-C++ seems not to like the keyword "enum" in the SDK (vdjdsp2.h) that's why it writes these errors. The error with the function OnNotify() is due to the param "enum ENotify"
 

geposted Mon 29 Aug 05 @ 8:50 am
Did you find a solution to bypass this dev c++ behavior ?
 

geposted Tue 30 Aug 05 @ 1:59 pm
djcelPRO InfinityModeratorMember since 2004
Unfortunately no
The fields of each enum equals to integer so i'm going to try by changing enum to int
If you have an idea, i'm open
 

geposted Wed 31 Aug 05 @ 8:27 am
looks like it has something to do with casting. Will test...
 

geposted Fri 02 Sep 05 @ 3:29 pm
kaleoPRO InfinityMember since 2003
If you delete the enum in the .h and replace all call by the corresponding number (the first is 0 as writed).

Shouldn't it work?
 

geposted Sat 03 Sep 05 @ 9:43 am
djcelPRO InfinityModeratorMember since 2004
I tried to use the integer but without success

So to sum up: to disapear the errors of the compilator, delete in the .h:

* in the declaration of structure,class, enum:
//------------------------
enum EProcessingType;
enum EInterfaceType;
enum ENotify;
//----------------------

* in the class:
//------------------
virtual HRESULT __stdcall OnNotify(ENotify notify,int param1,int param2) {return 0;}
//--------------------

But unfortunately the plugin doesn't work in VDJ with that (VDJ writes "(empty)" )!!! I really think the main problem is in this declaration of enum as without this declaration dev-c++ recognizes the difference of data type The dll is well built as it works for video plugin
 

geposted Sat 03 Sep 05 @ 11:17 am
kaleoPRO InfinityMember since 2003
did you try to replace

virtual HRESULT __stdcall OnNotify(ENotify notify,int param1,int param2) {return 0;}

by

virtual HRESULT __stdcall OnNotify(int notify,int param1,int param2) {return 0;}

?
 

geposted Sat 03 Sep 05 @ 6:23 pm
djcelPRO InfinityModeratorMember since 2004
Only by changing what you say Kaleo (i mean i let the enum declaration), i get:

In file included from Simple_Mix.cpp:3:
vdjdsp2.h:27: error: use of enum `EProcessingType' without previous declaration
vdjdsp2.h:28: error: use of enum `EInterfaceType' without previous declaration
vdjdsp2.h:29: error: use of enum `ENotify' without previous declaration
 

geposted Sun 04 Sep 05 @ 12:22 pm
djcelPRO InfinityModeratorMember since 2004
I think dev-c++ doesn't like the declaration of enum without including definition at the same time that's why it writes that.
 

geposted Sun 04 Sep 05 @ 12:36 pm
kaleoPRO InfinityMember since 2003
LOL, of course, you need to delete all ENUM declaration and try to replace enum parameters by int as I suggest previously.

But I don't know if this will work as I don't have Dev-C++
 

geposted Mon 05 Sep 05 @ 8:31 am
djcelPRO InfinityModeratorMember since 2004
Even with the int everywhere (i had tried before), it doesn't work: the provided interface is not created (even the name of the plugin doesn't appear in the slot :-( as the struct doesn't work too). You should personnaly try i think

I tried too:
/////////////////////////////////
#define PROCESSING_NONE 0
#define INTERFACE_PROVIDED 0
typedef int EProcessingType;
typedef int EInterfaceType;
typedef int ENotify;
////////////////////////////////
 

geposted Mon 05 Sep 05 @ 8:54 am
HI guys, finally i worked till late night and I managed to
compile polarity with dev c++.

I tried changing enum to int, replacing many things and finally the solution was simple.

You just have to move the enums BEFORE using them in the .h file.
----------------------------------------------------------------


I uploaded the whole project to the SOURCES as a zip file.

The plugin is stripped off buttons and images, so only thing it makes is iverting the right channel's polarity/phase.

I was worried that i have to buy Microsoft's stuff when my VC 2005 beta expires :-)

I hope there will be less problems with devc++ in the future.


As there are no changes (except changing order of lines) in the .h file it could be nice if the moderators could update the .h file provided in the developer section.

(or feel free to provide there this example project directly)

or lower the minimal requested level
 

geposted Wed 07 Sep 05 @ 10:25 am
kaleoPRO InfinityMember since 2003
Strange behavior, the class should not by compiled so this error should not be...

Neverstheless, no problem to swap lines.

Thanks lopez453
 

geposted Thu 08 Sep 05 @ 9:40 am
So now, more people can try to create plugins.

Whooaa, looking forward for a dozen new :-).

Come on dudes, don't hesitate. Give making plugins a try....
 

geposted Thu 08 Sep 05 @ 9:45 am
kaleoPRO InfinityMember since 2003
Yes!! :)
 

geposted Thu 08 Sep 05 @ 10:53 am
I tried to use the SDK files to modify the existing cut transition to cut sooner than the mid point for scratching. I used the Dev-C-++ program and tried to follow the limited steps given on the forum. I go to compile and gives this error. (the name I named the project was scratch-cut)

[Build Error] No rule to make target '"my', needed by 'scratch-cut.dll' Stop

What am I doing wrong?
 

geposted Thu 29 Jun 06 @ 2:11 pm
djcelPRO InfinityModeratorMember since 2004
First don't write "scratch-cut.dll" but "scratch_cut.dll" then i don't have enough information to help you
 

geposted Thu 29 Jun 06 @ 9:28 pm
77%