Programming & Scripting

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

  Beginner BeginnerMember since: 21.11.2007, 16:17Posts: 93 Likes: 0
 

 Post Topic:
PostPosted 10.03.2008, 07:11 
Thats interesting. My dll work while in the editor and in the game.

User avatar   Uber Modder Uber ModderMember since: 19.08.2007, 23:06Posts: 1203Location: Bristol, UK Likes: 0
 

 Post Topic:
PostPosted 10.03.2008, 11:19 
Same here, my modified DLL works fine in the editor.
However a few team colleagues couldn't get our DLL working at all last night which is odd. Wil try and find out more later today.




Last edited by p5ym0n on 10.03.2008, 11:20, edited 1 time in total.
  Beginner BeginnerMember since: 12.04.2007, 21:21Posts: 10 Likes: 0
 

 Post Topic: RE: Error while compiling
PostPosted 10.03.2008, 11:50 
The volatile did the trick, thank you.


  Trained Modder Trained ModderMember since: 03.05.2007, 00:04Posts: 312 Likes: 0
 

 Post Topic: compile error
PostPosted 10.03.2008, 13:41 
Im getting this error since ive rebuild the solution. Anyone knows whats wrong?


Code:

WinBase.cpp
..\..\..\Code\CryEngine\CryCommon\WinBase.cpp(3263) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?
CryStructPack.cpp
..\..\..\Code\CryEngine\CryCommon\CryStructPack.cpp(140) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?



User avatar   Experienced Modder Experienced ModderMember since: 18.11.2007, 21:15Posts: 464 Likes: 0
 

 Post Topic: RE: compile error
PostPosted 10.03.2008, 13:45 
The solution file must be using a precompiled header called StdAfx.h, and you don't have those .cpp files using #include "StdAfx.h", just simply add it at the top and it should be fine. Also, just a note: The StdAfx.h is a precompiled header file, meaning that the compiler compiles it beforehand, for faster referencing, most of the #includes that your files will commonly use, but not need to change often, will be in here, this include File I/O, Date\Time, etc. etc.


Last edited by Predator106 on 10.03.2008, 13:47, edited 1 time in total.
  Trained Modder Trained ModderMember since: 03.05.2007, 00:04Posts: 312 Likes: 0
 

 Post Topic:
PostPosted 10.03.2008, 13:50 
Including StdAfx.h will give me loads of errors for both files..

Code:


------ Build started: Project: Fueled, Configuration: Debug Win32 ------
Compiling...
CryStructPack.cpp
c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\crystructpack.h(44) : error C2027: use of undefined type 'CTypeInfo'
        c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\typeinfo.h(30) : see declaration of 'CTypeInfo'
c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\crystructpack.h(44) : error C2228: left of '.Size' must have class/struct/union
c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\crystructpack.h(44) : error C2780: 'const _Ty &std::max(const _Ty &,const _Ty &,_Pr)' : expects 3 arguments - 2 provided
        c:\program files\microsoft visual studio 8\vc\include\xutility(3190) : see declaration of 'std::max'
c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\crystructpack.h(56) : error C2027: use of undefined type 'CTypeInfo'
        c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\typeinfo.h(30) : see declaration of 'CTypeInfo'
c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\crystructpack.h(56) : error C2228: left of '.Size' must have class/struct/union
c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\crystructpack.h(59) : error C2027: use of undefined type 'CTypeInfo'
        c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\typeinfo.h(30) : see declaration of 'CTypeInfo'
c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\crystructpack.h(59) : error C2228: left of '.Size' must have class/struct/union
c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\crystructpack.h(76) : error C2027: use of undefined type 'CTypeInfo'
        c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\typeinfo.h(30) : see declaration of 'CTypeInfo'
c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\crystructpack.h(76) : error C2228: left of '.Size' must have class/struct/union
c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\crystructpack.h(79) : error C2027: use of undefined type 'CTypeInfo'
        c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\typeinfo.h(30) : see declaration of 'CTypeInfo'
c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\crystructpack.h(79) : error C2228: left of '.Size' must have class/struct/union
WinBase.cpp
c:\program files\electronic arts\crytek\crysis\code\cryengine\crycommon\winbase.cpp(24) : fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory

========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========



  Uber Modder Uber ModderMember since: 20.04.2007, 14:42Posts: 1795Location: Maryland, USA Likes: 0
 

 Post Topic:
PostPosted 10.03.2008, 14:08 
Can you attach the source file?


Smilies2themax!
:D :rolleyes: :)) :easter: ;) :P :] :)) ;) :evil: :p :D :)) :tongue: :] :P
  Trained Modder Trained ModderMember since: 03.05.2007, 00:04Posts: 312 Likes: 0
 

 Post Topic:
PostPosted 10.03.2008, 14:18 
i just removed the solution and made a fresh solution again, it seems i can build fine untill i press rebuild again. What file should i attach exactly?




Last edited by BulleTTime on 10.03.2008, 14:22, edited 2 times in total.
  Uber Modder Uber ModderMember since: 20.04.2007, 14:42Posts: 1795Location: Maryland, USA Likes: 0
 

 Post Topic:
PostPosted 10.03.2008, 17:04 
The source file with the error and the source file where you added a #include "StdAfx.h".


Smilies2themax!
:D :rolleyes: :)) :easter: ;) :P :] :)) ;) :evil: :p :D :)) :tongue: :] :P
  Beginner BeginnerMember since: 06.05.2005, 14:28Posts: 16 Likes: 0
 

 Post Topic:
PostPosted 11.03.2008, 14:54 
i have a compile error too

------ Rebuild All started: Project: CrysisMod, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'CrysisMod', configuration 'Debug|Win32'
Compiling...
StdAfx.cpp
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(175) : error C2220: warning treated as error - no 'object' file generated
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(175) : warning C4391: '__m128 _mm_add_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(176) : warning C4391: '__m128 _mm_add_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(177) : warning C4391: '__m128 _mm_sub_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(178) : warning C4391: '__m128 _mm_sub_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(179) : warning C4391: '__m128 _mm_mul_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(180) : warning C4391: '__m128 _mm_mul_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(181) : warning C4391: '__m128 _mm_div_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(182) : warning C4391: '__m128 _mm_div_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(183) : warning C4391: '__m128 _mm_sqrt_ss(__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(184) : warning C4391: '__m128 _mm_sqrt_ps(__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(185) : warning C4391: '__m128 _mm_rcp_ss(__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(186) : warning C4391: '__m128 _mm_rcp_ps(__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(187) : warning C4391: '__m128 _mm_rsqrt_ss(__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(188) : warning C4391: '__m128 _mm_rsqrt_ps(__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(189) : warning C4391: '__m128 _mm_min_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(190) : warning C4391: '__m128 _mm_min_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(191) : warning C4391: '__m128 _mm_max_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(192) : warning C4391: '__m128 _mm_max_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(198) : warning C4391: '__m128 _mm_and_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(199) : warning C4391: '__m128 _mm_andnot_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(200) : warning C4391: '__m128 _mm_or_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(201) : warning C4391: '__m128 _mm_xor_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(207) : warning C4391: '__m128 _mm_cmpeq_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(208) : warning C4391: '__m128 _mm_cmpeq_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(209) : warning C4391: '__m128 _mm_cmplt_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(210) : warning C4391: '__m128 _mm_cmplt_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(211) : warning C4391: '__m128 _mm_cmple_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(212) : warning C4391: '__m128 _mm_cmple_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(213) : warning C4391: '__m128 _mm_cmpgt_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(214) : warning C4391: '__m128 _mm_cmpgt_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(215) : warning C4391: '__m128 _mm_cmpge_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(216) : warning C4391: '__m128 _mm_cmpge_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(217) : warning C4391: '__m128 _mm_cmpneq_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(218) : warning C4391: '__m128 _mm_cmpneq_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(219) : warning C4391: '__m128 _mm_cmpnlt_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(220) : warning C4391: '__m128 _mm_cmpnlt_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(221) : warning C4391: '__m128 _mm_cmpnle_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(222) : warning C4391: '__m128 _mm_cmpnle_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(223) : warning C4391: '__m128 _mm_cmpngt_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(224) : warning C4391: '__m128 _mm_cmpngt_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(225) : warning C4391: '__m128 _mm_cmpnge_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(226) : warning C4391: '__m128 _mm_cmpnge_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(227) : warning C4391: '__m128 _mm_cmpord_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(228) : warning C4391: '__m128 _mm_cmpord_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(229) : warning C4391: '__m128 _mm_cmpunord_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(230) : warning C4391: '__m128 _mm_cmpunord_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(252) : warning C4391: '__m128 _mm_cvt_si2ss(__m128,int)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(253) : warning C4391: '__m128 _mm_cvt_pi2ps(__m128,__m64)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(259) : warning C4391: '__m128 _mm_shuffle_ps(__m128,__m128,unsigned int)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(260) : warning C4391: '__m128 _mm_unpackhi_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(261) : warning C4391: '__m128 _mm_unpacklo_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(262) : warning C4391: '__m128 _mm_loadh_pi(__m128,const __m64 *)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(263) : warning C4391: '__m128 _mm_movehl_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(264) : warning C4391: '__m128 _mm_movelh_ps(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(266) : warning C4391: '__m128 _mm_loadl_pi(__m128,const __m64 *)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(292) : warning C4391: '__m128 _mm_set_ss(float)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(293) : warning C4391: '__m128 _mm_set_ps1(float)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(294) : warning C4391: '__m128 _mm_set_ps(float,float,float,float)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(295) : warning C4391: '__m128 _mm_setr_ps(float,float,float,float)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(296) : warning C4391: '__m128 _mm_setzero_ps(void)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(297) : warning C4391: '__m128 _mm_load_ss(const float *)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(298) : warning C4391: '__m128 _mm_load_ps1(const float *)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(299) : warning C4391: '__m128 _mm_load_ps(const float *)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(300) : warning C4391: '__m128 _mm_loadr_ps(const float *)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(301) : warning C4391: '__m128 _mm_loadu_ps(const float *)' : incorrect return type for intrinsic function, expected 'union'
c:\program files\microsoft platform sdk for windows xp sp2\include\xmmintrin.h(310) : warning C4391: '__m128 _mm_move_ss(__m128,__m128)' : incorrect return type for intrinsic function, expected 'union'
Build log was saved at "file://c:\Program Files\Electronic Arts\Crytek\Crysis\Mods\CrysisMod\Code\Debug\BuildLog.htm"
CrysisMod - 1 error(s), 66 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========
  Beginner BeginnerMember since: 06.05.2005, 14:28Posts: 16 Likes: 0
 

 Post Topic:
PostPosted 11.03.2008, 16:31 
i need help pleaseeee!!!!!!!
  Uber Modder Uber ModderMember since: 20.04.2007, 14:42Posts: 1795Location: Maryland, USA Likes: 0
 

 Post Topic:
PostPosted 11.03.2008, 16:34 
Only problem I see is
Quote:
microsoft platform sdk for windows xp sp2

Get the latest SDK or something!!


Smilies2themax!
:D :rolleyes: :)) :easter: ;) :P :] :)) ;) :evil: :p :D :)) :tongue: :] :P
  Beginner BeginnerMember since: 21.01.2008, 13:44Posts: 61Location: Deutschland / Germany Likes: 0
 

 Post Topic: windows.h
PostPosted 11.03.2008, 20:01 
Hi,

ok, I've installe vc++ 2005, i opened the project and tryed to compile it (after i've done a small change). but...
i get the following error:
'fatal error C1083: Datei (Include) kann nicht geöffnet werden: "windows.h": No such file or directory'
Whats wrong?? I've only edited 2 lines


Image


Last edited by S4lz on 11.03.2008, 20:40, edited 4 times in total.
  Beginner BeginnerMember since: 12.04.2007, 21:21Posts: 10 Likes: 0
 

 Post Topic: RE: windows.h
PostPosted 11.03.2008, 20:06 
Do you also have Service Pack 1 for Visual Studio 2005 and Windows Platform SDK installed?


  Beginner BeginnerMember since: 21.01.2008, 13:44Posts: 61Location: Deutschland / Germany Likes: 0
 

 Post Topic:
PostPosted 11.03.2008, 20:11 
Service Pack:
It should be installed, but where can i download the installer, maybe I've got a wrong file???

Win SDK:
hmmm, i think i've nothing like this...
I'll download it and try again

thx


Image