Archived

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

Msihuk

Compilation problem

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
quote:
Original post by Msihuk
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



I downloaded it and tried it out. I was ablt to get rid of the error by commenting out the whole mess (which seems likes it should be OK, but MSVC 6 is buggy) of:

#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

and then just added
# define PATH_MAX _MAX_PATH
I also had to delete the PACK_STRUCT at then of the struct definitions in the file (which is what that mess was supposed to do essentially, anyway).

This got rid of the internal compiler errors, but the I got other errors, because the openGl libs were included in the project. So I included opengl32.lib and glu32.lib. This then lead to another error: LNK2001. I think, this is because VC can''t find the WinMain. I don''t know what to do about this error. I tried adding the file (nehwin32.cpp, I think) that had it to the project but that didn''t seem to work. This is just a guess-it may be another problem.

Hope this helps somewhat.

Share this post


Link to post
Share on other sites
Oops, didn''t need to add the sdl .cpp files to the project. So just remove those,if you added them. It compiles fine then. My exe crashes, though, when I attempt to run it. I might be missing data files or something the exe needs to load though, though.

Share this post


Link to post
Share on other sites