Compiling Problem

All development related issues welcome

Moderator: Moderator Team

Post Reply
RomanH
Posts: 83
Joined: Fri Nov 26, 2004 11:14 pm
Location: Switzerland

Compiling Problem

Post by RomanH »

Hello everybody,

when I try to compile the sources everything goes well for a couple of minutes until I get the following error:

cc1.exe: warnings being treated as errors
stdlib/atexit.c:5: warning: redefinition of '_onexit_t'
C:/MinGW/include/stdlib.h:415: warning: '_onexit_t' previously declared here
make[1]: *** [stdlib/atexit.o] Error 1
make: *** [crt] Error 2


my build environment:
- I set everything up as it is explained in the wiki (http://reactos.com/wiki/index.php/Build_Environment and http://reactos.com/wiki/index.php/HOWTO ... or_Windows)
- I did set a path "C:\MinGW\bin"
- I copied C:\MinGW\bin\MinGW32-make to C:\MinGW\bin\make.exe
- I used a fresh checkout of the SVN
- I did a "make clean" after I first got the error (it was the same error)
- my OS: Windows2000

any idea what I could do?

Thanks!
RomanH
gdalsnes
Developer
Posts: 2
Joined: Tue Nov 30, 2004 11:24 pm

Post by gdalsnes »

this might be fixed now. you can also try a newer version of gcc (3.4.2 works for me)
RomanH
Posts: 83
Joined: Fri Nov 26, 2004 11:14 pm
Location: Switzerland

Post by RomanH »

thanks! it nearly worked :)

here's what I did:
- I updated the trunk
- I installed the following files:
--- gcc-ada-3.4.2-20040916-1.tar.gz
--- gcc-objc-3.4.2-20040916-1.tar.gz
--- gcc-core-3.4.2-20040916-1.tar.gz

ROS happily compiled for quite a while until the following error appeared...


[CC] reg.c
reg.c: In function `SHSetValueA':
reg.c:1201: warning: passing arg 4 of `RegCreateKeyExA' discards qualifiers from
pointer target type
reg.c: In function `SHSetValueW':
reg.c:1230: warning: passing arg 4 of `RegCreateKeyExW' discards qualifiers from
pointer target type
[CC] regstream.c
[CC] shlwapi_main.c
[CC] stopwatch.c
[CC] string.c
[CC] thread.c
[CC] url.c
url.c: In function `UrlHashA':
url.c:1398: warning: passing arg 1 of `HashData' discards qualifiers from pointer target type
url.c: In function `UrlHashW':
url.c:1420: warning: passing arg 1 of `HashData' discards qualifiers from pointer target type
[CC] wsprintf.c
[STUBS] shlwapi.spec
[CC] shlwapi.stubs.c
[AR] shlwapi.a
[LD] shlwapi.nostrip.dll
temp.exp(.edata+0x94):fake: undefined reference to `f1'
temp.exp(.edata+0x98):fake: undefined reference to `f2'
temp.exp(.edata+0x9c):fake: undefined reference to `f3'
temp.exp(.edata+0xa0):fake: undefined reference to `f4'
collect2: ld returned 1 exit status
make[1]: *** [shlwapi.nostrip.dll] Error 1
make: *** [shlwapi] Error 2

D:\Ros\Sources\Trunk>
RomanH
gdalsnes
Developer
Posts: 2
Joined: Tue Nov 30, 2004 11:24 pm

Post by gdalsnes »

i got that error too. upgrading binutils to version .94 fixed it for me
RomanH
Posts: 83
Joined: Fri Nov 26, 2004 11:14 pm
Location: Switzerland

Post by RomanH »

thanks again! by updating to binutils-2.15.94-20050118-1.tar.gz the compilation process continued a little further until...

explorer.cpp:398: instantiated from here
C:/MinGW/include/c++/3.2.3/bits/stl_pair.h:88: invalid use of undefined type `struct String'
utility/utility.h:737: forward declaration of `struct String'
make[1]: *** [explorer.o] Error 1
make: *** [explorer] Error 2

D:\Ros\Sources\Trunk>


P.S. I hope I don't get on your nerves with my problems. All I want to do is to set up a working build environment so I can make a Swiss German keyboard layout. An important factor if ReactOS wants to become the main OS for bankers, watch and cheese makers. :wink:
RomanH
GvG
Posts: 499
Joined: Mon Nov 22, 2004 10:50 pm
Location: The Netherlands

Post by GvG »

You're using g++ version 3.2.3. That version contains some bugs which cause the messages you see. Upgrade gcc-core and gcc-g++ to at least 3.3.1, I'd reccomend 3.4.2 since that is what most people use. You can get the files from the MinGW download page

[Edit]Oh, I see you already installed gcc-core 3.4.2. Then you only need gcc-g++ 3.4.2[/Edit]
RomanH
Posts: 83
Joined: Fri Nov 26, 2004 11:14 pm
Location: Switzerland

Post by RomanH »

CD-ROM image made successfully

It worked! :D

thank you very much!

just in case there are other newbies with compiling problems, these are the files I used:
binutils-2.15.94-20050118-1.tar.gz
gcc-ada-3.4.2-20040916-1.tar.gz
gcc-core-3.4.2-20040916-1.tar.gz
gcc-objc-3.4.2-20040916-1.tar.gz
gcc-g++-3.4.2-20040916-1.tar.gz
nasm-0.98.39-win32.zip
MinGW-3.1.0-1.exe
w32api-2.5.tar.gz
RomanH
GvG
Posts: 499
Joined: Mon Nov 22, 2004 10:50 pm
Location: The Netherlands

Post by GvG »

You don't need gcc-ada and gcc-objc
mjs
Posts: 47
Joined: Sat Feb 19, 2005 9:03 pm

Post by mjs »

I also have a compile problem:
[RC] winmm_res.rc
[CC] driver.c
[CC] joystick.c
[CC] lolvldrv.c
[CC] mci.c
mci.c: In function `MCI_MessageToString':
mci.c:171: error: `DRV_EXITAPPLICATION' undeclared (first use in this function)
mci.c:171: error: (Each undeclared identifier is reported only once
mci.c:171: error: for each function it appears in.)
mci.c: In function `MCI_UnmapMsgAtoW':
mci.c:454: warning: passing arg 3 of `HeapFree' discards qualifiers from pointer
target type
mci.c:459: warning: passing arg 3 of `HeapFree' discards qualifiers from pointer
target type
mci.c:462: warning: passing arg 3 of `HeapFree' discards qualifiers from pointer
target type
mci.c: In function `MCI_Close':
mci.c:1753: warning: comparison is always false due to limited range of data typ
e
mci.c: At top level:
mci.c:1930: error: syntax error before "LPMCI_SOUND_PARMSW"
mci.c: In function `MCI_Sound':
mci.c:1934: error: `lpParms' undeclared (first use in this function)
mci.c:1936: error: `dwFlags' undeclared (first use in this function)
mci.c:1941: error: `wDevID' undeclared (first use in this function)
mci.c: In function `MCI_SendCommand':
mci.c:2014: error: `LPMCI_SOUND_PARMSW' undeclared (first use in this function)
mci.c:2014: error: syntax error before "dwParam2"
mci.c:2019: error: syntax error before "dwParam2"
gmake[1]: *** [mci.o] Error 1
gmake: *** [winmm] Error 2
DRV_EXITAPPLICATION isn't defined in any header ...

Regards,
Mark
GvG
Posts: 499
Joined: Mon Nov 22, 2004 10:50 pm
Location: The Netherlands

Post by GvG »

Yeah, sorry, my mistake. Fixed in SVN now. Update include/wine/mmsystem.h.
mjs
Posts: 47
Joined: Sat Feb 19, 2005 9:03 pm

Post by mjs »

Thanks, now it works.

Regards,
Mark
Ivan
Posts: 3
Joined: Fri Feb 25, 2005 1:59 pm

Post by Ivan »

Xm, problems in shlwapi :

Code: Select all

reg.c:1201: warning: passing arg 4 of `RegCreateKeyExA' discards qualifiers from pointer target type
reg.c: In function `SHSetValueW':
reg.c:1230: warning: passing arg 4 of `RegCreateKeyExW' discards qualifiers from pointer target type
[CC]      regstream.c
[CC]      shlwapi_main.c
[CC]      stopwatch.c
[CC]      string.c
[CC]      thread.c
[CC]      url.c
url.c: In function `UrlHashA':
url.c:1398: warning: passing arg 1 of `HashData' discards qualifiers from pointer target type
url.c: In function `UrlHashW':
url.c:1420: warning: passing arg 1 of `HashData' discards qualifiers from pointer target type
[CC]      wsprintf.c
[STUBS]   shlwapi.spec
[CC]      shlwapi.stubs.c
[AR]      shlwapi.a
[LD]      shlwapi.nostrip.dll
temp.exp(.edata+0x94):fake: undefined reference to `f1'
temp.exp(.edata+0x98):fake: undefined reference to `f2'
temp.exp(.edata+0x9c):fake: undefined reference to `f3'
temp.exp(.edata+0xa0):fake: undefined reference to `f4'
make[1]: *** [shlwapi.nostrip.dll] Error 1
make: *** [shlwapi] Error 2
Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests