Visual C++, Code::Blocks

Get technical support about the C++ source code and about Lua scripts for maps, entities, GUIs, the console, materials, etc. Also covered are the Cafu libraries and APIs, as well as compiling, linking, and the build system.
Post Reply
DiViNiTY
Posts: 5
Joined: 2010-01-24, 20:22

Visual C++, Code::Blocks

Post by DiViNiTY » 2010-01-24, 20:31

Hi,

i tried to compile the CaFu engine with Scons without succes.
So i ask you if can make a .SLN or .CBP Project file for compiling
with Visual C++ or Code::Blocks.
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Visual C++, Code::Blocks

Post by Carsten » 2010-01-25, 11:55

Hi Divinity,
welcome to the Cafu forums! :welcome:

What exactly didn't work?
Best regards,
Carsten
DiViNiTY
Posts: 5
Joined: 2010-01-24, 20:22

Re: Visual C++, Code::Blocks

Post by DiViNiTY » 2010-01-25, 14:25

I think i must set the Path to the Include files in Microsoft Platform SDK 2003.
So i set the PATH = C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include; on the Command Line.

Here is the Error Log:

D:\GAMEDESIGN\Ca3DE-9.06-win32\Cafu-src-r39>scons -Q
os.chdir('ExtLibs/wxWidgets/build/msw')
nmake /nologo /f makefile.vc BUILD=debug SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=stat
ic COMPILER_PREFIX=vc9
cl /c /nologo /TC /Fovc9_mswud\wxtiff_tif_win32.obj /MTd /DWIN32 /Zi /F
d..\..\lib\vc9_lib\wxtiffd.pdb /D_DEBUG /Od /I..\..\src\zlib /I..\..\src\jpeg
/I..\..\src\tiff\libtiff ..\..\src\tiff\libtiff\tif_win32.c
tif_win32.c
..\..\src\tiff\libtiff\tif_win32.c(33) : fatal error C1083: Cannot open include
file: 'windows.h': No such file or directory
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\cl.EXE"' : return code '0x2'
Stop.
os.chdir('D:\\GAMEDESIGN\\Ca3DE-9.06-win32\\Cafu-src-r39')
scons: *** Error 2

May be a Noob question but i don't knew how to link to "windows.h" on command line...
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Visual C++, Code::Blocks

Post by Carsten » 2010-01-25, 17:34

Dear Divinity,

SCons normally detects the installed version of the VC++ compiler automatically.
It doesn't help to set any env-vars at the command-line though, as SCons runs the compile commands in "clean" environments (rather than envs inherited from the command-line).

As it seems that there is a problem with SCons detecting your VC++ install, please let us know:
  • Which version of VC++ do you use? (If more than one version, which ones?)
  • How did you install the Windows SDK? Which version?
  • Which OS and which version?
  • Can you please apply the following patch:

    Code: Select all

    Index: SConstruct
    ===================================================================
    --- SConstruct  (Revision 41)
    +++ SConstruct  (Arbeitskopie)
    @@ -278,6 +278,7 @@
     if "p" in BVs: SConscript('ExtLibs/zlib/SConscript', exports={'env':envProfile}, build_dir="ExtLibs/zlib/"+my_build_dir_prf, duplicate=0)
    
     # Compile wxWidgets for the current platform.
    +print envDebug.Dump();
     if sys.platform=="win32":
         # Make sure the "compiler" string begins with "vc" and is three characters long.
         if compiler[0]=='v' and compiler[1]=='c' and len(compiler)==3:
    
    That is, in words, insert line print envDebug.Dump(); after line 280 in file SConstruct, and post the full output here?
Thanks! :cheesy:
Best regards,
Carsten
DiViNiTY
Posts: 5
Joined: 2010-01-24, 20:22

Re: Visual C++, Code::Blocks

Post by DiViNiTY » 2010-01-25, 18:53

Ok,

I use VC++ 2005 Express(German version) and VC++ 2008 Express(English version) --> maybe that's a problem having German+English version
Microsoft Platform SDK for Windows Server 2003 R2 (downloaded an ISO from Microsoft)
Windows Vista 32 Bit Home Premium

I installed Python 2.4 then 2.5 and now 2.6.4 + SCons 1.2.0.d20100117

here is the Output:

Code: Select all

{ 'AR': 'lib',
  'ARCOM': "${TEMPFILE('$AR $ARFLAGS /OUT:$TARGET $SOURCES')}",
  'ARFLAGS': ['/nologo'],
  'AS': 'ml',
  'ASCOM': '$AS $ASFLAGS /c /Fo$TARGET $SOURCES',
  'ASFLAGS': ['/nologo'],
  'ASPPCOM': '$CC $ASPPFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS /c /Fo$TARGET 

$SOURCES',
  'ASPPFLAGS': '$ASFLAGS',
  'BUILDERS': {'CopyAs': <SCons.Builder.BuilderBase instance at 0x02982A58>, 

'LoadableModule': <SCons.Builder.BuilderBase instance at 0x0298A288>, 'SharedLibrary': 

<SCons.Builder.BuilderBase instance at 0x0298A850>, 'Zip': <SCons.Builder.BuilderBase 

instance at 0x02973A80>, 'MSVSProject': <SCons.Builder.BuilderBase instance at 

0x029B0288>, 'RES': <SCons.Builder.BuilderBase instance at 0x029B0468>, 'TypeLibrary': 

<SCons.Builder.BuilderBase instance at 0x0297C7D8>, 'Object': 

<SCons.Builder.CompositeBuilder instance at 0x0298AB70>, 'CopyTo': 

<SCons.Builder.BuilderBase instance at 0x0297EB48>, 'StaticLibrary': 

<SCons.Builder.BuilderBase instance at 0x0298F1E8>, 'JavaClassFile': 

<SCons.Builder.BuilderBase instance at 0x0298FE90>, 'PCH': <SCons.Builder.BuilderBase 

instance at 0x029B03A0>, 'Program': <SCons.Builder.BuilderBase instance at 0x0298A8F0>, 

'Library': <SCons.Builder.BuilderBase instance at 0x0298F1E8>, 'JavaClassDir': 

<SCons.Builder.BuilderBase instance at 0x0298FFA8>, 'SharedObject': 

<SCons.Builder.CompositeBuilder instance at 0x0298ADC8>, 'StaticObject': 

<SCons.Builder.CompositeBuilder instance at 0x0298AB70>, 'MSVSSolution': 

<SCons.Builder.BuilderBase instance at 0x029B0300>, 'JavaFile': 

<SCons.Builder.CompositeBuilder instance at 0x0298FD78>},
  'CC': 'cl',
  'CCCOM': '$CC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CFLAGS $CCFLAGS $_CCCOMCOM',
  'CCFLAGS': ['/nologo', '/GR', '/EHsc', '/MTd', '/Od', '/Z7', '/RTC1'],
  'CCPCHFLAGS': ['${(PCH and "/Yu%s /Fp%s"%(PCHSTOP or "",File(PCH))) or ""}'],
  'CCPDBFLAGS': ['${(PDB and "/Z7") or ""}'],
  'CFILESUFFIX': '.c',
  'CFLAGS': [],
  'CONFIGUREDIR': '#/.sconf_temp',
  'CONFIGURELOG': '#/config.log',
  'COPYSTR': 'Copy file(s): "$SOURCES" to "$TARGETS"',
  'CPPDEFINES': [ '_CRT_SECURE_NO_DEPRECATE',
                  '_CRT_NONSTDC_NO_DEPRECATE',
                  'DEBUG'],
  'CPPDEFPREFIX': '/D',
  'CPPDEFSUFFIX': '',
  'CPPSUFFIXES': [ '.c',
                   '.C',
                   '.cxx',
                   '.cpp',
                   '.c++',
                   '.cc',
                   '.h',
                   '.H',
                   '.hxx',
                   '.hpp',
                   '.hh',
                   '.F',
                   '.fpp',
                   '.FPP',
                   '.m',
                   '.mm',
                   '.S',
                   '.spp',
                   '.SPP'],
  'CXX': '$CC',
  'CXXCOM': '$CXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $CXXFLAGS $CCFLAGS 

$_CCCOMCOM',
  'CXXFILESUFFIX': '.cc',
  'CXXFLAGS': ['$(', '/TP', '$)'],
  'DSUFFIXES': ['.d'],
  'Dir': <SCons.Defaults.Variable_Method_Caller instance at 0x028A7A30>,
  'Dirs': <SCons.Defaults.Variable_Method_Caller instance at 0x028A7A58>,
  'ENV': { 'COMSPEC': 'C:\\Windows\\system32\\cmd.exe',
           'INCLUDE': 'C:\\Program Files\\Microsoft Visual Studio 9.0

\\VC\\ATLMFC\\INCLUDE;C:\\Program Files\\Microsoft Visual Studio 9.0

\\VC\\INCLUDE;C:\\Program Files\\Microsoft Visual Studio 9.0

\\VC\\PlatformSDK\\include',
           'LIB': 'C:\\Program Files\\Microsoft Visual Studio 9.0

\\VC\\ATLMFC\\LIB;C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\LIB;C:\\Program 

Files\\Microsoft Visual Studio 9.0\\VC\\PlatformSDK\\lib',
           'LIBPATH': 'Framework32\\;Framework32\\v2.0.50727;C:\\Program 

Files\\Microsoft Visual Studio 9.0\\VC\\ATLMFC\\LIB;C:\\Program Files\\Microsoft Visual 

Studio 9.0\\VC\\LIB',
           'PATH': u'C:\\Program Files\\Microsoft Visual Studio 9.0\\Common7

\\IDE;C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\BIN;C:\\Program 

Files\\Microsoft Visual Studio 9.0\\Common7\\Tools;C:\\Program Files\\Microsoft Visual 

Studio 9.0\\Common7\\Tools\\bin;Framework32\\;Framework32\\\\Microsoft .NET Framework 

3.5 (Pre-Release Version);Framework32\\v2.0.50727;C:\\Program Files\\Microsoft Visual 

Studio 9.0\\VC\\VCPackages;C:\\Program Files\\Microsoft Visual Studio 9.0

\\VC\\PlatformSDK\\bin;C:\\Program Files\\Python_2.6.4\\Scripts\\;C:\\Program 

Files\\Python_2.6.4\\Scripts\\..;C:\\Windows\\System32',
           'PATHEXT': '.COM;.EXE;.BAT;.CMD',
           'SystemDrive': 'C:',
           'SystemRoot': 'C:\\Windows',
           'TEMP': 'C:\\Users\\User\\AppData\\Local\\Temp',
           'TMP': 'C:\\Users\\User\\AppData\\Local\\Temp'},
  'ESCAPE': <function escape at 0x02901A70>,
  'F77': 'gfortran',
  'F77COM': '$F77 -o $TARGET -c $F77FLAGS $_F77INCFLAGS $SOURCES',
  'F77FLAGS': [],
  'F77PPCOM': '$F77 -o $TARGET -c $F77FLAGS $CPPFLAGS $_CPPDEFFLAGS $_F77INCFLAGS 

$SOURCES',
  'F90': 'gfortran',
  'F90COM': '$F90 -o $TARGET -c $F90FLAGS $_F90INCFLAGS $_FORTRANMODFLAG $SOURCES',
  'F90FLAGS': [],
  'F90PPCOM': '$F90 -o $TARGET -c $F90FLAGS $CPPFLAGS $_CPPDEFFLAGS $_F90INCFLAGS 

$_FORTRANMODFLAG $SOURCES',
  'F95': 'gfortran',
  'F95COM': '$F95 -o $TARGET -c $F95FLAGS $_F95INCFLAGS $_FORTRANMODFLAG $SOURCES',
  'F95FLAGS': [],
  'F95PPCOM': '$F95 -o $TARGET -c $F95FLAGS $CPPFLAGS $_CPPDEFFLAGS $_F95INCFLAGS 

$_FORTRANMODFLAG $SOURCES',
  'FORTRAN': 'gfortran',
  'FORTRANCOM': '$FORTRAN -o $TARGET -c $FORTRANFLAGS $_FORTRANINCFLAGS 

$_FORTRANMODFLAG $SOURCES',
  'FORTRANFLAGS': [],
  'FORTRANMODDIR': '',
  'FORTRANMODDIRPREFIX': '',
  'FORTRANMODDIRSUFFIX': '',
  'FORTRANMODPREFIX': '',
  'FORTRANMODSUFFIX': '.mod',
  'FORTRANPPCOM': '$FORTRAN -o $TARGET -c $FORTRANFLAGS $CPPFLAGS $_CPPDEFFLAGS 

$_FORTRANINCFLAGS $_FORTRANMODFLAG $SOURCES',
  'FORTRANSUFFIXES': [ '.f',
                       '.for',
                       '.ftn',
                       '.F',
                       '.FOR',
                       '.FTN',
                       '.fpp',
                       '.FPP',
                       '.f77',
                       '.F77',
                       '.f90',
                       '.F90',
                       '.f95',
                       '.F95'],
  'File': <SCons.Defaults.Variable_Method_Caller instance at 0x028A7A80>,
  'GET_MSVSPROJECTSUFFIX': <function GetMSVSProjectSuffix at 0x029B1970>,
  'GET_MSVSSOLUTIONSUFFIX': <function GetMSVSSolutionSuffix at 0x029B19B0>,
  'HOST_ARCH': 'x86',
  'HOST_OS': 'win32',
  'IDLSUFFIXES': ['.idl', '.IDL'],
  'INCF77PREFIX': '-I',
  'INCF77SUFFIX': '',
  'INCF90PREFIX': '-I',
  'INCF90SUFFIX': '',
  'INCF95PREFIX': '-I',
  'INCF95SUFFIX': '',
  'INCFORTRANPREFIX': '-I',
  'INCFORTRANSUFFIX': '',
  'INCPREFIX': '/I',
  'INCSUFFIX': '',
  'JAVABOOTCLASSPATH': [],
  'JAVAC': 'javac',
  'JAVACCOM': "${TEMPFILE('$_JAVACCOM')}",
  'JAVACFLAGS': [],
  'JAVACLASSPATH': [],
  'JAVACLASSSUFFIX': '.class',
  'JAVASOURCEPATH': [],
  'JAVASUFFIX': '.java',
  'LDMODULE': '$SHLINK',
  'LDMODULECOM': <SCons.Action.ListAction instance at 0x029B74B8>,
  'LDMODULEEMITTER': [<function ldmodEmitter at 0x029B6370>],
  'LDMODULEFLAGS': '$SHLINKFLAGS',
  'LDMODULEPREFIX': '$SHLIBPREFIX',
  'LDMODULESUFFIX': '$SHLIBSUFFIX',
  'LIBDIRPREFIX': '/LIBPATH:',
  'LIBDIRSUFFIX': '',
  'LIBLINKPREFIX': '',
  'LIBLINKSUFFIX': '$LIBSUFFIX',
  'LIBPREFIX': '',
  'LIBPREFIXES': ['$LIBPREFIX'],
  'LIBSUFFIX': '.lib',
  'LIBSUFFIXES': ['$LIBSUFFIX'],
  'LINK': 'link',
  'LINKCOM': '${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows $_LIBDIRFLAGS 

$_LIBFLAGS $_PDB $SOURCES.windows")}',
  'LINKFLAGS': ['/nologo', '/incremental:no', '/debug'],
  'MAXLINELENGTH': 2048,
  'MIDL': 'MIDL.EXE',
  'MIDLCOM': '$MIDL $MIDLFLAGS /tlb ${TARGETS[0]} /h ${TARGETS[1]} /iid ${TARGETS[2]} 

/proxy ${TARGETS[3]} /dlldata ${TARGETS[4]} $SOURCE 2> NUL',
  'MIDLFLAGS': ['/nologo'],
  'MSVC_SETUP_RUN': True,
  'MSVC_VERSION': '9.0',
  'MSVS': { 'PROJECTSUFFIX': '.vcproj', 'SOLUTIONSUFFIX': '.sln'},
  'MSVSBUILDCOM': '$MSVSSCONSCOM "$MSVSBUILDTARGET"',
  'MSVSCLEANCOM': '$MSVSSCONSCOM -c "$MSVSBUILDTARGET"',
  'MSVSENCODING': 'Windows-1252',
  'MSVSPROJECTCOM': <SCons.Action.FunctionAction instance at 0x029B0030>,
  'MSVSPROJECTSUFFIX': '${GET_MSVSPROJECTSUFFIX}',
  'MSVSREBUILDCOM': '$MSVSSCONSCOM "$MSVSBUILDTARGET"',
  'MSVSSCONS': '"$$(PYTHON_ROOT)\\python.exe" -c "from os.path import join; import sys; 

sys.path = [ join(sys.prefix, \'Lib\', \'site-packages\', \'scons-1.2.0.d20100117\'), 

join(sys.prefix, \'scons-1.2.0.d20100117\'), join(sys.prefix, \'Lib\', \'site-

packages\', \'scons\'), join(sys.prefix, \'scons\') ] + sys.path; import SCons.Script; 

SCons.Script.main()"',
  'MSVSSCONSCOM': '$MSVSSCONS $MSVSSCONSFLAGS',
  'MSVSSCONSCRIPT': <SCons.Node.FS.File instance at 0x029057B0>,
  'MSVSSCONSFLAGS': '-C "${MSVSSCONSCRIPT.dir.abspath}" -f ${MSVSSCONSCRIPT.name}',
  'MSVSSOLUTIONCOM': <SCons.Action.FunctionAction instance at 0x029B0148>,
  'MSVSSOLUTIONSUFFIX': '${GET_MSVSSOLUTIONSUFFIX}',
  'MSVS_VERSION': '9.0',
  'OBJPREFIX': '',
  'OBJSUFFIX': '.obj',
  'PCHCOM': '$CXX /Fo${TARGETS[1]} $CXXFLAGS $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS 

$_CPPINCFLAGS /c $SOURCES /Yc$PCHSTOP /Fp${TARGETS[0]} $CCPDBFLAGS $PCHPDBFLAGS',
  'PCHPDBFLAGS': ['${(PDB and "/Yd") or ""}'],
  'PLATFORM': 'win32',
  'PROGEMITTER': [<function prog_emitter at 0x029B63B0>],
  'PROGPREFIX': '',
  'PROGSUFFIX': '.exe',
  'PSPAWN': <function piped_spawn at 0x029019B0>,
  'RC': 'rc',
  'RCCOM': '$RC $_CPPDEFFLAGS $_CPPINCFLAGS $RCFLAGS /fo$TARGET $SOURCES',
  'RCFLAGS': [],
  'RCSUFFIXES': ['.rc', '.rc2'],
  'RDirs': <SCons.Defaults.Variable_Method_Caller instance at 0x028A7AA8>,
  'REGSVR': u'C:\\Windows\\System32\\regsvr32',
  'REGSVRACTION': <SCons.Action.FunctionAction instance at 0x029B7490>,
  'REGSVRCOM': '$REGSVR $REGSVRFLAGS ${TARGET.windows}',
  'REGSVRFLAGS': '/s ',
  'SCANNERS': [],
  'SCONS_HOME': None,
  'SHCC': '$CC',
  'SHCCCOM': '$SHCC $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCFLAGS $SHCCFLAGS 

$_CCCOMCOM',
  'SHCCFLAGS': ['$CCFLAGS'],
  'SHCFLAGS': ['$CFLAGS'],
  'SHCXX': '$CXX',
  'SHCXXCOM': '$SHCXX $_MSVC_OUTPUT_FLAG /c $CHANGED_SOURCES $SHCXXFLAGS $SHCCFLAGS 

$_CCCOMCOM',
  'SHCXXFLAGS': ['$CXXFLAGS'],
  'SHELL': u'C:\\Windows\\System32\\cmd.exe',
  'SHF77': '$F77',
  'SHF77COM': '$SHF77 -o $TARGET -c $SHF77FLAGS $_F77INCFLAGS $SOURCES',
  'SHF77FLAGS': ['$F77FLAGS'],
  'SHF77PPCOM': '$SHF77 -o $TARGET -c $SHF77FLAGS $CPPFLAGS $_CPPDEFFLAGS $_F77INCFLAGS 

$SOURCES',
  'SHF90': '$F90',
  'SHF90COM': '$SHF90 -o $TARGET -c $SHF90FLAGS $_F90INCFLAGS $_FORTRANMODFLAG 

$SOURCES',
  'SHF90FLAGS': ['$F90FLAGS'],
  'SHF90PPCOM': '$SHF90 -o $TARGET -c $SHF90FLAGS $CPPFLAGS $_CPPDEFFLAGS $_F90INCFLAGS 

$_FORTRANMODFLAG $SOURCES',
  'SHF95': '$F95',
  'SHF95COM': '$SHF95 -o $TARGET -c $SHF95FLAGS $_F95INCFLAGS $_FORTRANMODFLAG 

$SOURCES',
  'SHF95FLAGS': ['$F95FLAGS'],
  'SHF95PPCOM': '$SHF95 -o $TARGET -c $SHF95FLAGS $CPPFLAGS $_CPPDEFFLAGS $_F95INCFLAGS 

$_FORTRANMODFLAG $SOURCES',
  'SHFORTRAN': '$FORTRAN',
  'SHFORTRANCOM': '$SHFORTRAN -o $TARGET -c $SHFORTRANFLAGS $_FORTRANINCFLAGS 

$_FORTRANMODFLAG $SOURCES',
  'SHFORTRANFLAGS': ['$FORTRANFLAGS'],
  'SHFORTRANPPCOM': '$SHFORTRAN -o $TARGET -c $SHFORTRANFLAGS $CPPFLAGS $_CPPDEFFLAGS 

$_FORTRANINCFLAGS $_FORTRANMODFLAG $SOURCES',
  'SHLIBEMITTER': [<function windowsLibEmitter at 0x029B6330>],
  'SHLIBPREFIX': '',
  'SHLIBSUFFIX': '.dll',
  'SHLINK': '$LINK',
  'SHLINKCOM': <SCons.Action.ListAction instance at 0x029B7468>,
  'SHLINKFLAGS': ['$LINKFLAGS', '/dll'],
  'SHOBJPREFIX': '$OBJPREFIX',
  'SHOBJSUFFIX': '$OBJSUFFIX',
  'SPAWN': <function spawn at 0x02901A30>,
  'STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME': 1,
  'TARGET_ARCH': 'x86',
  'TARGET_OS': 'win32',
  'TEMPFILE': <class SCons.Platform.TempFileMunge at 0x028B00C0>,
  'TEMPFILEPREFIX': '@',
  'TOOLS': [ 'default',
             'mslink',
             'msvc',
             'gfortran',
             'masm',
             'mslib',
             'filesystem',
             'javac',
             'zip',
             'msvs',
             'midl'],
  'WIN32DEFPREFIX': '',
  'WIN32DEFSUFFIX': '.def',
  'WIN32EXPPREFIX': '',
  'WIN32EXPSUFFIX': '.exp',
  'WIN32_INSERT_DEF': 0,
  'WINDOWSDEFPREFIX': '${WIN32DEFPREFIX}',
  'WINDOWSDEFSUFFIX': '${WIN32DEFSUFFIX}',
  'WINDOWSEXPPREFIX': '${WIN32EXPPREFIX}',
  'WINDOWSEXPSUFFIX': '${WIN32EXPSUFFIX}',
  'WINDOWSPROGMANIFESTPREFIX': '',
  'WINDOWSPROGMANIFESTSUFFIX': '${PROGSUFFIX}.manifest',
  'WINDOWSSHLIBMANIFESTPREFIX': '',
  'WINDOWSSHLIBMANIFESTSUFFIX': '${SHLIBSUFFIX}.manifest',
  'WINDOWS_INSERT_DEF': '${WIN32_INSERT_DEF}',
  'WIXCANDLE': 'candle.exe',
  'WIXLIGHT': 'light.exe',
  'ZIP': 'zip',
  'ZIPCOM': <SCons.Action.FunctionAction instance at 0x02973A58>,
  'ZIPCOMPRESSION': 8,
  'ZIPFLAGS': [],
  'ZIPSUFFIX': '.zip',
  '_CCCOMCOM': '$CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS $CCPCHFLAGS $CCPDBFLAGS',
  '_CPPDEFFLAGS': '${_defines(CPPDEFPREFIX, CPPDEFINES, CPPDEFSUFFIX, __env__)}',
  '_CPPINCFLAGS': '$( ${_concat(INCPREFIX, CPPPATH, INCSUFFIX, __env__, RDirs, TARGET, 

SOURCE)} $)',
  '_F77INCFLAGS': '$( ${_concat(INCF77PREFIX, F77PATH, INCF77SUFFIX, __env__, RDirs, 

TARGET, SOURCE)} $)',
  '_F90INCFLAGS': '$( ${_concat(INCF90PREFIX, F90PATH, INCF90SUFFIX, __env__, RDirs, 

TARGET, SOURCE)} $)',
  '_F95INCFLAGS': '$( ${_concat(INCF95PREFIX, F95PATH, INCF95SUFFIX, __env__, RDirs, 

TARGET, SOURCE)} $)',
  '_FORTRANINCFLAGS': '$( ${_concat(INCFORTRANPREFIX, FORTRANPATH, INCFORTRANSUFFIX, 

__env__, RDirs, TARGET, SOURCE)} $)',
  '_FORTRANMODFLAG': '$( ${_concat(FORTRANMODDIRPREFIX, FORTRANMODDIR, 

FORTRANMODDIRSUFFIX, __env__, RDirs, TARGET, SOURCE)} $)',
  '_JAVABOOTCLASSPATH': '${_javapathopt("-bootclasspath", "JAVABOOTCLASSPATH")} ',
  '_JAVACCOM': '$JAVAC $JAVACFLAGS $_JAVABOOTCLASSPATH $_JAVACLASSPATH -d 

${TARGET.attributes.java_classdir} $_JAVASOURCEPATH $SOURCES',
  '_JAVACLASSPATH': '${_javapathopt("-classpath", "JAVACLASSPATH")} ',
  '_JAVASOURCEPATH': '${_javapathopt("-sourcepath", "JAVASOURCEPATH", 

"_JAVASOURCEPATHDEFAULT")} ',
  '_JAVASOURCEPATHDEFAULT': '${TARGET.attributes.java_sourcedir}',
  '_LDMODULE_SOURCES': <function _windowsLdmodSources at 0x029B62B0>,
  '_LDMODULE_TARGETS': <function _windowsLdmodTargets at 0x029B6270>,
  '_LIBDIRFLAGS': '$( ${_concat(LIBDIRPREFIX, LIBPATH, LIBDIRSUFFIX, __env__, RDirs, 

TARGET, SOURCE)} $)',
  '_LIBFLAGS': '${_concat(LIBLINKPREFIX, LIBS, LIBLINKSUFFIX, __env__)}',
  '_MSVC_OUTPUT_FLAG': <function msvc_output_flag at 0x029B1E30>,
  '_PDB': <function pdbGenerator at 0x029B6130>,
  '_SHLINK_SOURCES': <function windowsShlinkSources at 0x029B6230>,
  '_SHLINK_TARGETS': <function windowsShlinkTargets at 0x029B61F0>,
  '_concat': <function _concat at 0x028A8C30>,
  '_defines': <function _defines at 0x028A8D30>,
  '_javapathopt': <class SCons.Tool.javac.pathopt at 0x029DB3C0>,
  '_stripixes': <function _stripixes at 0x028A8CB0>}
os.chdir('ExtLibs/wxWidgets/build/msw')
nmake /nologo /f makefile.vc BUILD=debug SHARED=0 USE_OPENGL=1 RUNTIME_LIBS=static 

COMPILER_PREFIX=vc9
	cl /c /nologo /TC /Fovc9_mswud\wxtiff_tif_win32.obj /MTd /DWIN32 /Zi  

/Fd..\..\lib\vc9_lib\wxtiffd.pdb /D_DEBUG  /Od  /I..\..\src\zlib /I..\..\src\jpeg  

/I..\..\src\tiff\libtiff   ..\..\src\tiff\libtiff\tif_win32.c
tif_win32.c
..\..\src\tiff\libtiff\tif_win32.c(33) : fatal error C1083: Cannot open include file: 

'windows.h': No such file or directory
os.chdir('D:\\GAMEDESIGN\\Ca3DE-9.06-win32\\Cafu-src-r39')


NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN
\cl.EXE"' : return code '0x2'
Stop.
scons: *** Error 2
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Visual C++, Code::Blocks

Post by Carsten » 2010-01-26, 15:12

Ok, thanks.
I'm very interested in this myself, as I've had problems with auto-detection of VC++ in the past, too, and - more importantly - the SCons developers have recently put a lot of effort into improving this detection.

Please do the following:
Before you run scons at the command line, set SCONS_MSCOMMON_DEBUG to - (hyphen, Minuszeichen), that is, enter

Code: Select all

set SCONS_MSCOMMON_DEBUG=-
before you run scons. It will output what it is doing at startup (if you replace the "-" by an arbitrary file name, the output will be written into the file instead). Then please post that output here as well.
(And please comment out or delete the previously inserted line print envDebug.Dump(); in order have the same output as above not in the new output again.)
Best regards,
Carsten
DiViNiTY
Posts: 5
Joined: 2010-01-24, 20:22

Re: Visual C++, Code::Blocks

Post by DiViNiTY » 2010-01-26, 18:44

Hmmm,

the Output seems ok, i forgot that i have also MSVC++ 6.0 installed.

Code: Select all

DEBUG:root:trying to find VC 10.0
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Microsoft\\VisualStudio\\10.0\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 10.0
DEBUG:root:trying to find VC 9.0
DEBUG:root:find_vc_dir(): found VC in registry: C:\Program Files\Microsoft Visual Studio 9.0\VC\
DEBUG:root:found VC 9.0
DEBUG:root:trying to find VC 8.0
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Microsoft\\VisualStudio\\8.0\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_dir(): found VC in registry: C:\Program Files\Microsoft Visual Studio 8\VC\
DEBUG:root:found VC 8.0
DEBUG:root:trying to find VC 7.1
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Microsoft\\VisualStudio\\7.1\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 7.1
DEBUG:root:trying to find VC 7.0
DEBUG:root:find_vc_dir(): no VC registry key 'Software\\Microsoft\\VisualStudio\\7.0\\Setup\\VC\\ProductDir'
DEBUG:root:find_vc_pdir return None for ver 7.0
DEBUG:root:trying to find VC 6.0
DEBUG:root:find_vc_dir(): found VC in registry: C:\Program Files\Microsoft Visual Studio 6.0\VC98
DEBUG:root:found VC 6.0
DEBUG:root:msvc_setup_env()
DEBUG:root:get_default_version()
DEBUG:root:installed_vcs:['9.0', '8.0', '6.0']
DEBUG:root:msvc_setup_env: using default installed MSVC version '9.0'

DEBUG:root:msvc_setup_env: using specified MSVC version '9.0'

DEBUG:root:find_vc_dir(): found VC in registry: C:\Program Files\Microsoft Visual Studio 9.0\VC\
DEBUG:root:use_script 2 u'C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\vcvarsall.bat', args:x86

DEBUG:root:Calling 'C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86'
DEBUG:root:msvc_setup_env()
DEBUG:root:get_default_version()
DEBUG:root:installed_vcs:['9.0', '8.0', '6.0']
DEBUG:root:msvc_setup_env: using default installed MSVC version '9.0'

DEBUG:root:msvc_setup_env: using specified MSVC version '9.0'

DEBUG:root:find_vc_dir(): found VC in registry: C:\Program Files\Microsoft Visual Studio 9.0\VC\
DEBUG:root:use_script 2 u'C:\\Program Files\\Microsoft Visual Studio 9.0\\VC\\vcvarsall.bat', args:x86

DEBUG:root:Calling 'C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86'
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Visual C++, Code::Blocks

Post by Carsten » 2010-01-26, 20:58

Well, this looks like a similar problem that I too had a while ago -- the installation of the VC++ got somehow broken, probably by some other, entirely unrelated software whose installer was not entirely Vista-aware...

If you don't mind, please check how the environment looks like when you run vcvarsall.bat manually:

Code: Select all

C:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat x86
followed by

Code: Select all

set
in order to have all environment variables printed out. You can filter the output if you want:

Code: Select all

set | find /i "vc"
set | find /i "sdk"
Would you mind installing VC++ 9 again, inclusive the related SDK (that is bundled with the VC++ 9 installer)? That will supposedly fix the problem. If you rather not do that, we'll have to analyze the output of the set commands above. ;-)
Best regards,
Carsten
User avatar
Carsten
Site Admin
Posts: 2160
Joined: 2004-08-19, 13:46
Location: Germany
Contact:

Re: Visual C++, Code::Blocks

Post by Carsten » 2010-02-01, 14:18

Dear Divinity,
thanks for your kind PM! :-)

I would still recommend to re-install VC++ 9 and its associated SDK, but if you understandably prefer to not do that, you can alternatively try the following. This is how Cafu was configured for VC++ 9 until recently, before we switched to the new auto-detection that comes with SCons 1.2.0+:

Insert lines

Code: Select all

        # Manually set the compiler and platform SDK environment paths.
        vs9_base="C:\\Programme\\Microsoft Visual Studio 9.0";
        vs9_sdk ="C:\\Programme\\Microsoft SDKs\\Windows\\v6.0A";

        envCommon['ENV']['PATH'   ]="%s\\Common7\\IDE;%s\\VC\\BIN;%s\\Common7\\Tools;C:\\WINDOWS\\Microsoft.NET\\Framework\\v3.5;C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727;%s\\VC\\VCPackages;%s\\bin;" % (vs9_base, vs9_base, vs9_base, vs9_base, vs9_sdk)
        envCommon['ENV']['INCLUDE']="%s\\VC\\INCLUDE;%s\\include" % (vs9_base, vs9_sdk)
        envCommon['ENV']['LIB'    ]="%s\\VC\\LIB;%s\\lib" % (vs9_base, vs9_sdk)
into the SConstruct file, such that starting from line 98, it looks like this:

Code: Select all

    elif compiler=="vc9":
        ################################################
        ### Win32, Visual C++ 2008 (Express Edition) ###
        ################################################

        # Reference of commonly used compiler switches:
        # Identical to the compiler switches for Visual C++ 2005, see there for more details.

        # Begin with an environment with settings that are common for debug, release and profile builds.
        envCommon=Environment(
            CCFLAGS = Split("/nologo /GR /EHsc"),   # CCFLAGS is also taken as the default value for CXXFLAGS.
            CPPDEFINES = ["_CRT_SECURE_NO_DEPRECATE", "_CRT_NONSTDC_NO_DEPRECATE"],
            LINKFLAGS = Split("/nologo /incremental:no"))

        # Manually set the compiler and platform SDK environment paths.
        vs9_base="C:\\Programme\\Microsoft Visual Studio 9.0";
        vs9_sdk ="C:\\Programme\\Microsoft SDKs\\Windows\\v6.0A";

        envCommon['ENV']['PATH'   ]="%s\\Common7\\IDE;%s\\VC\\BIN;%s\\Common7\\Tools;C:\\WINDOWS\\Microsoft.NET\\Framework\\v3.5;C:\\WINDOWS\\Microsoft.NET\\Framework\\v2.0.50727;%s\\VC\\VCPackages;%s\\bin;" % (vs9_base, vs9_base, vs9_base, vs9_base, vs9_sdk)
        envCommon['ENV']['INCLUDE']="%s\\VC\\INCLUDE;%s\\include" % (vs9_base, vs9_sdk)
        envCommon['ENV']['LIB'    ]="%s\\VC\\LIB;%s\\lib" % (vs9_base, vs9_sdk)

        # Environment for debug builds:
        envDebug=envCommon.Clone();
        envDebug.Append(CCFLAGS=Split("/MTd /Od /Z7 /RTC1"));
        envDebug.Append(LINKFLAGS=["/debug"]);
If you get the vs9_base and vs9_sdk variables right, everything should correctly. :cheesy:

Make sure however that if you have multiple SDKs installed, you use the one that is intended / designed for VC++ 9.
Best regards,
Carsten
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest