Page 1 of 1

Can't compile Source Code in C++

Posted: Sun Sep 14, 2008 8:16
by WolfyGirl
Hi, i am kinda new to programming, but i was testing it out by building the codes.
The end result was this :

Code: Select all

1>------ Build started: Project: fixrtext, Configuration: Debug Win32 ------
1>Compiling...
1>fixrtext.c
1>c:\mingw\include\stdio.h(220) : error C2373: '__restrict__' : redefinition; different type modifiers
1>        c:\mingw\include\stdio.h(220) : see declaration of '__restrict__'
1>c:\mingw\include\stdio.h(223) : error C2086: 'const char *__restrict__' : redefinition
1>        c:\mingw\include\stdio.h(222) : see declaration of '__restrict__'
1>c:\mingw\include\stdio.h(481) : error C2054: expected '(' to follow '__inline__'
1>c:\mingw\include\stdio.h(483) : error C2085: 'vsnwprintf' : not in formal parameter list
1>c:\mingw\include\stdio.h(483) : error C2143: syntax error : missing ';' before '{'
1>c:\mingw\include\stdio.h(486) : error C2373: '__restrict__' : redefinition; different type modifiers
1>        c:\mingw\include\stdio.h(485) : see declaration of '__restrict__'
1>c:\mingw\include\stdio.h(488) : error C2086: 'const wchar_t *__restrict__' : redefinition
1>        c:\mingw\include\stdio.h(487) : see declaration of '__restrict__'
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(30) : error C2065: 'IMAGE_FILE_HEADER' : undeclared identifier
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(30) : error C2146: syntax error : missing ';' before identifier 'filehead'
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(30) : error C2065: 'filehead' : undeclared identifier
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(31) : error C2065: 'IMAGE_SECTION_HEADER' : undeclared identifier
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(31) : error C2146: syntax error : missing ';' before identifier 'secthead'
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(31) : error C2065: 'secthead' : undeclared identifier
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(32) : error C2143: syntax error : missing ';' before 'type'
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(37) : warning C4013: 'fopen_s' undefined; assuming extern returning int
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(44) : error C2224: left of '.Machine' must have struct/union type
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(44) : error C2065: 'IMAGE_FILE_MACHINE_I386' : undeclared identifier
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(51) : error C2065: 'i' : undeclared identifier
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(51) : error C2224: left of '.NumberOfSections' must have struct/union type
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(59) : warning C4013: 'memcmp' undefined; assuming extern returning int
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(59) : error C2224: left of '.Name' must have struct/union type
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(59) : error C2065: 'IMAGE_SIZEOF_SHORT_NAME' : undeclared identifier
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(61) : error C2224: left of '.Characteristics' must have struct/union type
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(61) : error C2065: 'IMAGE_SCN_MEM_WRITE' : undeclared identifier
1>c:\documents and settings\windows\bureaublad\mygame\gzdoom\tools\fixrtext\fixrtext.c(67) : error C2224: left of '.Characteristics' must have struct/union type
1>Build log was saved at "file://c:\Documents and Settings\Windows\Bureaublad\mygame\gzdoom\tools\fixrtext\Debug\BuildLog.htm"
1>fixrtext - 23 error(s), 2 warning(s)
2>------ Build started: Project: brightmaps, Configuration: Debug Win32 ------
3>------ Build started: Project: lights, Configuration: Debug Win32 ------
2>Performing Makefile project actions
3>Performing Makefile project actions
2> nmake  -f Makefile2
3> nmake  -f Makefile2
2>Microsoft (R) Program Maintenance Utility   Version 7.00.8882
2>Copyright (C) Microsoft Corp 1988-2000. All rights reserved.
3>Microsoft (R) Program Maintenance Utility   Version 7.00.8882
3>Copyright (C) Microsoft Corp 1988-2000. All rights reserved.
3>'lights.pk3' is up-to-date
3> copy lights.pk3 ..\..
3>        1 bestand(en) gekopieerd.
3>Build log was saved at "file://c:\Documents and Settings\Windows\Bureaublad\mygame\gzdoom\wadsrc_lights\Debug\BuildLog.htm"
3>lights - 0 error(s), 0 warning(s)
2>'brightmaps.pk3' is up-to-date
2> copy brightmaps.pk3 ..\..
2>        1 bestand(en) gekopieerd.
2>Build log was saved at "file://c:\Documents and Settings\Windows\Bureaublad\mygame\gzdoom\wadsrc_bm\Debug\BuildLog.htm"
2>brightmaps - 0 error(s), 0 warning(s)
4>------ Build started: Project: wadsrc, Configuration: Debug Win32 ------
4>Performing Makefile project actions
4> nmake  -f Makefile2
4>Microsoft (R) Program Maintenance Utility   Version 7.00.8882
4>Copyright (C) Microsoft Corp 1988-2000. All rights reserved.
4>'gzdoom.pk3' is up-to-date
4> copy gzdoom.pk3 ..\..
4>        1 bestand(en) gekopieerd.
4>Build log was saved at "file://c:\Documents and Settings\Windows\Bureaublad\mygame\gzdoom\wadsrc\Debug\BuildLog.htm"
4>wadsrc - 0 error(s), 0 warning(s)
5>------ Build started: Project: zdoom, Configuration: Debug Win32 ------
5>Checking svnrevision.h...
5>Failed to get current revision: No error
5>Assembling c:\Documents and Settings\Windows\Bureaublad\mygame\gzdoom\src\misc.nas...
5>.\Debug\fixrtext wordt niet herkend als een interne
5>of externe opdracht, programma of batchbestand.
5>Project : error PRJ0019: A tool returned an error code from "Assembling c:\Documents and Settings\Windows\Bureaublad\mygame\gzdoom\src\misc.nas..."
5>Build log was saved at "file://c:\Documents and Settings\Windows\Bureaublad\mygame\gzdoom\Debug\BuildLog.htm"
5>zdoom - 1 error(s), 0 warning(s)
========== Build: 3 succeeded, 2 failed, 7 up-to-date, 0 skipped ==========
i am using the programs that i found on this page http://zdoom.org/wiki/Compile_ZDoom_on_Windows
i don;t know what to do now, no matter what i change, it keeps showing the errors list.

Posted: Sun Sep 14, 2008 8:37
by Graf Zahl
It looks like you are using Microsoft's compiler with MinGW's headers. Since these headers are for a completely different compiler they logically don't work.

Posted: Sun Sep 14, 2008 8:39
by WolfyGirl
i guess i need different builders for fixing those errors, but which files do i need to compile it correctly?

Posted: Sun Sep 14, 2008 8:43
by Graf Zahl
You decide which compiler to use. Since you already installed the MS compiler I suggest to get the matching SDKs. You need this and set it up properly in your compiler. From the error messages it looks like it either wasn't installed or if it was it wasn't properly set up in Visual C++.

Posted: Sun Sep 14, 2008 8:49
by WolfyGirl
so C++ Express 2005 is not an option for GZDoom compiling?
pretty difficult, all that compiling work :?

Posted: Sun Sep 14, 2008 9:00
by Graf Zahl
Sure it is. But you need the Windows Platform SDK because it contains all the include data that is needed to use it. Without it VC++ only compiles for .NET which GZDoom is not designed for.

Posted: Sun Sep 14, 2008 9:02
by WolfyGirl
i have SDK R2.
hm... could this help maybe?

Posted: Mon Sep 15, 2008 2:12
by Rachael
http://zdoom.org/wiki/Compile_ZDoom_on_Windows

This has some information you need, including SDK's. I would suggest removing MinGW's paths from your IDE, too, and replacing them with the MS ones, because otherwise they can only interfere with any future attempts to compile.

Posted: Tue Sep 16, 2008 18:28
by WolfyGirl
still not working.
something up with wrappers.asm and nasm.
i make use of the latest version, no matter what i do or import, it still doesn't compile wrappers.asm.
i think i haven't set something in the tools>options thingo.
i guess i need some screenshots so it is more easier to understand, like i said, i am kinda new to C++ :(

Posted: Wed Sep 17, 2008 1:55
by Graf Zahl
That wrappers.asm thing is really annoying. I got that too but it went away when the file was renamed from wrappers.nas to wrappers.asm. I only can suspect that there's a bug in NASM that makes it fail. ZDoom's project is set up correctly.

Posted: Wed Sep 17, 2008 5:56
by WolfyGirl
i fixed it now, i had to use nasm 2.00, and i was using the latest version, so it didn't compile :P.
now i am stuck with some .h files than cannot be compiled, i am trying to fix this with one of my friends that wants to help me with making my own GZDoom based source :)

Posted: Wed Sep 24, 2008 14:10
by WolfyGirl
YEAY!, finally got it working.
the files wheir just damaged or Corrupted during the download. :?
glad i got it working now ^-^

Posted: Wed Sep 24, 2008 17:50
by Rachael
Sometimes when I update my SVN trees I just wipe out the trunk completely. I delete the ZDoom and GZDoom folders and redownload the whole damn thing. It's fixed certain problems in the past, for me.

Nowdays, though, I just delete the .vcproj files cause Randy updates them so often it's almost not worth the effort of letting VC++ change them. :P