ImageButton issues on Windows with jucer project coming from Mac

Hi,

I’m fairly new to JUCE and C++ but I’m starting to get the hang of it and just finished creating my first real GUI. I did this on a Mac and everything is working perfectly.

Now i tried bringing the jucer project over to windows and wanted to open and compile the project with Visual Studio 2017. But it throws some errors related to the ImageButton class, which I don’t understand and hope you can help me with (I’ve been googling and searching the forum but maybe I’m looking for the wrong things)…

The first error that is thrown is appearing in the JUCE continuous build output, which appears in include_juce_gui_basics.cpp and says redefinition of 'ImageButton'.

When I click on the error it opens up juce_ImageButton.h and the class definition
class JUCE_API ImageButton : public Button {
comes up red… But this is where it should be defined shouldn’t it?

Visual studio then can’t find the Type ImageButton and my whole thing doesn’t work. Is this a known issue or am I simply missing something?

Do you need any more information to help me with this?

Thanks for your help in advance

//also, since the error occurs I did a OS clean install on my windows machine, and re-installed JUCE, VS2015 and VS2017

Hi,

Could you rename your Projucer .jucer to .txt and upload it here? Maybe we can see something being wrongly defined.

Sure. Here it is.
MidiMate.txt (16.7 KB)

Although I’m happy to report that as of this morning the above described error doesn’t occur anymore, even though I didn’t change anything. Literally didn’t touch it… But now Juce is showing me the error 'corecrt.h' file not found for every single .cpp file in my project.

When I open the project in visual studio now it compiles without any errors… but it doesn’t load my program window and I am even more confused… the build runs through, it says 1 succeeded and nothing happens… even though it shows up in the task manager and when i run it in the VS debugger visual studio also shows me activity…

In the output i can see it’s loading all the files, but then the last line isThe thread 0x11d0 has exited with code 0 (0x0). Could that be the problem? But how do I debug that when it’s not throwing any errors at all?

In your .jucer file you have windowsTargetPlatformVersion="10.0.16299.0". Make sure that you have this Windows SDK installed under C:\Program Files (x86)\Windows Kits\10\Include. If it’s not installed, then you can specify one of the installed SDKs or install it using Visual Studio Installer.

Yeah, i have that installed