• 0 Vote(s) - 0 Average
• 1
• 2
• 3
• 4
• 5
Wont compile in windows.
04-27-2007, 10:37 AM,
 protomor Member Posts: 79 Threads: 21 Joined: Apr 2007
Wont compile in windows.
I did an install of DevC++ and got the whole SVN folder and it gives me 121 errors. They usually have something to do with SDL.

Heres an image of what im getting.

04-27-2007, 12:53 PM,

Aha, I knew it was a libraries problem. You are missing the SDL header files that are needed by the compiler. You can get them from the source packages for each library, in the include directory. However I think it would be easier to just have the headers in our repository for convenience...FFuser could you copy your SDL headers into tools/win/include or something like that?
04-27-2007, 12:58 PM,
 protomor Member Posts: 79 Threads: 21 Joined: Apr 2007

There already as the SDL folder in tools/win. I added an include folder and put a copy in there too but it doesnt want to find them. Lol I put SDL folders EVERYWHERE and no where wants to work.

btw my aim sn is shiboujin
04-27-2007, 01:05 PM,
 Nigo Member Posts: 118 Threads: 9 Joined: Jun 2006

you have to download the development lib from the SDL web site
http://www.libsdl.org/release/SDL-devel-...w32.tar.gz

cut/paste the include/SDL folder into your the include folder of DevC++
do the same for the lib

good luck
installing the libs on Windows is a pain is the a** btw, have anyone tried to compile using scons on Windows ? it fails on my box
04-27-2007, 01:23 PM,
 protomor Member Posts: 79 Threads: 21 Joined: Apr 2007

Ok i got the libraries in... Im down to 4 errors from 121 so theres progress. Here are the lines i still get:

../../include/pch.h:34:23: sys/ioctl.h: No such file or directory

../../include/settings.h:5:25: definitions.h: No such file or directory

I g uess I just need these two and im done but I cant find them anywhere.
04-27-2007, 03:45 PM,

Thanks for the link Nigo, I didn't have time to dig that one up. I'll add a note about libraries with that link to the compile directions for Windows on the wiki.

On pch.h: This is the pre-compiled header, it's trying to include sys/ioctl.h which is only used in the Linux build for force feedback. This should not be included, neither should any of the other sys/ headers, so I think those can just be commented out.

definitions.h: This file is supposed to be generated at compile time but the windows build hasn't been updated yet for this new feature...so you can just create the file yourself, just add a new include file to the Dev-C++ project and in it put the following:
Code:
```#ifndef _DEFINITIONS_H #define _DEFINITIONS_H #define DATA_DIR "./data/" #define SETTINGS_DIR "VDrift" #define DEBUG 1 #define VERSION "development" #define REVISION "1699" #endif // _DEFINITIONS_H```

Notice I'm changing the SETTINGS_DIR which is usually ".vdrift"...I think we should change it to remove the . and capitalize it properly on Windows since the other way is more of a *nix thing. Anyway that means that your settings will show up C:\Documents and Settings\you\VDrift instead of where they were before. If you like you can change it back and it will use the settings you defined before, or you can copy the settings from the .vdrift directory into the new VDrift directory to keep your settings.

Make sense?
04-27-2007, 04:04 PM,
 protomor Member Posts: 79 Threads: 21 Joined: Apr 2007

ok well NOW it takes a while to compile but it says theres 2 errors... I dont see any. Heres the end of the compile log:

Quote:C:\Dev-Cpp\Bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lSDLmain
collect2: ld returned 1 exit status

make.exe: *** [../../VDrift.exe] Error 1

Execution terminated
04-28-2007, 08:55 AM,
 Nigo Member Posts: 118 Threads: 9 Joined: Jun 2006

that's a "lib missing error", it means you should link the SDLmain library to the project. Typing "-lSDLmain -lSDL" in the link editor in the project options should do it if you got this libraries in the lib directory of Dev-C++
Good luck
04-30-2007, 11:12 AM,
 protomor Member Posts: 79 Threads: 21 Joined: Apr 2007

Yay it worked. i didnt really have the libraries or anything installed
07-05-2007, 11:49 AM,
 mpo Member Posts: 65 Threads: 18 Joined: May 2007

Hi, i have had the same problem with the library when i've tried to compile with Dev in windows 2000. I have done all the things that are posted but i have still the following errors:

In file from../../include/gui/gui.h:9, from../../src/gui button.cpp
from../../src/gui/button.cpp
SDL/SDL_image.h: No such file or directory.
Infile included from ../..include/multiplay.h:51, from../../src/gui/gui.h
from../../include/gui/gui.h:9, from../../src/gui button.cpp
from../../src/gui/button.cpp
SDL/SDL_rotozoom.h: No such file or directory.
Infile included from ../..include/multiplay.h:55, from../../src/gui/gui.h
from../../include/gui/gui.h:9, from../../src/gui button.cpp
from../../src/gui/button.cpp
SDL/SDL_net.h: No such file or directory.
Infile included from ../..include/multiplay.h:55, from../../src/gui/gui.h
from../../include/gui/gui.h:9, from../../src/gui button.cpp
from../../src/gui/button.cpp
variable or field 'Put' declared void
expected ';' before '(' token
'IPaddress' does not name a type

There are some other header files that i have to include? where i can find that files?

thanks.
07-05-2007, 03:42 PM,

07-06-2007, 04:37 AM,
 mpo Member Posts: 65 Threads: 18 Joined: May 2007

I think so, i have:
2. Add in the include directory of the Dev-C++ a folder named SDL, with inside all the header files that there were in the include folder of the SDL lib downloaded.
3. I have done the same with the files in the lib folder
4. Create an header file named definitions.h (with the code inside)
5. type "-lSDLmain -lSDL" in the link editor

what is wrong?
07-06-2007, 06:53 AM,
 rookie1 Member Posts: 231 Threads: 32 Joined: Nov 2006

SDL/SDL_image.h: No such file or directory.
SDL/SDL_rotozoom.h: No such file or directory.
SDL/SDL_net.h: No such file or directory.

Do you have these files in your Dev-Cpp\include\SDL directory?
07-06-2007, 07:02 AM,
 mpo Member Posts: 65 Threads: 18 Joined: May 2007

No, there aren't in the lib that i have downloaded. Where i can find that files? I need just that header or also some dll (for the linker)?
07-06-2007, 07:21 AM,
 rookie1 Member Posts: 231 Threads: 32 Joined: Nov 2006

An easier way is to use the dev-c++ built in package manager.