Juce xCode project doesn’t work in Windows Visual Studio


#1

Hello,
I created Juce project in home on my Mac, and it works nice. I pushed it to Github and tried to open it in work on Windows is Visual Basic. But I get almost thousent errors. What I can say more is that I don’t have Projucer in my Windows computer. But I pushed to Github all juce modules. Please coul anyone help me? Give some hint or advice?


#2

Well, it obviously won’t work with Visual Basic. Maybe you mean Visual Studio? Did you install that with the required C++ options? And of course a Xcode project will not work with Windows/Visual Studio. You need to export a Visual Studio solution from Projucer.


#3

Yes I know xCode project doesn’t run in Visual Studio. Before I pushed all project to Github I create Visual Studio project by Projucer on my Mac, and here in job I try to run that project.

And of course when I wrote Visual Basic I meant Visual Studio 2017.

The only thing I am not sure if I installed Visual Studio with all required C++ options? Of course during installation I choose “Desktop Development With C++”. But there are also hundreds of other options, and I am not sure what to choose. I see in the errors, there are even problems with running some standard libraries. For example error like that:

Error (active) E1696 cannot open source file “stdlib.h” PajFFTproject_App c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include\atomic 17

or:
Error (active) E1696 cannot open source file “float.h” PajFFTproject_App c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include\cfloat 7


#4

but there are also a lot of errors with things like:

Error (active) E0757 variable “size_t” is not a type name PajFFTproject_App c:\Users\WOPIL\Downloads\FFT_project\fftProjectTesting-master\fftProjectTesting-master\JuceLibraryCode\modules\juce_opengl\opengl\juce_OpenGLContext.h 311


#5

or problems with some functions, like:

Error (active) E0282 the global scope has no “cosf” PajFFTproject_App c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\include\cmath 638


#6

Until you’ve fixed the first error, there’s very little point in wasting time looking at the others.


#7

So don’t you know how to fix it?
firs error on my list is:

cannot open source file “stddef.h”


#8

Like Xenakios pointed out, you need the proper tools installed on your windows machine.

  • You are writing C++ code, so you need VisualStudio with the C++ components installed
  • You need the project files for VisualStudio, you can generate them on you mac as well, but it is more convenient to have Projucer installed on your windows machine as well

When you have done that, most of your errors will be gone, and we can take care of the others.
Without that you are stuck.
N.B. There is a so called “Community Edition” of VisualStudio, that is free, so no reason not to install it…

Good luck


#9

These are the installation options that work for me in Visual Studio 2017 to build JUCE using C++ code :

Note that in some cases code that compiles with Clang or GCC may not compile with Visual Studio or the other way round. (Often the reason is trying to use header files that don’t exist on the other compiler/development kit installations.)


#10

Hey Daniel great thanks for your attention :slight_smile: But I described that I have already Visual Studio project generated by Projucer on my Mac.
And during installation of Visual Studio I select “Desktop Development With C++”. But I unselect everything else, even “Universal Windows Platform Development”. Maybe that’s the problem. But I thought “Desktop Development With C++” is enough for C++ projects?


#11

You will need to install the various SDKs etc too to be able to compile code that uses JUCE. Look in the screenshot I posted above. (The installation options I am using may have some unnecessary components, but those options are what are working for me at the moment.)


#12

OK, I am installing now the some components as on your screenshot. Will see if it help. By the way, thanks


#13

HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA HA .

It works :slight_smile: !!!
Great thanks Xenakios. Your sceenshot helped. Two libraries I didn’t have.