Simple Linking Error of a new user defined class?
In my project, I created a new class called PNGservices. Everything compiles
fine, but I get a bunch of undefined symbols which are all from my new class.
I added the PNGservices.h and PNGservices.cpp files to my project with
just the File->New File (and then I selected the empty file choice)
And just started to type away.
Obviously, the compiler found these two new files automatically. Do I need to do something special in Xcode to get the linker to recognize these new files?
I tried "clean up" and "clean up all" but that didn't work (Not that I know what
this does). Any suggestions will be greatly appreciated.
Sorry if this is a lame question, but I've been dumbed down by Codewarrior.
Ld /Users/kyle/Planes/build/Development/Planes.app/Contents/MacOS/Planes normal ppc
mkdir /Users/kyle/Planes/build/Development/Planes.app/Contents/MacOS
cd /Users/kyle/Planes
/usr/bin/g++-4.0 -o /Users/kyle/Planes/build/Development/Planes.app/Contents/MacOS/Planes -L/Users/kyle/Planes/build/Development -L/sw/lib -L/sw/lib/libpng12.a -F/Users/kyle/Planes/build/Development -F/Users/kyle/Planes -F/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks -filelist /Users/kyle/Planes/build/Planes.build/Development/Planes.build/Objects-normal/ppc/Planes.LinkFileList -framework Carbon -framework Cocoa -framework GLUT -framework OpenGL -framework QuickTime -lpng12 -lintl -lmenu -lncurses -lpanel -arch ppc -lpng
/usr/bin/ld: Undefined symbols:
PNGservices::bit_depth_
PNGservices::colortype_
PNGservices::filegamma_
PNGservices::screengamma_
PNGservices::graph_
PNGservices::width_
PNGservices::height_
PNGservices::rowbytes_
PNGservices::readfromfile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)
collect2: ld returned 1 exit status
fine, but I get a bunch of undefined symbols which are all from my new class.
I added the PNGservices.h and PNGservices.cpp files to my project with
just the File->New File (and then I selected the empty file choice)
And just started to type away.
Obviously, the compiler found these two new files automatically. Do I need to do something special in Xcode to get the linker to recognize these new files?
I tried "clean up" and "clean up all" but that didn't work (Not that I know what
this does). Any suggestions will be greatly appreciated.
Sorry if this is a lame question, but I've been dumbed down by Codewarrior.
Ld /Users/kyle/Planes/build/Development/Planes.app/Contents/MacOS/Planes normal ppc
mkdir /Users/kyle/Planes/build/Development/Planes.app/Contents/MacOS
cd /Users/kyle/Planes
/usr/bin/g++-4.0 -o /Users/kyle/Planes/build/Development/Planes.app/Contents/MacOS/Planes -L/Users/kyle/Planes/build/Development -L/sw/lib -L/sw/lib/libpng12.a -F/Users/kyle/Planes/build/Development -F/Users/kyle/Planes -F/Developer/SDKs/MacOSX10.4.0.sdk/System/Library/Frameworks -filelist /Users/kyle/Planes/build/Planes.build/Development/Planes.build/Objects-normal/ppc/Planes.LinkFileList -framework Carbon -framework Cocoa -framework GLUT -framework OpenGL -framework QuickTime -lpng12 -lintl -lmenu -lncurses -lpanel -arch ppc -lpng
/usr/bin/ld: Undefined symbols:
PNGservices::bit_depth_
PNGservices::colortype_
PNGservices::filegamma_
PNGservices::screengamma_
PNGservices::graph_
PNGservices::width_
PNGservices::height_
PNGservices::rowbytes_
PNGservices::readfromfile(std::basic_string<char, std::char_traits<char>, std::allocator<char> >)
collect2: ld returned 1 exit status
looks like your .cpp file isn't in the target....
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Error with Linking Symbols | Oddity007 | 1 | 2,364 |
Feb 24, 2009 06:20 PM Last Post: Oddity007 |
|
| Linking error | honkskillet | 2 | 2,156 |
Sep 21, 2008 01:06 AM Last Post: OneSadCookie |
|
| how are "etext" and "end" defined on Darwin? | vanfanel | 1 | 2,359 |
Apr 4, 2008 02:31 PM Last Post: OneSadCookie |
|
| 'Unidentified error' error in Xcode | scgames | 2 | 3,170 |
Jun 10, 2006 01:38 AM Last Post: scgames |
|

