Programming & Scripting

View unanswered posts | View active topics


Post a new topicPost a reply
Previous topic | Next topic 

User avatar   Uber Modder Uber ModderMember since: 22.07.2007, 13:00Posts: 1382Location: BC, Canada Likes: 0
 

 Post Topic: Common compiler errors
PostPosted 07.03.2008, 22:39 
Please post your compiler errors in this and only this thread. Thanks for your cooperation :)

-jameszhao00


Common Problems:
  1. Cannot find afxres.h
    Open GameDll.rc and replace afxres.h with windows.h
    Code:
    //#include "afxres.h" //comment out afxres.h
    #include "windows.h"
  2. (Visual Studio 2010) error C2440, utility (163)
    Open NetHelpers.h and replace this
    Code:
    return TNetMessageCallbackResult( ((cls*)p)->Handle##name( serialize, curSeq, oldSeq, pEntityId, pChannel ), NULL ); \

    With this:
    Code:
    return TNetMessageCallbackResult( ((cls*)p)->Handle##name( serialize, curSeq, oldSeq, pEntityId, pChannel ), reinterpret_cast<INetAtSyncItem*>(NULL) ); \

When loading the CryCommon.vcproj the Express Edition asks if you want to convert the project to the format used by the Express Edition... this won't cause any compatibility problems if converted will it?

I would assume not, but would just like confirmation before I do so.
Thanks.


Last edited by intrepidbiped on 03.05.2010, 16:57, edited 5 times in total.

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

 Post Topic: RE: Visual C++ 2008 Express Edition?
PostPosted 07.03.2008, 23:00 
Shouldn't. And I can also confirm VS08 can compile correctly.

/moving to scripting


Smilies2themax!
:D :rolleyes: :)) :easter: ;) :P :] :)) ;) :evil: :p :D :)) :tongue: :] :P
User avatar   Uber Modder Uber ModderMember since: 22.07.2007, 13:00Posts: 1382Location: BC, Canada Likes: 0
 

 Post Topic:
PostPosted 07.03.2008, 23:07 
Thanks, james.

Obviously I'm not experienced with C++, but I'm determined to learn :))

sorry for picking the wrong section :P
  Beginner BeginnerMember since: 25.02.2008, 18:25Posts: 8 Likes: 0
 

 Post Topic: cannot open include file 'afxres.h'.
PostPosted 08.03.2008, 06:34 
Hello,

I installed the sdk and opened the crysismod solution in vc++ 2008. I made sure to put it from debug to profile and when i tried to build the solution, i get the error : cannot open include file 'afxres.h'.

Any help?

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

 Post Topic: RE: cannot open include file 'afxres.h'.
PostPosted 08.03.2008, 06:37 
Do you have mfc/atl? Do you have Visual C++ Express? Maybe you need the platform SDK.

Mine is located @ C:\Program Files\Microsoft Visual Studio 9.0\VC\atlmfc\include\afxres.h

/moved to scripting+coding

Download the Platform SDK @ http://www.microsoft.com/downloads/details.aspx?FamilyID=e6e1c3df-a74f-4207-8586-711ebe331cdc&DisplayLang=en

You don't any of the .NET stuff.


Smilies2themax!
:D :rolleyes: :)) :easter: ;) :P :] :)) ;) :evil: :p :D :)) :tongue: :] :P


Last edited by jameszhao00 on 08.03.2008, 06:43, edited 2 times in total.
  Beginner BeginnerMember since: 25.02.2008, 18:25Posts: 8 Likes: 0
 

 Post Topic: RE: cannot open include file 'afxres.h'.
PostPosted 08.03.2008, 07:51 
What is mfc/alt? Yeah, I do have Visual C++ Express, 2008.

I downloaded the windows sdk and i still have the problem.
  Uber Modder Uber ModderMember since: 20.04.2007, 14:42Posts: 1795Location: Maryland, USA Likes: 0
 

 Post Topic: RE: cannot open include file 'afxres.h'.
PostPosted 08.03.2008, 07:58 
Did you set up the include path?

Project Properties->C++->General->Additional Include Directories

Also, it's "ATL", not "ALT". MFC/ATL are some commonly used windows programming libraries, which you don't have to worry about when making mods. They're only used in CrysisMod for resource stuff.

Also, make sure you use Google :)) <- A programmer's best friend.

and MSDN :)


Smilies2themax!
:D :rolleyes: :)) :easter: ;) :P :] :)) ;) :evil: :p :D :)) :tongue: :] :P


Last edited by jameszhao00 on 08.03.2008, 09:00, edited 6 times in total.
User avatar   Beginner BeginnerMember since: 27.10.2007, 18:48Posts: 14 Likes: 0
 

 Post Topic: RE: cannot open include file 'afxres.h'.
PostPosted 08.03.2008, 11:24 
I found by changing afx entries to windows.h it worked.

Apparently afx isn't required, but VC++ includes it anyway
User avatar   Beginner BeginnerMember since: 27.10.2007, 18:48Posts: 14 Likes: 0
 

 Post Topic: Altered Code - Not being used
PostPosted 08.03.2008, 12:19 
I can't get my test mod to see any changes ive made to the source code. As a test ive removed energy draining from suit while in cloaked mode. But when i load up my mod in sandbox or game, it still drains.

Ive got the dll in the right place, and the file structure is correct.

Anyone else got this problem?
User avatar   Beginner BeginnerMember since: 27.10.2007, 18:48Posts: 14 Likes: 0
 

 Post Topic: RE: Altered Code - Not being used
PostPosted 08.03.2008, 15:05 
Never mind, after restarting its working now?
  Beginner BeginnerMember since: 25.02.2008, 18:25Posts: 8 Likes: 0
 

 Post Topic:
PostPosted 09.03.2008, 04:13 
//#include "afxres.h" //comment out afxres.h
#include "windows.h"

i did that as was suggested in another post but now it says

error PRJ0003 : Error spawning 'cmd.exe'.


Ahh, can anyone help with this one?

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

 Post Topic:
PostPosted 09.03.2008, 04:19 
wtf... post as much information as you can please. Compiler version. Build log... rc Source file...


Smilies2themax!
:D :rolleyes: :)) :easter: ;) :P :] :)) ;) :evil: :p :D :)) :tongue: :] :P
User avatar   Beginner BeginnerMember since: 03.07.2007, 03:59Posts: 80Location: in my cold dark yet humid basement. Likes: 0
 

 Post Topic:
PostPosted 09.03.2008, 04:20 
omgosh so this means that we can use visual c++ express 2008 edition with no worries! i love you!


If you wish to join BP productions, please email or pm me. So far we are looking for a female voice actress. Vive jesu!
User avatar   Has no life Has no lifeMember since: 27.12.2007, 01:50Posts: 6478Location: Nottingham Likes: 4
 

 Post Topic:
PostPosted 09.03.2008, 04:22 
Yep, works perfectly.


Associate Producer - New World Interactive
  Beginner BeginnerMember since: 25.02.2008, 18:25Posts: 8 Likes: 0
 

 Post Topic:
PostPosted 09.03.2008, 04:28 
i can't upload the build log, basically it says

1>------ Build started: Project: CrysisMod, Configuration: Profile Win32 ------
1>Compiling resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation. All rights reserved.
1>Linking...
1> Creating library C:\Program Files\Electronic Arts\Crytek\Crysis\Mods\CrysisMod\Code\..\Bin32/CrysisMod.lib and object C:\Program Files\Electronic Arts\Crytek\Crysis\Mods\CrysisMod\Code\..\Bin32/CrysisMod.exp
1>Embedding manifest...
1>Project : error PRJ0003 : Error spawning 'cmd.exe'.
1>Build log was saved at "file://C:\Program Files\Electronic Arts\Crytek\Crysis\Mods\CrysisMod\BinTemp\Win32\Profile\CrysisMod\BuildLog.htm"
1>CrysisMod - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========


I am using Visual C++ 2008 Express Edition. I downloaded the sdk platform for windows server 2008 as you suggested. I installed the code in the default directory and I use the CrysisMod solution file to open up the solution. I set both Crycommon and Crymod to profile. As one fix suggested, I commented out the part about the include file and replace it with windows.h. Having done that, I get the cmd.exe error now.

Anything else?


Last edited by DINihilus on 09.03.2008, 04:31, edited 1 time in total.