CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    Join Date
    Oct 2011
    Posts
    9

    Building exe from existing source

    Hi,

    I have the source code for an RTS game (+- 240 MB in size). When trying to build it in Visual 2010 it will ask me to convert it and then I get a lot off errors.

    The source was written around the year 2003-2005. Could someone advise which version off Visual I should be using to build the executable without having to convert it?

    If more information is needed, just ask.


    Thanks in advance for any answer.


    Regards

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Building exe from existing source

    What kind of errors are you getting?

  3. #3
    Join Date
    Oct 2011
    Posts
    9

    Re: Building exe from existing source

    Here's how I proceeded, step by step:

    File-Open-Project/Solution->Project.sln

    Next Conversion wizard loads

    I click on Next (no back up) Next

    Then it starts converting 1 of 11 projects ( Cossacks2, DipServer, IntExplorer, IChat, CommCore, LF_Server ,ClassEngine, gMOtor, MissionEngine, Launcher, NiceVopyl)

    When finished it gives a popup:
    "The project cossacks2.vcxproj appears to be under source control, but the associated source control plug-in is not installed on this computer. Source control will be disabled for this project."

    I click Ok

    Next popup:
    "The project IntExplorer.vcxproj appears to be under source control, but the associated source control plug-in is not installed on this computer. Source control will be disabled for this project."

    I click ok
    (it goes trough all 11 projects with same popup)'

    Loading Solution
    Preparing Solution...

    Next Pop-Up:
    " The associated source control plug-in is not installed or could not be initialized":
    (3 Options: )
    -Temporarily work uncontrolled
    -Work offline in disconnected mode ( greyed out)
    -Permanently remove source control association bindings ( I choose this one)


    Preparing solution....

    Conversion complete: "All projects converted succesfully with some warnings. Please see the conversion log for complete information"

    No errors but a lot off warnings. One off the 11 projects ( Cossacks2) in the solution has 54 warnings.


    Upgrade log2.xml :
    I cant seem to attach an .xml here ( not a valid attachment) and pasting the content makes the post too long ( over 20 000 characters) (how can I show the errors?)



    Then it continues:

    Parsing files in solution....
    Scanning included files...
    Parsing included files...
    Ready

    Then I choose Build Solution.

    And then the following errors come up:

    Code:
    ------ Skipped Build: Project: CommCore, Configuration: Debug Win32 ------
    Project not selected to build for this solution configuration 
    ------ Build started: Project: gMotor, Configuration: Release Win32 ------
    Build started 11/10/2011 15:47:04.
    InitializeBuildStatus:
      Creating ".\../../_release/gMotor\gMotor.unsuccessfulbuild" because "AlwaysCreate" was specified.
    MakeDirsForCl:
      Creating directory "C:\Users\RebelAngel\Desktop\cossakcs2_patch01\3dlib\gMotor\.\..\..\_release\gMotor\asm".
    ClCompile:
      stdafx.cpp
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(231): error C2649: 'typename' : is not a 'class'
              c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(232) : see reference to class template instantiation 'Singleton<T>' being compiled
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(252): error C2649: 'typename' : is not a 'class'
              c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(253) : see reference to class template instantiation 'PSingleton<T>' being compiled
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\mSegmentSet.h(43): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\rsVertex.h(116): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    
    Build FAILED.
    
    Time Elapsed 00:00:09.39
    ------ Build started: Project: cossacks2, Configuration: Release Win32 ------
    Build started 11/10/2011 15:47:14.
    InitializeBuildStatus:
      Creating ".\../_release3d_inl/vc6\cossacks2.unsuccessfulbuild" because "AlwaysCreate" was specified.
    ClCompile:
      stdheader.cpp
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(231): error C2649: 'typename' : is not a 'class'
              c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(232) : see reference to class template instantiation 'Singleton<T>' being compiled
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(252): error C2649: 'typename' : is not a 'class'
              c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(253) : see reference to class template instantiation 'PSingleton<T>' being compiled
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\mSegmentSet.h(43): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\rsVertex.h(116): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    C:\Users\RebelAngel\Desktop\cossakcs2_patch01\ClassEngine\ClassEngine.h(296): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\TopoGraf.h(70): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\TopoGraf.h(71): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\TopoGraf.h(72): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(767): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(767): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(767): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(768): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(769): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(771): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(771): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(771): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(771): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(772): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(774): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(777): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(779): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\VideoLayer.h(6): fatal error C1083: Cannot open include file: 'd3d8.h': No such file or directory
    
    Build FAILED.
    
    Time Elapsed 00:00:11.57
    ------ Skipped Build: Project: ClassEngine, Configuration: Release Win32 ------
    Project not selected to build for this solution configuration 
    ------ Skipped Build: Project: LF_Server, Configuration: Debug_CII Win32 ------
    Project not selected to build for this solution configuration 
    ------ Skipped Build: Project: MissionEngine, Configuration: Release Win32 ------
    Project not selected to build for this solution configuration 
    ------ Build started: Project: Launcher, Configuration: Release Win32 ------
    Build started 11/10/2011 15:47:26.
    InitializeBuildStatus:
      Creating "Release\Launcher.unsuccessfulbuild" because "AlwaysCreate" was specified.
    ClCompile:
      stdafx.cpp
      Launcher.cpp
    MakeDirsForLink:
      Creating directory "q:\".
    C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1029,5): error MSB3191: Unable to create directory "q:\". Could not find a part of the path 'q:\'.
    
    Build FAILED.
    
    Time Elapsed 00:00:05.04
    ------ Skipped Build: Project: IChat, Configuration: Debug_CII Win32 ------
    Project not selected to build for this solution configuration 
    ------ Skipped Build: Project: IntExplorer, Configuration: Debug_CII Win32 ------
    Project not selected to build for this solution configuration 
    ------ Skipped Build: Project: DipServer, Configuration: Debug Win32 ------
    Project not selected to build for this solution configuration 
    ------ Build started: Project: NiceVopyl, Configuration: Release Win32 ------
    Build started 11/10/2011 15:47:32.
    InitializeBuildStatus:
      Creating "Release\NiceVopyl.unsuccessfulbuild" because "AlwaysCreate" was specified.
    ClCompile:
      stdafx.cpp
      NiceVopyl.cpp
    NiceVopyl.cpp(137): warning C4800: 'BOOL' : forcing value to bool 'true' or 'false' (performance warning)
    NiceVopyl.cpp(226): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
              e:\Microsoft\Visual\VC\include\stdio.h(371) : see declaration of 'sprintf'
    NiceVopyl.cpp(235): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
              e:\Microsoft\Visual\VC\include\string.h(105) : see declaration of 'strcpy'
      VopylClasses.cpp
    VopylClasses.cpp(29): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
              e:\Microsoft\Visual\VC\include\string.h(105) : see declaration of 'strcpy'
    VopylClasses.cpp(291): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
              e:\Microsoft\Visual\VC\include\string.h(105) : see declaration of 'strcpy'
    VopylClasses.cpp(532): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
              e:\Microsoft\Visual\VC\include\stdio.h(371) : see declaration of 'sprintf'
      Generating Code...
    MakeDirsForLink:
      Creating directory "q:\".
    C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1029,5): error MSB3191: Unable to create directory "q:\". Could not find a part of the path 'q:\'.
    
    Build FAILED.
    
    Time Elapsed 00:00:14.14
    ========== Build: 0 succeeded, 4 failed, 0 up-to-date, 7 skipped ==========
    So I need some advice, I'm not sure whether its the version off Visual, the environment or the setup I'm working with. Or all 3 ;-)

  4. #4
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Building exe from existing source

    Could someone advise which version off Visual I should be using to build the executable without having to convert it?
    That one you have a project for in the sources. Look up for .sln/.vcproj files. The required version is specified inside.
    Best regards,
    Igor

  5. #5
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Building exe from existing source

    Quote Originally Posted by RebelAngel View Post
    ...
    Then I choose Build Solution.

    And then the following errors come up:

    Code:
    ------ Skipped Build: Project: CommCore, Configuration: Debug Win32 ------
    Project not selected to build for this solution configuration 
    ------ Build started: Project: gMotor, Configuration: Release Win32 ------
    Build started 11/10/2011 15:47:04.
    InitializeBuildStatus:
      Creating ".\../../_release/gMotor\gMotor.unsuccessfulbuild" because "AlwaysCreate" was specified.
    MakeDirsForCl:
      Creating directory "C:\Users\RebelAngel\Desktop\cossakcs2_patch01\3dlib\gMotor\.\..\..\_release\gMotor\asm".
    ClCompile:
      stdafx.cpp
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(231): error C2649: 'typename' : is not a 'class'
              c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(232) : see reference to class template instantiation 'Singleton<T>' being compiled
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(252): error C2649: 'typename' : is not a 'class'
              c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(253) : see reference to class template instantiation 'PSingleton<T>' being compiled
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\mSegmentSet.h(43): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\rsVertex.h(116): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    
    Build FAILED.
    
    Time Elapsed 00:00:09.39
    ------ Build started: Project: cossacks2, Configuration: Release Win32 ------
    Build started 11/10/2011 15:47:14.
    InitializeBuildStatus:
      Creating ".\../_release3d_inl/vc6\cossacks2.unsuccessfulbuild" because "AlwaysCreate" was specified.
    ClCompile:
      stdheader.cpp
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(231): error C2649: 'typename' : is not a 'class'
              c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(232) : see reference to class template instantiation 'Singleton<T>' being compiled
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(252): error C2649: 'typename' : is not a 'class'
              c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\kTemplates.hpp(253) : see reference to class template instantiation 'PSingleton<T>' being compiled
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\mSegmentSet.h(43): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\rebelangel\desktop\cossakcs2_patch01\3dlib\gmotor\rsVertex.h(116): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    C:\Users\RebelAngel\Desktop\cossakcs2_patch01\ClassEngine\ClassEngine.h(296): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\TopoGraf.h(70): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\TopoGraf.h(71): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\TopoGraf.h(72): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(767): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(767): error C2065: 'i' : undeclared identifier
    c:\users\rebelangel\desktop\cossakcs2_patch01\cossacks2\ClassEditor.h(767): error C2065: 'i' : undeclared identifier
    ...
    C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(1029,5): error MSB3191: Unable to create directory "q:\". Could not find a part of the path 'q:\'.
    
    Build FAILED.
    
    Time Elapsed 00:00:14.14
    ========== Build: 0 succeeded, 4 failed, 0 up-to-date, 7 skipped ==========
    1. About error C2649: 'typename' : is not a 'class'
    2. About error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    3. About error C2065: 'i' : undeclared identifier
    4. error MSB3191: Unable to create directory "q:\" - does the drive q: exists on your PC?
    Victor Nijegorodov

  6. #6
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Building exe from existing source

    Quote Originally Posted by RebelAngel View Post
    So I need some advice, I'm not sure whether its the version off Visual, the environment or the setup I'm working with. Or all 3 ;-)
    Most of those errors are due to the later versions of Visual C++ being ANSI C++ compliant.

    You cannot "convert" these errors -- you need to fix them, since the code you're compiling uses illegal C++ constructs.

    Regards,

    Paul McKenzie

  7. #7
    Join Date
    Oct 2011
    Posts
    9

    Re: Building exe from existing source

    That one you have a project for in the sources. Look up for .sln/.vcproj files. The required version is specified inside.
    I looked inside and it says version 8.0. So I'll install the 2005 version and see if that is any better. Thanks for that suggestion.

    error MSB3191: Unable to create directory "q:\" - does the drive q: exists on your PC?
    Meh, no I do not have a q: drive. An C: and an E: I have.




    Most of those errors are due to the later versions of Visual C++ being ANSI C++ compliant.

    You cannot "convert" these errors -- you need to fix them, since the code you're compiling uses illegal C++ constructs.
    Understood. I'll try with an earlier version off Visual C++ rather than fixing these errors myself and creating possibly more problems. Thanks

  8. #8
    Join Date
    Oct 2011
    Posts
    9

    Re: Building exe from existing source

    (Can't find no edit my post button, hope you dont mind double posting)

    As said in previous post. I opened the .sln file and it stated following:

    "Microsoft Visual Studio Solution File, Format Version 8.00
    Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cossacks2", "COSSACKS2\cossacks2.vcproj", "{60D954A2-8B83-46E3-9BCF-B614117E2F7D}"

    I read that as Version 8.00, hence Visual 2005, so I installed it but on running that version and opening the solution it's asking me to convert again, saying it was created in a previous version.
    What am I missing here? ( And should I install an even earlier version? 2003?)

  9. #9
    VictorN's Avatar
    VictorN is online now Super Moderator Power Poster
    Join Date
    Jan 2003
    Location
    Hanover Germany
    Posts
    20,396

    Re: Building exe from existing source

    Quote Originally Posted by RebelAngel View Post
    What am I missing here? ( And should I install an even earlier version? 2003?)
    Better would be fixing the errors...
    Victor Nijegorodov

  10. #10
    Join Date
    Oct 2011
    Posts
    9

    Re: Building exe from existing source

    Quote Originally Posted by VictorN View Post
    Better would be fixing the errors...

    I see your point. It's just, as you can tell from the above problems I'm encountering ( not been able to determine which version off VS it was build in myself,...) I still have a long way to go and I seriously doubt I have the knowledge and/or skills to start fixing additional errors which come up after converting it. (Unless you offer to help me to fix the errors ;-) )

    See, the way I'm looking at it, when the source was created an .exe was succesfully build from it then for the game and as such I should be able to reproduce that process given that I can create the same environment ( version, settings,...) as the developpers did back then.

    You may ask why I'm not using the .exe build then. Well, it's for a modification off the game, and before making any changes to the source itself I want to ensure that it builds the .exe properly from the original source without having to think I'm the one who made the errors by changing any lines off code.

    Hope that makes sense?


    So I tried on VS2003, it no longer asks me to convert trough the conversion wizard. It seems to open properly.

    I changed the properties off the projects from Q: to my E: drive (linkers, custom build settings,..)( still cant believe I missed that one at first)

    And then when building I get the following:

    Code:
    ------ Skipped Build: Project: CommCore, Configuration: Debug Win32 ------
    
    Project configuration skipped because it is not selected in this solution configuration
    
    
    ------ Build started: Project: gMotor, Configuration: Release Win32 ------
    
    Compiling...
    stdafx.cpp
    Compiling...
    FUclDecompress.cpp
    FLzoDecompress.cpp
    FG16RealTime.cpp
    vWater.cpp
    vStaticTerrain.cpp
    vShadowManager.cpp
    vMeshProcess.cpp
    vMesh.cpp
    vImpostorCache.cpp
    vAnimation.cpp
    gpMesh.cpp
    gpMediaManager.cpp
    csCameraController.cpp
    csBodyMover.cpp
    akField.cpp
    rsVertex.cpp
    rsTextureDX.cpp
    rsShaderCache.cpp
    rsSettings.cpp
    rsRenderSystemDX.cpp
    Generating Code...
    Compiling...
    rsRenderSystem.cpp
    rsRenderPool.cpp
    rsPrimitiveBufferDX.cpp
    rsPictureManagerDX.cpp
    rsDXErr.cpp
    rsDX.cpp
    rsDSSParser.cpp
    rsDeviceStates.cpp
    sndWavPlayer.cpp
    sndSoundTrack.cpp
    sndSoundSystem.cpp
    uiWidgetManager.cpp
    uiWidgetEditor.cpp
    uiWidget.cpp
    uiWeightEdit.cpp
    uiTransformTools.cpp
    uiTrackEdit.cpp
    uiSubtitles.cpp
    uiSceneEditor.cpp
    uiRenderFarm.cpp
    Generating Code...
    Compiling...
    uiRampEdit.cpp
    uiPropEditors.cpp
    uiPicture.cpp
    uiPhysicsEditor.cpp
    uiPalette.cpp
    uiObjectInspector.cpp
    uiNodeTree.cpp
    uiManipulator.cpp
    uiEffectEditor.cpp
    uiControl.cpp
    uiCameraTrack.cpp
    sgVSPS.cpp
    sgTexture.cpp
    sgTerrain.cpp
    sgSurfaceCache.cpp
    sgStatistics.cpp
    sgStateBlock.cpp
    sgSpriteManager.cpp
    sgSpriteCarcass.cpp
    sgSprite.cpp
    Generating Code...
    Compiling...
    sgSkybox.cpp
    sgShadow.cpp
    sgShader.cpp
    sgRoot.cpp
    sgReflection.cpp
    sgPipeline.cpp
    sgParticleSystem.cpp
    sgParticleEmitters.cpp
    sgParticleClusters.cpp
    sgParticleAffectors.cpp
    sgNodePool.cpp
    sgNode.cpp
    sgMovable.cpp
    sgModel.cpp
    sgLight.cpp
    sgLensFlare.cpp
    sgHardwareCaps.cpp
    sgGU16.cpp
    sgGU15.cpp
    sgGQuad.cpp
    Generating Code...
    Compiling...
    sgGN16.cpp
    sgGlyph.cpp
    sgGizmo.cpp
    sgGeometry.cpp
    sgG2D.cpp
    sgG17.cpp
    sgFont.cpp
    sgFog.cpp
    sgEffect.cpp
    sgDummy.cpp
    sgDeviceSettings.cpp
    sgDecal.cpp
    sgCursor.cpp
    sgController.cpp
    sgConstraint.cpp
    sgCamera.cpp
    sgBillboardGroup.cpp
    sgAssetNode.cpp
    sgApplication.cpp
    sgAnimBlend.cpp
    Generating Code...
    Compiling...
    kXMLParser.cpp
    kUuid.cpp
    kUtilities.cpp
    kTypeTraits.cpp
    kThread.cpp
    kSystemDialogs.cpp
    kStrUtil.cpp
    kString.cpp
    kStatistics.cpp
    kResource.cpp
    kResfile.cpp
    kPropertyMap.cpp
    kPoolAllocator.cpp
    kMemorySpy.cpp
    kLog.cpp
    kIOHelpers.cpp
    kIO.cpp
    kInput.cpp
    kHistory.cpp
    kFilePath.cpp
    Generating Code...
    Compiling...
    kFileMapping.cpp
    kDirIterator.cpp
    kContext.cpp
    kColorValue.cpp
    kCache.cpp
    kBmptool.cpp
    kAssert.cpp
    mVector.cpp
    mUtil.cpp
    mTriangle.cpp
    mTransform.cpp
    mSplines.cpp
    mSpatial.cpp
    mSkinSSE.cpp
    mSkin.cpp
    mShapes.cpp
    mSegmentSet.cpp
    mRandom.cpp
    mQuaternion.cpp
    mPlane.cpp
    Generating Code...
    Compiling...
    mOctree.cpp
    mNoise.cpp
    mMonteCarlo.cpp
    mMath2D.cpp
    mLodder.cpp
    mIntersect.cpp
    mHeightmap.cpp
    mGeom3D.cpp
    mFilter.cpp
    mAlgo.cpp
    sgG18.cpp
    Generating Code...
    Compiling...
    randtable.cpp
    huffman.cpp
    decompress.cpp
    crctable.cpp
    compress.cpp
    bzlib.cpp
    blocksort.cpp
    FLZDecoder.cpp
    FGANationMMX.cpp
    FG18G15.cpp
    FCompressor.cpp
    kXMLGrammar.cpp
    Generating Code...
    Compiling...
    sgNodeMaker.cpp
    Creating library...
    
    Build log was saved at "file://e:\Documents and Settings\Owner\Desktop\C2src\_release\gMotor\BuildLog.htm"
    gMotor - 0 error(s), 0 warning(s)
    
    
    ------ Build started: Project: cossacks2, Configuration: Release Win32 ------
    
    Compiling...
    stdheader.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    Compiling...
    3DGroundModels.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    script_lua_helper.cpp
    lua\lua_debugger\script_lua_helper.cpp(2) : fatal error C1083: Cannot open include file: 'lua_define.hpp': No such file or directory
    script_file.cpp
    lua\lua_debugger\script_file.cpp(2) : fatal error C1083: Cannot open include file: 'lua_define.hpp': No such file or directory
    script_debugger_utils.cpp
    lua\lua_debugger\script_debugger_utils.cpp(2) : fatal error C1083: Cannot open include file: 'lua_define.hpp': No such file or directory
    script_debugger_threads.cpp
    lua\lua_debugger\script_debugger_threads.cpp(2) : fatal error C1083: Cannot open include file: 'lua_define.hpp': No such file or directory
    script_debugger.cpp
    lua\lua_debugger\script_debugger.cpp(2) : fatal error C1083: Cannot open include file: 'lua_define.hpp': No such file or directory
    script_callStack.cpp
    lua\lua_debugger\script_callStack.cpp(2) : fatal error C1083: Cannot open include file: 'lua_define.hpp': No such file or directory
    binde_function.cpp
    lua\binde_to_lua\binde_function.cpp(2) : fatal error C1083: Cannot open include file: '../../BE_HEADERS.h': No such file or directory
    binde_class.cpp
    lua\binde_to_lua\binde_class.cpp(2) : fatal error C1083: Cannot open include file: '../../BE_HEADERS.h': No such file or directory
    CUniversalMapClipboard.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    CUniversalMapClipboard.cpp(614) : warning C4533: initialization of 'v2' is skipped by 'goto CUniversalMapClipboard_unInit'
            CUniversalMapClipboard.cpp(594) : see declaration of 'v2'
            CUniversalMapClipboard.cpp(614) : see declaration of 'CUniversalMapClipboard_unInit'
    CUniversalMapClipboard.cpp(614) : warning C4533: initialization of 'v1' is skipped by 'goto CUniversalMapClipboard_unInit'
            CUniversalMapClipboard.cpp(594) : see declaration of 'v1'
            CUniversalMapClipboard.cpp(614) : see declaration of 'CUniversalMapClipboard_unInit'
    CUniversalMapClipboard.cpp(614) : warning C4533: initialization of 'v0' is skipped by 'goto CUniversalMapClipboard_unInit'
            CUniversalMapClipboard.cpp(594) : see declaration of 'v0'
            CUniversalMapClipboard.cpp(614) : see declaration of 'CUniversalMapClipboard_unInit'
    CSun.cpp
    CCombineExtension.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    SurfaceOperations.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    SurfaceGenerator.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    Surface.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    Probe.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    Booleans.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    UnitTypeGroup.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    ListUnit.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    FileDialog.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    Generating Code...
    e:\documents and settings\owner\desktop\c2src\cossacks2\booleans.cpp(823) : warning C4715: 'CMesh3D::FillNormals' : not all control paths return a value
    e:\documents and settings\owner\desktop\c2src\cossacks2\booleans.cpp(2285) : warning C4715: 'CMesh2D2BaseMesh' : not all control paths return a value
    e:\documents and settings\owner\desktop\c2src\cossacks2\booleans.cpp(2419) : warning C4715: 'Sections2BaseMesh' : not all control paths return a value
    e:\documents and settings\owner\desktop\c2src\cossacks2\booleans.cpp(2473) : warning C4715: 'Vertices2BaseMesh' : not all control paths return a value
    e:\documents and settings\owner\desktop\c2src\cossacks2\booleans.cpp(1978) : warning C4715: 'MeshSectionClassify2D' : not all control paths return a value
    e:\documents and settings\owner\desktop\c2src\cossacks2\csun.h(26) : warning C4715: 'CSun::AddSource' : not all control paths return a value
    at the last line ( with csun.h ) it seems to hang there and not do anything anymore. Not sure why.

  11. #11
    Join Date
    Mar 2001
    Posts
    2,529

    Re: Building exe from existing source

    Looks like either you are missing some files or they are not in the right path. Did you try to find these files?
    ahoodin
    To keep the plot moving, that's why.

  12. #12
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Building exe from existing source

    ( And should I install an even earlier version? 2003?)
    Yes, solution file format version 8.00 means VS.NET2003.
    Best regards,
    Igor

  13. #13
    Join Date
    Oct 2011
    Posts
    9

    Re: Building exe from existing source

    Quote Originally Posted by ahoodin View Post
    Looks like either you are missing some files or they are not in the right path. Did you try to find these files?

    fatal error C1083: Cannot open include file: 'lua_define.hpp': No such file or directory

    fatal error C1083: Cannot open include file: '../../BE_HEADERS.h': No such file or directory




    I looked up these 2 files to see if they were there. They both are present in the solution explorer. So why do I get this error then?

  14. #14
    Join Date
    Feb 2002
    Posts
    4,640

    Re: Building exe from existing source

    They are not being found in your include path. The "Solution Explorer" is not the same as the include path that the compiler uses.

    Viggy

  15. #15
    Join Date
    Oct 2011
    Posts
    9

    Re: Building exe from existing source

    Ok, those 2 above mentionned missing file errors are gone now.

    I build again and get following output:
    Code:
    ------ Skipped Build: Project: CommCore, Configuration: Debug Win32 ------
    
    Project configuration skipped because it is not selected in this solution configuration
    
    
    ------ Build started: Project: gMotor, Configuration: Release Win32 ------
    
    gMotor - up-to-date.
    
    
    ------ Build started: Project: cossacks2, Configuration: Release Win32 ------
    
    Compiling...
    3DGroundModels.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    script_lua_helper.cpp
    script_file.cpp
    script_debugger_utils.cpp
    script_debugger_threads.cpp
    script_debugger.cpp
    script_callStack.cpp
    binde_function.cpp
    binde_class.cpp
    CUniversalMapClipboard.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    CUniversalMapClipboard.cpp(614) : warning C4533: initialization of 'v2' is skipped by 'goto CUniversalMapClipboard_unInit'
            CUniversalMapClipboard.cpp(594) : see declaration of 'v2'
            CUniversalMapClipboard.cpp(614) : see declaration of 'CUniversalMapClipboard_unInit'
    CUniversalMapClipboard.cpp(614) : warning C4533: initialization of 'v1' is skipped by 'goto CUniversalMapClipboard_unInit'
            CUniversalMapClipboard.cpp(594) : see declaration of 'v1'
            CUniversalMapClipboard.cpp(614) : see declaration of 'CUniversalMapClipboard_unInit'
    CUniversalMapClipboard.cpp(614) : warning C4533: initialization of 'v0' is skipped by 'goto CUniversalMapClipboard_unInit'
            CUniversalMapClipboard.cpp(594) : see declaration of 'v0'
            CUniversalMapClipboard.cpp(614) : see declaration of 'CUniversalMapClipboard_unInit'
    CSun.cpp
    CCombineExtension.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    SurfaceOperations.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    SurfaceGenerator.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    ExMapGenerator.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    TextVisualElements.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    PlaceInAJob.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    mdParser.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    mdParser.cpp(49) : warning C4172: returning address of local variable or temporary
    MapDownload.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    LineOfReasoning.cpp
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    Generating Code...
    This one comes up a lot:

    Code:
    should not include d3dtypes.h when compiling for DX8 or newer interfaces
    What do I do with this one?

    Eg. in PlaceInAJob.cpp this appears so the build output says:
    Code:
    //-----------------------------------------------------------------------------------------------------------------//
    #include "stdheader.h"
    #include "GameExtension.h"
    #include "PlaceInAJob.h"
    //-----------------------------------------------------------------------------------------------------------------//
    extern int AnimTime;
    void TakeResLink(OneObject* OBJ);
    void TakeResources(UnitsGroup* UGR,byte Type,byte NI,byte ResType,GAMEOBJ* Zone);
    void UGR_TakeResourcesLink(UnitsGroup* UGR);
    void SetScreenCenterToXY(int x, int y);
    //-----------------------------------------------------------------------------------------------------------------//
    void PlaceInAJob::OnGameStart()
    {
    	LastProcessTime=4*25*256;
    }
    void PlaceInAJob::ProcessingGame()
    {
    	const byte NRes=6;
    	if(GSets.PeasantAutoWork&&(LastProcessTime+4*25*256)<AnimTime)
    	{
    		for(byte i=0;i<8;i++)
    		{
    			if(GSets.CGame.isHumanPlayer(i))
    			{
    				word* id=NatList[i];
    				int   n=NtNUnits[i];
    				int NotWork=0;
    				int InWork=0;
    				int InRes[NRes];
    				memset(InRes,0,sizeof InRes);
    				int Cx=0;
    				int Cy=0;
    				for(int j=0;j<n;j++)
    				{
    					OneObject* OB=Group[id[j]];
    					if(OB)
    					{
    						NewMonster* NM=OB->newMons;
    						if(NM->Peasant)
    						{
    							if(OB->StandTime>200&&!OB->LocalOrder)
    							{
    								NotWork++;
    							}
    							else
    							{
    								Order1* Ord=OB->LocalOrder;
    								while(Ord)
    								{
    									if(Ord->DoLink==&TakeResLink)
    									{
    										byte ResType=Ord->info.TakeRes.ResID;
    										if(ResType<NRes)
    										{
    											InRes[ResType]++;
    											InWork++;
    											Cx+=OB->RealX/16;
    											Cy+=OB->RealY/16;
    											break;
    										}
    									}
    									Ord=Ord->NextOrder;
    								}
    							}
    						}
    					}
    				}
    				if(NotWork&&InWork)
    				{
    					Cx/=InWork;
    					Cy/=InWork;
    					static UnitsGroup UG[NRes];
    					for(byte k=0;k<NRes;k++)
    					{
    						UG[k].Clear();
    						InRes[k]=(InRes[k]*NotWork*100)/InWork;
    					}
    					int lastres=-1;
    					for(int j=0;j<n;j++)
    					{
    						OneObject* OB=Group[id[j]];
    						if(OB)
    						{
    							NewMonster* NM=OB->newMons;
    							if(NM->Peasant&&OB->StandTime>200&&(!OB->LocalOrder)&&Norma(OB->RealX/16-Cx,OB->RealY/16-Cy)<2000)
    							{
    								bool st=false;
    								for(byte f=0;f<NRes;f++)
    								{
    									if(InRes[f]>0)
    									{
    										UG[f].AddNewUnit(OB);
    										InRes[f]-=100;
    										lastres=f;
    										st=true;
    									}
    								}
    								if(!st&&lastres!=-1)
    									UG[lastres].AddNewUnit(OB);
    							}
    						}
    					}
    					for(byte r=0;r<NRes;r++)
    					{
    						TakeResources(&UG[r],0,i,r,NULL);
    						UGR_TakeResourcesLink(&UG[r]);
    					}
    				}
    			}
    		}
    		LastProcessTime=AnimTime;
    	}
    }
    void PlaceInAJob::OnInitAfterMapLoading()
    {
    	int CurNat=GSets.CGame.cgi_NatRefTBL[MyNation];
    	word* id=NatList[CurNat];
    	int   n=NtNUnits[CurNat];
    	int cx=0;
    	int cy=0;
    	int nc=0;
    	int cpx=0;
    	int cpy=0;
    	int ncp=0;
    	for(int j=0;j<n;j++)
    	{
    		OneObject* OB=Group[id[j]];
    		if(OB)
    		{
    			NewMonster* NM=OB->newMons;
    			if(NM->Peasant)
    			{
    				cpx+=OB->RealX/16;
    				cpy+=OB->RealY/16;
    				ncp++;
    			}
    			cx+=OB->RealX/16;
    			cy+=OB->RealY/16;
    			nc++;
    		}
    	}
    	if(ncp)
    	{
    		SetScreenCenterToXY(cpx/ncp,cpy/ncp);
    		//CITY[CurNat].CenterX=cpx/ncp;
    		//CITY[CurNat].CenterY=cpy/ncp;
    	}
    	else
    		if(nc)
    		{
    			SetScreenCenterToXY(cx/nc,cy/nc);
    			//CITY[CurNat].CenterX=cx/nc;
    			//CITY[CurNat].CenterY=cy/nc;
    		}
    }
    //-----------------------------------------------------------------------------------------------------------------//

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured