Archived

This topic is now archived and is closed to further replies.

Msihuk

Complication about compiler

Recommended Posts

HI! I''m trying to compile the Brett Porter ms3d Skeletal animation project by VC 6.0 and gettign follwing error: ------------------------------------------ Compiling... MilkshapeModel.cpp e:\animation code\ms3danim2\ms3danim\milkshapemodel.cpp(109) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file ''msc1.cpp'', line 1786) Please choose the Technical Support command on the Visual C++ Help menu, or open the Technical Support help file for more information Error executing cl.exe. SkelAnimTut.exe - 1 error(s), 0 warning(s) --------------------------------------- the error line point to the code line: #ifdef _MSC_VER # pragma pack( pop, packing ) #endif --------------------------------------- the code has some portion i didn''t understand: at the beginning of the file: ---------------------------------------- // byte-align structures #if defined( _MSC_VER ) || defined( __BORLANDC__ ) # include # define PACK_STRUCT # define PATH_MAX _MAX_PATH #elif defined( __GNUC__ ) # define PACK_STRUCT __attribute__((packed)) # include #else # error you must byte-align these structures with the appropriate compiler directives #endif ------------------------------------------ what does this code means? any idea? Another thing is that....ost of the structer is declared as PACK_STRUCT. What is teh use of this optimization. Can i go without optimization? any detail help help me to do my project. Mishuk

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Packing was an optimization, for them. I specifies how
structures are laid out, i.e., what offsets the fields align to.
Now that you have to work with their binaries, choosing
the correct packing is not optional. (unless
you want to deal with arbitrarily shifted quantities or pointers!)

The official documentation on packing is here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_predir_pack.asp

Note that the "packing" identifier is a vc6.0 thing, are you
using vc6?

Share this post


Link to post
Share on other sites