# First project

**URL:** <https://forum.juce.com/t/first-project/8834>\
**Category:** General JUCE discussion\
**Created:** [June 14, 2012, 3:31pm UTC](https://forum.juce.com/t/first-project/8834 "2012-06-14T15:31:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ubuuntu](https://avatars.discourse-cdn.com/v4/letter/u/dfb087/32.png) [@ubuuntu](https://forum.juce.com/u/ubuuntu)\
**Post date:** [June 14, 2012, 3:31pm UTC](https://forum.juce.com/t/first-project/8834/1 "2012-06-14T15:31:25Z")

</div>

I’ve run Introjucer, loaded the project in MSVC++ 2010 and the build fails with:

[quote]1\> Main.cpp  
1\>c:\projects\juce\projectx\source\main.cpp(16): error C2504: ‘JUCEApplication’ : base class undefined  
1\>c:\projects\juce\projectx\source\main.cpp(28): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int  
1\>c:\projects\juce\projectx\source\main.cpp(28): error C2143: syntax error : missing ‘,’ before '&'  
1\>c:\projects\juce\projectx\source\main.cpp(47): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int  
1\>c:\projects\juce\projectx\source\main.cpp(47): error C2146: syntax error : missing ‘;’ before identifier 'getApplicationName’  
1\>c:\projects\juce\projectx\source\main.cpp(48): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int  
1\>c:\projects\juce\projectx\source\main.cpp(50): warning C4183: ‘getApplicationName’: missing return type; assumed to be a member function returning 'int’  
1\>c:\projects\juce\projectx\source\main.cpp(52): error C2327: ‘projectxApplication::String’ : is not a type name, static, or enumerator  
1\>c:\projects\juce\projectx\source\main.cpp(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int  
1\>c:\projects\juce\projectx\source\main.cpp(52): error C2146: syntax error : missing ‘;’ before identifier 'getApplicationVersion’  
1\>c:\projects\juce\projectx\source\main.cpp(52): error C2086: ‘const int projectxApplication::String’ : redefinition  
1\> c:\projects\juce\projectx\source\main.cpp(47) : see declaration of 'projectxApplication::String’  
1\>c:\projects\juce\projectx\source\main.cpp(53): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int  
1\>c:\projects\juce\projectx\source\main.cpp(55): warning C4183: ‘getApplicationVersion’: missing return type; assumed to be a member function returning 'int’  
1\>c:\projects\juce\projectx\source\main.cpp(62): error C2327: ‘projectxApplication::String’ : is not a type name, static, or enumerator  
1\>c:\projects\juce\projectx\source\main.cpp(62): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int  
1\>c:\projects\juce\projectx\source\main.cpp(62): error C2143: syntax error : missing ‘,’ before '&'  
1\>c:\projects\juce\projectx\source\main.cpp(69): warning C4512: ‘projectxApplication’ : assignment operator could not be generated  
1\> c:\projects\juce\projectx\source\main.cpp(15) : see declaration of 'projectxApplication’  
1\>c:\projects\juce\projectx\source\main.cpp(19): error C2758: ‘projectxApplication::String’ : must be initialized in constructor base/member initializer list  
1\> c:\projects\juce\projectx\source\main.cpp(47) : see declaration of 'projectxApplication::String’  
1\>c:\projects\juce\projectx\source\main.cpp(43): error C3861: ‘quit’: identifier not found  
1\>c:\projects\juce\projectx\source\main.cpp(49): error C2440: ‘return’ : cannot convert from ‘const char [19]’ to 'int’  
1\> There is no context in which this conversion is possible  
1\>c:\projects\juce\projectx\source\main.cpp(54): error C2440: ‘return’ : cannot convert from 'const char \*const ’ to 'int’  
1\> There is no context in which this conversion is possible  
1\>c:\projects\juce\projectx\source\main.cpp(73): error C2440: ‘return’ : cannot convert from ‘projectxApplication \*’ to 'juce::JUCEApplicationBase \*'  
1\> Types pointed to are unrelated; conversion requires reinterpret\_cast, C-style cast or function-style cast[/quote]

The project includes lots of Juce Modules and library code, but it seems paths are off in the sln created by Introjucer.

Introjucer 3.0.0, Juce 2.0.

Thanks

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [June 14, 2012, 3:33pm UTC](https://forum.juce.com/t/first-project/8834/2 "2012-06-14T15:33:33Z")

</div>

Hard to tell without seeing the code, but you don’t seem to be including any juce headers…?

---

<div class="post-metadata">

**Author:** ![ubuuntu](https://avatars.discourse-cdn.com/v4/letter/u/dfb087/32.png) [@ubuuntu](https://forum.juce.com/u/ubuuntu)\
**Post date:** [June 14, 2012, 3:36pm UTC](https://forum.juce.com/t/first-project/8834/3 "2012-06-14T15:36:41Z")

</div>

Hi jules, thanks for replying!

> [@jules](#):
>
> Hard to tell without seeing the code, but you don’t seem to be including any juce headers..?

I didn’t write any code, this is the vanilla main.cpp generated by Introjucer.

# [quote]/\*

```
This file was auto-generated by the Introjucer!

It contains the basic startup code for a Juce application.

```

==============================================================================  
\*/

#include “../JuceLibraryCode/JuceHeader.h”

//==============================================================================  
class projectxApplication : public JUCEApplication  
{  
public:  
//==============================================================================  
projectxApplication()  
{  
}

```
~projectxApplication()
{
}

//==============================================================================
void initialise (const String& commandLine)
{
    // Do your application's initialisation code here..
    
}

void shutdown()
{
    // Do your application's shutdown code here..
    
}

//==============================================================================
void systemRequestedQuit()
{
    quit();
}

//==============================================================================
const String getApplicationName()
{
    return "ProjectX";
}

const String getApplicationVersion()
{
    return ProjectInfo::versionString;
}

bool moreThanOneInstanceAllowed()
{
    return true;
}

void anotherInstanceStarted (const String& commandLine)
{
    
}

```

private:

};

//==============================================================================  
// This macro generates the main() routine that starts the app.  
START\_JUCE\_APPLICATION(projectxApplication)  
[/quote]

---

<div class="post-metadata">

**Author:** ![ubuuntu](https://avatars.discourse-cdn.com/v4/letter/u/dfb087/32.png) [@ubuuntu](https://forum.juce.com/u/ubuuntu)\
**Post date:** [June 14, 2012, 3:51pm UTC](https://forum.juce.com/t/first-project/8834/4 "2012-06-14T15:51:33Z")

</div>

Ok, the problem occurs if I include DONT\_SET\_USING\_JUCE\_NAMESPACE in Introjucer “Preprocessor definitions” textbox. Without this define, the project compiles.

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [June 14, 2012, 3:53pm UTC](https://forum.juce.com/t/first-project/8834/5 "2012-06-14T15:53:00Z")

</div>

Well yeah… If you’re going to set that flag, then you’d need to edit the code to explicitly use the namespace everywhere.
