'packed' undeclared identifier?

Post Reply
clank-o-tron
Posts: 2
Joined: Sat Jul 25, 2009 7:04 am

'packed' undeclared identifier?

Post by clank-o-tron » Sat Jul 25, 2009 7:12 am

This feels like it must be a simple problem, but I've been out of the C++ game about as long as Borland so my meager skills are rusty.

I used the windows installer to set up devkitPPC and created a VC++ Express project for a Wii project to try and compile "triangle.c". I added the OGC libs to the project but when I build, I get a series of errors like this:

Code: Select all

c:\devkitpro\libogc\include\ogc/system.h(162) : error C2065: 'packed' : undeclared identifier
and

Code: Select all

c:\devkitpro\libogc\include\ogc/system.h(186) : error C2371: '__attribute__' : redefinition; different basic types
Am I missing an include / lib somewhere?

WinterMute
Site Admin
Posts: 2003
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: 'packed' undeclared identifier?

Post by WinterMute » Sat Jul 25, 2009 11:23 pm

You're attempting to use the MSVC compiler to build Wii code, this won't work very well as you discovered.

See http://www.devkitpro.org/faq/how-do-i-u ... c-express/
Help keep devkitPro toolchains free, Donate today

Personal Blog

clank-o-tron
Posts: 2
Joined: Sat Jul 25, 2009 7:04 am

Re: 'packed' undeclared identifier?

Post by clank-o-tron » Sun Jul 26, 2009 6:35 am

Thanks for the help, Wintermute, but I'm not quite out of the woods yet. I double and triple-checked my project steup against the link you posted and it turns out that I had missed the step about ‘Create directory for solution’ box being unchecked. Once I made a new project with that unchecked and added the makefile in the right place I was able to compile using the GCC compiler.

(Oh, and for the benefit of anyone who's going through this as well - your next step will probably be to move your project out of the default VC++ location, because the compiler chokes on the spaces in the "my documents" path.)

The problem I've got now sounds similar to this one, but I've verified that my cpp extensions are lowercase. The error is this:

Code: Select all

c:/devkitpro/devkitppc/bin/../lib/gcc/powerpc-gekko/4.2.4/../../../../powerpc-gekko/lib/crtmain.o: In function `__crtmain':
e:/projects/devkitPro/buildscripts/newlib-1.17.0/libgloss/rs6000/crtmain.c(18): undefined reference to `main'
Thanks again for the help!

//edit: I finally figured it out - my cpp file wasn't in the source directory!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests