Forums Gallery Downloads LOGIN |REGISTER

Common compiler errors

Please use this forum for questions on C++, Lua, XML, and any other languages used in Crysis modding.


 

Funkenstein
Just getting started
Just getting started
 
Posts: 93
Member since: 21.11.2007, 16:17
Likes: 0

Postby Funkenstein » 10.03.2008, 07:11

Thats interesting. My dll work while in the editor and in the game.
User avatar
p5ym0n
Producer
Producer
 
Posts: 1203
Member since: 19.08.2007, 23:06
Location: Bristol, UK
Likes: 0

Postby p5ym0n » 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.
Doggeti
Just getting started
Just getting started
 
Posts: 10
Member since: 12.04.2007, 21:21
Likes: 0

RE: Error while compiling

Postby Doggeti » 10.03.2008, 11:50

The volatile did the trick, thank you.
BulleTTime
Developer
Developer
 
Posts: 312
Member since: 03.05.2007, 00:04
Likes: 0

compile error

Postby BulleTTime » 10.03.2008, 13:41

Im getting this error since ive rebuild the solution. Anyone knows whats wrong?


Code: Select all

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
Predator106
Not my first Rodeo
Not my first Rodeo
 
Posts: 464
Member since: 18.11.2007, 21:15
Likes: 0

RE: compile error

Postby Predator106 » 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.
BulleTTime
Developer
Developer
 
Posts: 312
Member since: 03.05.2007, 00:04
Likes: 0

Postby BulleTTime » 10.03.2008, 13:50

Including StdAfx.h will give me loads of errors for both files..

Code: Select all


------ 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 ==========

jameszhao00
Producer
Producer
 
Posts: 1795
Member since: 20.04.2007, 14:42
Location: Maryland, USA
Likes: 0

Postby jameszhao00 » 10.03.2008, 14:08

Can you attach the source file?
Smilies2themax!
:D :rolleyes: :)) :easter: ;) :P :] :)) ;) :evil: :p :D :)) :tongue: :] :P
BulleTTime
Developer
Developer
 
Posts: 312
Member since: 03.05.2007, 00:04
Likes: 0

Postby BulleTTime » 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.
jameszhao00
Producer
Producer
 
Posts: 1795
Member since: 20.04.2007, 14:42
Location: Maryland, USA
Likes: 0

Postby jameszhao00 » 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
dany
Just getting started
Just getting started
 
Posts: 16
Member since: 06.05.2005, 14:28
Likes: 0

Postby dany » 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 ==========
dany
Just getting started
Just getting started
 
Posts: 16
Member since: 06.05.2005, 14:28
Likes: 0

Postby dany » 11.03.2008, 16:31

i need help pleaseeee!!!!!!!
jameszhao00
Producer
Producer
 
Posts: 1795
Member since: 20.04.2007, 14:42
Location: Maryland, USA
Likes: 0

Postby jameszhao00 » 11.03.2008, 16:34

Only problem I see is
microsoft platform sdk for windows xp sp2

Get the latest SDK or something!!
Smilies2themax!
:D :rolleyes: :)) :easter: ;) :P :] :)) ;) :evil: :p :D :)) :tongue: :] :P
S4lz
Just getting started
Just getting started
 
Posts: 61
Member since: 21.01.2008, 13:44
Location: Deutschland / Germany
Likes: 0

windows.h

Postby S4lz » 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
Last edited by S4lz on 11.03.2008, 20:40, edited 4 times in total.
Image
Doggeti
Just getting started
Just getting started
 
Posts: 10
Member since: 12.04.2007, 21:21
Likes: 0

RE: windows.h

Postby Doggeti » 11.03.2008, 20:06

Do you also have Service Pack 1 for Visual Studio 2005 and Windows Platform SDK installed?
S4lz
Just getting started
Just getting started
 
Posts: 61
Member since: 21.01.2008, 13:44
Location: Deutschland / Germany
Likes: 0

Postby S4lz » 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


 
Connect and collaborate with CRYENGINE developers in the official Forums.
Visit the Gallery to share what you have created and be inspired by what others are creating with CRYENGINE.
Community