ld: library not found after switching to VTK6 - compilation

I changed to VTK-6 and now I can not compile anymore due to library not found..With vtk-5 it works perfectly fine.
c++ -o loch -Wall lxTR.o lxOGLFT.o lxSetup.o lxRender.o lxWX.o lxImgIO.o lxLRUD.o lxFile.o lxSTree.o lxData.o lxMath.o lxSView.o lxSScene.o lxGUI.o lxGLC.o lxOptDlg.o lxAboutDlg.o img.o -lz -L/usr/X11R6/lib -lwx_osx_cocoau_gl-2.9 -L/usr/local/Cellar/wxmac/2.9.5.0/lib -framework IOKit -framework Carbon -framework Cocoa -framework AudioToolbox -framework System -framework OpenGL -framework QuickTime -lwx_osx_cocoau-2.9 -L/usr/local/lib -lvtkHybrid -lvtkImaging -lvtkIO -lvtkGraphics -lvtkFiltering -lvtkCommon -lvtkjpeg -lvtkpng -lvtkzlib -lvtksys -lfreetype
ld: library not found for -lvtkHybrid
Any idea what they changed?

It seems like the component libraries have changed in VTK 6: see their wiki page for some details. For example, after configuring to link everything in VTK with cmake, the VTK_LIBRARIES variable is set with the following list of libraries to be linked:
vtkalglib;vtkChartsCore;vtkCommonColor;vtkCommonDataModel;vtkCommonMath;vtkCommonCore;vtksys;vtkCommonMisc;vtkCommonSystem;vtkCommonTransforms;vtkInfovisCore;vtkFiltersExtraction;vtkCommonExecutionModel;vtkFiltersCore;vtkFiltersGeneral;vtkCommonComputationalGeometry;vtkFiltersStatistics;vtkImagingFourier;vtkImagingCore;vtkRenderingContext2D;vtkRenderingCore;vtkFiltersGeometry;vtkFiltersSources;vtkIOImage;vtkDICOMParser;vtkIOCore;vtkzlib;vtkmetaio;vtkjpeg;vtkpng;vtktiff;vtkIOXMLParser;vtkexpat;vtkRenderingFreeType;vtkfreetype;vtkftgl;vtkRenderingOpenGL;vtkImagingHybrid;vtkDomainsChemistry;vtkIOXML;vtkIOGeometry;vtkjsoncpp;vtkexoIIc;vtkNetCDF;vtkNetCDF_cxx;vtkhdf5_hl;vtkhdf5;vtkFiltersAMR;vtkParallelCore;vtkIOLegacy;vtkFiltersFlowPaths;vtkFiltersGeneric;vtkFiltersHybrid;vtkImagingSources;vtkFiltersHyperTree;vtkFiltersImaging;vtkImagingGeneral;vtkFiltersModeling;vtkFiltersParallel;vtkFiltersParallelImaging;vtkFiltersProgrammable;vtkFiltersSelection;vtkFiltersTexture;vtkFiltersVerdict;verdict;vtkGeovisCore;vtkInfovisLayout;vtkInteractionStyle;vtkInteractionWidgets;vtkRenderingAnnotation;vtkImagingColor;vtkRenderingVolume;vtkViewsCore;vtkproj4;vtkgl2ps;vtkGUISupportQt;vtkGUISupportQtOpenGL;vtkImagingMath;vtkImagingMorphological;vtkImagingStatistics;vtkImagingStencil;vtkInteractionImage;vtkIOAMR;vtkIOEnSight;vtkIOExodus;vtkIOExport;vtkRenderingGL2PS;vtkIOImport;vtkIOInfovis;vtklibxml2;vtkIOLSDyna;vtkIOMINC;vtkIOMovie;vtkoggtheora;vtkIONetCDF;vtkIOParallel;vtkIOPLY;vtkIOSQL;vtksqlite;vtkIOVideo;vtkRenderingFreeTypeOpenGL;vtkRenderingHybridOpenGL;vtkRenderingImage;vtkRenderingLabel;vtkRenderingLOD;vtkRenderingVolumeAMR;vtkRenderingVolumeOpenGL;vtkViewsContext2D;vtkViewsGeovis;vtkViewsInfovis
And note that vtkCommon and vtkHybrid are no longer on the named list because it's been re-organized, so you'll need to adjust what libraries you link.

Try This.
static
{
vtkNativeLibrary.LoadAllNativeLibraries();//Try to load all library
}
The vtkNativeLibrary class used to load native library more easily.
rather than usual
static {
//System.loadLibrary("vtkCommonJava");
//System.loadLibrary("vtkFilteringJava");
//System.loadLibrary("vtkIOJava");
//System.loadLibrary("vtkImagingJava");
//System.loadLibrary("vtkGraphicsJava");
//System.loadLibrary("vtkRenderingJava");
}
that works only with older version of VTK and not VTK6 versions

Related

Link issues with QtMacExtras using Qt 5.0.2

I need the QtMacExtras framework to use its QMacCocoaViewContainer class.
I have been able to get the framework and compile it easily using qmake/make without issues.
However, when trying to link my binary with it I get undefined symbols errors.
The compilation of the objects works like a charm.
g++ -mmacosx-version-min=10.7 --exported_symbols_list=symbols.exp -Wl,-x -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib -o myBinary *.o -bind_at_load -F/pathToMy/Frameworks -framework QtCore -framework QtMacExtras -framework QtGui -framework QtWidgets #...
Undefined symbols for architecture x86_64:
"QMacCocoaViewContainer::QMacCocoaViewContainer(objc_object*, QWidget*)", referenced from:
WbDockWidget::setContentWindowId(unsigned long long)in WbDockWidget.o
ld: symbol(s) not found for architecture x86_64
The code to instantiate the class is the following:
#include <QtMacExtras/QMacCocoaViewContainer>
// ...
NSView *view = reinterpret_cast<NSView *>(id);
QWidget *widget = new QMacCocoaViewContainer(view, this);
Commenting this code allows to compile my project.
The framework seems correctly linked, seems to include correctly the headers, and seems to contain the symbols (!):
$ nm -g Frameworks/QtMacExtras.framework/Versions/5/QtMacExtras | grep -i cocoa
0000000000009240 T __ZN22QMacCocoaViewContainer11qt_metacallEN11QMetaObject4CallEiPPv
0000000000009200 T __ZN22QMacCocoaViewContainer11qt_metacastEPKc
0000000000004c00 T __ZN22QMacCocoaViewContainer12setCocoaViewEP6NSView
0000000000011130 S __ZN22QMacCocoaViewContainer16staticMetaObjectE
0000000000004b60 T __ZN22QMacCocoaViewContainerC1EP6NSViewP7QWidget
0000000000004b70 T __ZN22QMacCocoaViewContainerC2EP6NSViewP7QWidget
0000000000004d10 T __ZN22QMacCocoaViewContainerD0Ev
0000000000004d40 T __ZN22QMacCocoaViewContainerD1Ev
0000000000004d90 T __ZN22QMacCocoaViewContainerD2Ev
00000000000091e0 T __ZNK22QMacCocoaViewContainer10metaObjectEv
0000000000004e20 T __ZNK22QMacCocoaViewContainer9cocoaViewEv
0000000000011360 S __ZTI22QMacCocoaViewContainer
000000000000ce70 S __ZTS22QMacCocoaViewContainer
0000000000011160 S __ZTV22QMacCocoaViewContainer
0000000000004d50 T __ZThn16_N22QMacCocoaViewContainerD0Ev
0000000000004e10 T __ZThn16_N22QMacCocoaViewContainerD1Ev
Any suggestion to be able to use this class would be more than welcome.
Sincerely.
This problem occurs when you build as C++.
The easiest way to fix this is to switch the extension to .mm, but if you force the toolchain to build as Objective C++ by whatever means it should fix the issue.

Static Library linking Error

Getting an Apple Mach-O Librarian Error when trying to archive my project.
I have an Xcode project that links to an FDLibrary. Its a static library contained in the same workspace. FDLibrary links to an SDLibrary. Another static library also contained in the workspace.
I know its unconventional to have multiple static libraries however the SDLibrary contains a lot of common code to several apps while the FDLibrary contains a lot of common code built on the SDLibrary only needed by a few apps. Most basically the FDLibrary contains a lot of specific interface templates while the SDLibrary is almost all data structures and object types.
Building and Running to device works completely fine. But I started to archive today and ran into this error.
All hints welcome! Thanks in advance!
Libtool "/Users/rpools1951/Library/Developer/Xcode/DerivedData/FunDecks-fqrkiylcrromdnbuuyxoyjotckal/Build/Intermediates/ArchiveIntermediates/Irregular Verbs/IntermediateBuildFilesPath/FDLibrary.build/Release-iphoneos/FDLibrary.build/Objects-normal/armv7s/libFDLibrary.a" normal armv7s
cd /Users/rpools1951/Projects/Workspaces/FDLibrary
setenv IPHONEOS_DEPLOYMENT_TARGET 6.0
setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool -static -arch_only armv7s -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk "-L/Users/rpools1951/Library/Developer/Xcode/DerivedData/FunDecks-fqrkiylcrromdnbuuyxoyjotckal/Build/Intermediates/ArchiveIntermediates/Irregular Verbs/BuildProductsPath/Release-iphoneos" -LSDLibrary -filelist "/Users/rpools1951/Library/Developer/Xcode/DerivedData/FunDecks-fqrkiylcrromdnbuuyxoyjotckal/Build/Intermediates/ArchiveIntermediates/Irregular Verbs/IntermediateBuildFilesPath/FDLibrary.build/Release-iphoneos/FDLibrary.build/Objects-normal/armv7s/FDLibrary.LinkFileList" -ObjC -framework UIKit -lSDLibrary -framework Foundation -o "/Users/rpools1951/Library/Developer/Xcode/DerivedData/FunDecks-fqrkiylcrromdnbuuyxoyjotckal/Build/Intermediates/ArchiveIntermediates/Irregular Verbs/IntermediateBuildFilesPath/FDLibrary.build/Release-iphoneos/FDLibrary.build/Objects-normal/armv7s/libFDLibrary.a"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: -dynamic not specified the following flags are invalid: -ObjC
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: can't locate file for: -lSDLibrary
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: file: -lSDLibrary is not an object file (not allowed in a library)
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool failed with exit code 1

Unit testing Objective-C++ frameworks with Xcode 4.x

I'm writing a framework using Objective C++ and I am having trouble setting up unit tests for it.
Compiling just the framework target works fine.
But when I tell Xcode to compile and run the test bundle I get:
Ld ~/Library/Developer/Xcode/DerivedData/TestFramework-axdefcbatoubjbbfqiyxildilobl/Build/Products/Debug/TestFrameworkTests.octest/Contents/MacOS/TestFrameworkTests normal x86_64
cd "~/Projects/TestFramework"
setenv MACOSX_DEPLOYMENT_TARGET 10.7
"/Applications/Xcode 4.5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++" -arch x86_64 -bundle -isysroot "/Applications/Xcode 4.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk" -L~/Library/Developer/Xcode/DerivedData/TestFramework-axdefcbatoubjbbfqiyxildilobl/Build/Products/Debug -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib -F~/Library/Developer/Xcode/DerivedData/TestFramework-axdefcbatoubjbbfqiyxildilobl/Build/Products/Debug "-F/Applications/Xcode 4.5.app/Contents/Developer/Library/Frameworks" -filelist ~/Library/Developer/Xcode/DerivedData/TestFramework-axdefcbatoubjbbfqiyxildilobl/Build/Intermediates/TestFramework.build/Debug/TestFrameworkTests.build/Objects-normal/x86_64/TestFrameworkTests.LinkFileList -mmacosx-version-min=10.7 -v -fobjc-arc -fobjc-link-runtime -fprofile-arcs -stdlib=libc++ -framework SenTestingKit -framework Cocoa -framework TestFramework -o ~/Library/Developer/Xcode/DerivedData/TestFramework-axdefcbatoubjbbfqiyxildilobl/Build/Products/Debug/TestFrameworkTests.octest/Contents/MacOS/TestFrameworkTests
Apple clang version 4.0 (tags/Apple/clang-421.10.48) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
"/Applications/Xcode 4.5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -bundle -macosx_version_min 10.7.0 -syslibroot "/Applications/Xcode 4.5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk" -o ~/Library/Developer/Xcode/DerivedData/TestFramework-axdefcbatoubjbbfqiyxildilobl/Build/Products/Debug/TestFrameworkTests.octest/Contents/MacOS/TestFrameworkTests -L~/Library/Developer/Xcode/DerivedData/TestFramework-axdefcbatoubjbbfqiyxildilobl/Build/Products/Debug -L/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/lib -filelist ~/Library/Developer/Xcode/DerivedData/TestFramework-axdefcbatoubjbbfqiyxildilobl/Build/Intermediates/TestFramework.build/Debug/TestFrameworkTests.build/Objects-normal/x86_64/TestFrameworkTests.LinkFileList -framework SenTestingKit -framework Cocoa -framework TestFramework -force_load "/Applications/Xcode 4.5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_macosx.a" -framework Foundation -lobjc -lc++ "/Applications/Xcode 4.5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/4.0/lib/darwin/libclang_rt.profile_osx.a" -lSystem "/Applications/Xcode 4.5.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/4.0/lib/darwin/libclang_rt.osx.a" -F~/Library/Developer/Xcode/DerivedData/TestFramework-axdefcbatoubjbbfqiyxildilobl/Build/Products/Debug "-F/Applications/Xcode 4.5.app/Contents/Developer/Library/Frameworks"
Undefined symbols for architecture x86_64:
"Foo::Bar::Bar()", referenced from:
-[FooBar_Tests testBaz] in FooBar_Tests.o
"Foo::Bar::baz() const", referenced from:
-[FooBar_Tests testBaz] in FooBar_Tests.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I have:
C++ Language Dialect: c++11
C++ Standard Library: libc++
set on both build targets (framework & test bundle).
And I am of course linking against the framework in my test bundle target.
Furthermore, all framework headers are marked public.
I also tried adding the framework files to the test bundle's target and leaving them out. None of these fixed the problem.
I am a bit puzzled as to what's going wrong here, right now. Any ideas?
This is how my C++ class looks like (kind of):
//FooBar.hh
namespace Foo {
class Bar {
public:
bool baz() const;
}
}
//FooBar.mm
#import "FooBar.hh"
namespace Foo {
bool Bar::baz() const {
return true;
}
}
And this my test case:
//FooBar_Tests.hh
#import <SenTestingKit/SenTestingKit.h>
#interface FooBar_Tests : SenTestCase
#end
//FooBar_Tests.mm
#import "FooBar_Tests.hh"
#import <TestFramework/FooBar.hh>
//this one fails as well (compiles fine, fails one linkage):
//#import "FooBar.hh"
#implementation FooBar_Tests
- (void)testBaz {
Foo::Bar bar();
STAssertEquals(bar.baz(), true, nil);
}
Edit: Split code up into .hh&.mm files. Still getting the same errors though.
One possible problem is that your unit tests are in the header file. Header files do not do much in OCUnit. You can even get rid of the header file and put all your test case code in the implementation file. Add an Objective-C unit test class to your project, give it the extension .mm, and move your test case code there. Does that fix the problem?
When I unit test C++ code with OCUnit, I find I have to add the C++ files in my app to the unit test target to avoid link errors. I'm not sure if it applies to Objective-C++ code, but it's something to look into.
I eventually added a new unit test target to my project, enabled C++11 and tried compiling/running it. Success.
Somehow my original unit test target must have gone bad in regards to C++11. Had compiled just fine before.
Now it's time to migrate my test cases to the new test bundle, I guess.
…and I thought I was going mad. Oh well…

Duplicate symbol from single library in iOS4.1 SDK

I am developing an iPhone application. I am unfamiliar with Xcode, so please bear with me. I have the iOS 4.1 Device SDK. When I select "Simulator" in the "Active ..." drop-down box, my application compiles without errors and runs in the iPhone simulator.
When I select "Device" in the drop-down box, however, I get the following linker error regarding a duplicate symbol:
Ld build/PineCone.build/Debug-iphoneos/PineCone.build/Objects-normal/armv6/PineCone normal armv6
cd /Users/isaacsutherland/fydp/PineCone/PineCone
setenv IPHONEOS_DEPLOYMENT_TARGET 4.1
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 -arch armv6 -isysroot /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.1.sdk -L/Users/isaacsutherland/fydp/PineCone/PineCone/build/Debug-iphoneos -L/Users/isaacsutherland/fydp/PineCone/PineCone/../3rd/libGHUnitIPhone -F/Users/isaacsutherland/fydp/PineCone/PineCone/build/Debug-iphoneos -filelist /Users/isaacsutherland/fydp/PineCone/PineCone/build/PineCone.build/Debug-iphoneos/PineCone.build/Objects-normal/armv6/PineCone.LinkFileList -dead_strip -all_load -ObjC -miphoneos-version-min=4.1 -framework Foundation -framework UIKit -framework CoreGraphics /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20Core.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20Network.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20Style.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20UI.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20UICommon.a /Users/isaacsutherland/fydp/PineCone/3rd/three20/Build/Products/Debug-iphoneos/libThree20UINavigator.a -framework QuartzCore -framework CFNetwork -framework MobileCoreServices -framework SystemConfiguration -lz.1.2.3 /Users/isaacsutherland/fydp/PineCone/ClientDal/build/Debug-iphoneos/libClientDal.a -lGHUnitIPhone4_0 -o /Users/isaacsutherland/fydp/PineCone/PineCone/build/PineCone.build/Debug-iphoneos/PineCone.build/Objects-normal/armv6/PineCone
ld: duplicate symbol _RedirectionLimit in /Users/isaacsutherland/fydp/PineCone/ClientDal/build/Debug-iphoneos/libClientDal.a(libASIHTTPRequest.a-armv6-master.o) and /Users/isaacsutherland/fydp/PineCone/ClientDal/build/Debug-iphoneos/libClientDal.a(libASIHTTPRequest.a-armv6-master.o)
collect2: ld returned 1 exit status
Command /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc-4.2 failed with exit code 1
The error is strange because it complains that _RedirectionLimit is found twice -- in the same file! libClientDal.a(libASIHTTPRequest.a-armv6-master.o) is the offending library. Can someone help me understand what is going on? How could this library have compiled properly in the first place? Or perhaps the linker is trying to include the same library twice?
The workaround provided in this similar question does not work for me.
If you need more information, I will gladly provide it -- as I said, I'm new to Xcode development.
When you have a web of projects that compile to static libraries and refer to one another, there are 2 distinct concerns you must consider:
A project's Direct Dependencies inform Xcode which projects depend on each other so it knows to recompile a project when its dependencies change.
A project's Linked Libaries actually get included in its object code.
In a nutshell, your web of direct dependencies can be as tangled as you want, but you must be careful to link each project's code into the application executable only once.
Basically, my problem was that I had 3 projects A, B, and C, and the dependencies looked like A=>B, A=>C, B=>C. I was linking libC.a into both A and B, so the linker complained about duplicate code.
The configuration stuff you need to change is on the Target Info page for each of your projects' targets.
This happened to me when I used the -all_load linker flag, which forces the linker to load all symbols from all libraries. The Three20 project says you should use it, because otherwise the Categories won't be loaded and you get a runtime exception. I removed that flag, and added the -force_load flag just for each library that needed it (the Three20 libraries). See also: What does the -all_load linker flag do?
I've several apps that need to embed a small custom library that makes use of ASI and TBXML. Some of this apps have their own version of that libraries. In order to avoid duplicate symbol issue, I duplicated the each library's target removing the .m files that causes the issue.
Hope it helps.

Duplicate symbol build error in Xcode project

When I try to build my project I get the following error.
ld: duplicate symbol
.objc_class_name_GLFunView in
/Users/gin/Documents/development/GLFun/build/GLFun.build/Debug-iphonesimulator/GLFun.build/Objects-normal/i386/GLFunView-7A51E8797CBB3D72.o
and
/Users/gin/Documents/development/GLFun/build/GLFun.build/Debug-iphonesimulator/GLFun.build/Objects-normal/i386/GLFunView-7A51E8797CBB3D72.o
What is this error about? How can I track down where the error is? XCode usually highlights the code that has problems, but for this error it's not showing anything? It doesn't have anything to do with Interface Builder does it?
My research indicates that this might be caused by including something twice, but I don't understand how that's possible since I'm not using any #include statements, I'm only using #import statements.
Here's some more of the build output:
Ld
build/Debug-iphonesimulator/GLFun.app/GLFun
normal i386 cd
/Users/gin/Documents/development/GLFun
setenv MACOSX_DEPLOYMENT_TARGET 10.5
setenv PATH
"/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc-4.2
-arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator3.1.3.sdk
-L/Users/gin/Documents/development/GLFun/build/Debug-iphonesimulator
-F/Users/gin/Documents/development/GLFun/build/Debug-iphonesimulator
-filelist /Users/gin/Documents/development/GLFun/build/GLFun.build/Debug-iphonesimulator/GLFun.build/Objects-normal/i386/GLFun.LinkFileList
-mmacosx-version-min=10.5 -framework Foundation -framework UIKit -framework
CoreGraphics -framework OpenGLES
-framework QuartzCore -o /Users/gin/Documents/development/GLFun/build/Debug-iphonesimulator/GLFun.app/GLFun
I ran into the same problem today. It turned out to be a typo in an #import statement. I accidentally included the .m file instead of the header:
#include "MyClass.m"
instead of:
#include "MyClass.h"
My guess is you're #implementing GLFunView twice in the same file (GLFunView.m). Perhaps you meant to implement GLFunView and then implement a category on it, and forgot the category name?

Resources