User forums > Using Code::Blocks
Compiling Objective-C - A Short Guide
MortenMacFly:
--- Quote from: uSer on December 30, 2011, 02:42:56 pm ---Thanks, but he said that "he is compiling using TDM-GCC x64 4.5.1 on Windows 7" for Objective-C
--- End quote ---
Yes, so then don't use OSX SDK dependencies, cause even if you are using an Objective/C compiler on Windows, this won't work otherwise. Surely you can create any projects that do not depend on the OSX SDK. That wasn't my point.
uSer:
Oh got your point now, but then what's the alternate of THESE frameworks, because we need them to compile obj C
rro4785:
Hello! First of all, I would like to thank for the guide. ;D
I would like to clarify that my English is very bad, and try to translate my question here. ;D
When trying to compile the example of your setup guide, throws me the following error:
:-\
--- Code: ---F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\main.m||In function 'main':|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\main.m|5|warning: 'TestObject' may not respond to '+alloc' [enabled by default]|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\main.m|5|warning: (Messages without a matching method signature [enabled by default]|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\main.m|5|warning: will be assumed to return 'id' and accept [enabled by default]|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\main.m|5|warning: '...' as arguments.) [enabled by default]|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\main.m|5|warning: no '-init' method found [enabled by default]|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\main.m|6|warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\main.m|6|warning: incompatible implicit declaration of built-in function 'printf' [enabled by default]|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\TestObject.h|1|warning: #import is a deprecated GCC extension [-Wdeprecated]|
d:\herramientas\mingw\bin\..\lib\gcc\mingw32\4.7.2\include\objc\Object.h|50|error: stray '@' in program|
d:\herramientas\mingw\bin\..\lib\gcc\mingw32\4.7.2\include\objc\Object.h|50|error: unknown type name 'interface'|
d:\herramientas\mingw\bin\..\lib\gcc\mingw32\4.7.2\include\objc\Object.h|51|error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token|
d:\herramientas\mingw\bin\..\lib\gcc\mingw32\4.7.2\include\objc\Object.h|54|error: expected identifier or '(' before '-' token|
d:\herramientas\mingw\bin\..\lib\gcc\mingw32\4.7.2\include\objc\Object.h|55|error: expected identifier or '(' before '-' token|
d:\herramientas\mingw\bin\..\lib\gcc\mingw32\4.7.2\include\objc\Object.h|56|error: stray '@' in program|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\TestObject.h|3|error: stray '@' in program|
d:\herramientas\mingw\bin\..\lib\gcc\mingw32\4.7.2\include\objc\Object.h|56|error: unknown type name 'end'|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\TestObject.h|3|error: expected '=', ',', ';', 'asm' or '__attribute__' before 'TestObject'|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\TestObject.h|7|error: expected identifier or '(' before '-' token|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\TestObject.h|8|error: expected identifier or '(' before '-' token|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\TestObject.h|9|error: expected identifier or '(' before '-' token|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\TestObject.h|11|error: stray '@' in program|
F:\Proyectos\Otros\CodeBlocks\Objective-C\Test\Test\TestObject.h|11|error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input|
||=== Build finished: 14 errors, 8 warnings (0 minutes, 3 seconds) ===|
--- End code ---
???
No that's what I do, might help me please.
Thanks in advance. :D
mariusm:
I know it's old but need.
How to add -x objective-c++ on .mm files compilation and -x c++ to .cpp files compilation?
I tried to modify the xml compiler options but I've no success with that.
Miguel Gimenez:
Try in compiler global settings, clicking in the "Advanced options" button.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version