Codeblocks errors

i tried bulidng the latest svn version and 'im getting some errors. i’ve built the same with vc6 and it compiles ok but i can’t see the gui in plugin host (the one on the site)

i’m using gcc4 not 3 from mingw:

Compiling: …\src\DemoJuceFilter.cpp
Compiling: …\wrapper\formats\VST\juce_VstWrapper.cpp
C:\atm\devel\juce\extras\audio plugins\wrapper\formats\VST\juce_VstWrapper.cpp:370:29: warning: multi-character character constant
In file included from C:\atm\devel\juce\extras\audio plugins\wrapper\formats\VST\juce_VstWrapper.cpp:81:
C:\atm\devel\vstsdk2.4/public.sdk/source/vst2.x/audioeffectx.cpp: In member function ‘virtual void AudioEffectX::resume()’:
C:\atm\devel\vstsdk2.4/public.sdk/source/vst2.x/audioeffectx.cpp:307: warning: deprecated conversion from string constant to 'char*'
C:\atm\devel\juce\extras\audio plugins\wrapper\formats\VST\juce_VstWrapper.cpp: In member function ‘void JuceVSTWrapper::resizeHostWindow(int, int)’:
C:\atm\devel\juce\extras\audio plugins\wrapper\formats\VST\juce_VstWrapper.cpp:1261: warning: deprecated conversion from string constant to 'char*'
C:\atm\devel\juce\extras\audio plugins\wrapper\formats\VST\juce_VstWrapper.cpp: At global scope:
C:\atm\devel\juce\extras\audio plugins\wrapper\formats\VST\juce_VstWrapper.cpp:1539: error: ‘::main’ must return 'int’
C:\atm\devel\juce\extras\audio plugins\wrapper\formats\VST\juce_VstWrapper.cpp: In function ‘int main(VstIntPtr ()(AEffect, VstInt32, VstInt32, VstIntPtr, void*, float))’:
C:\atm\devel\juce\extras\audio plugins\wrapper\formats\VST\juce_VstWrapper.cpp:1541: error: invalid conversion from ‘void*’ to 'int’
Process terminated with status 1 (0 minutes, 23 seconds)
2 errors, 3 warnings

this has somethign to do with DLL and main export, i even used the SLN solution file and it imported ok into codeblocks and i get the same results as when creating my own projects, has this been sloved, cause i can’t find anything on the forums.

vstsdk2.4 lastest codeblocks gcc4 latest juce from svn.

This will not answer your question
but I was wondering why people use codeblocks or things like DevC++
when you can have a free version of visual studio.

http://www.microsoft.com/express/

Thanks,

i can’t have anything by microsoft on my laptop@work, i need something that’s opensource, also i can’t install it as i don’t have administrator privileges on my PC and to install this you need those privileges, so although i’d like that very much, i can’t.

By the looks of it, GCC seems to require a proper Main function… returning and int rather than void. If that’s not it I bet it’s something to do with exports or call types.

otristan > Ensuring source compatibility with linux or GCC in general for one. Also the newer VS versions are decidedly sluggish on some hardware. I don’t know why, I have a Athlon x2 4800 and 2 gigs of ram, and VS2005 is still slow enough for me to notice and get pissed off by it.

i tried the standalone wrapper, this is what i got:

-------------- Build: Debug Win32 in JuceAudioPlugin Demo ---------------

Compiling: ..\..\src\DemoJuceFilter.cpp
Compiling: ..\..\..\wrapper\formats\Standalone\juce_AudioFilterStreamer.cpp
Compiling: ..\..\..\wrapper\formats\Standalone\juce_StandaloneFilterWindow.cpp
Compiling: ..\..\src\DemoEditorComponent.cpp
Linking executable: .\Debug\juce_vst.exe
c:/atm/devel/mingw/bin/../lib/gcc/mingw32/4.2.1-sjlj/../../../libmingw32.a(main.o):main.c:(.text+0x104): undefined reference to `_WinMain@16'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 43 seconds)
1 errors, 0 warnings

latest SVN build

edit: VC6

--------------------Configuration: plug3 - Win32 Debug--------------------
Compiling...
juce_StandaloneFilterWindow.cpp
JUCE! Library to link to: jucelib_static_Win32_debug.lib
juce_AudioFilterStreamer.cpp
JUCE! Library to link to: jucelib_static_Win32_debug.lib
DemoJuceFilter.cpp
JUCE! Library to link to: jucelib_static_Win32_debug.lib
DemoEditorComponent.cpp
JUCE! Library to link to: jucelib_static_Win32_debug.lib
Linking...
LIBCMTD.lib(tolower.obj) : error LNK2005: __tolower already defined in LIBCD.lib(tolower.obj)
LIBCMTD.lib(tolower.obj) : error LNK2005: _tolower already defined in LIBCD.lib(tolower.obj)
LINK : warning LNK4098: defaultlib "LIBCMTD" conflicts with use of other libs; use /NODEFAULTLIB:library
LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16
Debug/plug3.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

plug3.exe - 4 error(s), 1 warning(s)

heh i tried VC Express

------ Build started: Project: JuceAudioPlugin Demo, Configuration: Debug Win32 ------
Compiling...
DemoEditorComponent.cpp
JUCE! Library to link to: jucelib_static_Win32_debug.lib
DemoJuceFilter.cpp
JUCE! Library to link to: jucelib_static_Win32_debug.lib
juce_AudioFilterStreamer.cpp
JUCE! Library to link to: jucelib_static_Win32_debug.lib
c:\juce\extras\audio plugins\wrapper\formats\standalone\juce_audiofilterstreamer.cpp(166) : error C2259: 'AudioFilterStreamer' : cannot instantiate abstract class
        due to following members:
        'void juce::AudioIODeviceCallback::audioDeviceAboutToStart(double,int)' : is abstract
        c:\juce\src\juce_appframework\audio\devices\juce_audioiodevice.h(111) : see declaration of 'juce::AudioIODeviceCallback::audioDeviceAboutToStart'
juce_StandaloneFilterWindow.cpp
JUCE! Library to link to: jucelib_static_Win32_debug.lib
Generating Code...
Build log was saved at "file://c:\juce\extras\audio plugins\demo\build\VST_Win32\Debug\BuildLog.htm"
JuceAudioPlugin Demo - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

i have to say i had that error looked at the documentation and this method is pure virtual so the error is obvious really.

will this code be obsoleted and i’m the only one that’s using this :slight_smile: if so please let me know.

maybe i’m getting something wrong, i often mis understand the very basic thing, if so please let me know :slight_smile:

I’m having the same problems as atom with the VST wrapper. It complains about Main not returning an int. I’m using GCC and I wouldn’t change it for the world. Spending time working on this problem and providing a solution for other juce users who value free open source software is well worth it in my opinion.

If you search this forum “Cross Compile on Linux for Win32” you will find some info which might help. I’m still reading through it, if I find a fix I’ll post the steps involved.

The following will help you get past the cannot convert from int to void error. It just involved changing the main to a main_plugin

extern “C” __declspec (dllexport) void* main_plugin (audioMasterCallback audioMaster)
{
return (void*) pluginEntryPoint (audioMaster);
}

Now I get much further before the compiler quits and tells me about a hundred times that:

D:\MyDocuments\SourceCode\juce\juce_amalgamated.cpp|179998|error: `boolean’ does not name a type|

I know this thread is old but it deals directly with the issues I’m having now. If no one takes the bait and I can’t figure it out I’ll start a new thread.