![]() |
#1 |
Scout
Join Date: Dec 2007
Age: 47
Posts: 37
![]() |
Getting Visual C++ 2008 Express Edition to compile Angband 3.0.9
Anyone around here familiar with VC++ 2008 Express Edition?
If so what do I need to set up to get this all working. :P I feel like such a nub today. Well I am a nub in all honesty. It's been way to long since I last sat down with a compiler. For all of you who are gonna complain that I'm using VC...I'm supposed to familiarize myself with it for another project so back off! :P From what I understand I need to include ALL the .c files in the src/ folder but main-win.c is the only main-*.* file I use. do I still use main.c? I also add all the files from src/win/ as well. I can add this to an empty Win32 app project. anything else I need to install or configure? Thanks in advance. I've gleaned what I could searching the forums here, but I'm still fuzzy about what I need to do. I did try compiling with the above done, but I get an error : ...src\h-basic.h(148) : fatal error C1083: Cannot open include file: 'pwd.h': No such file or directory. Not sure why, but I do know pwd.h does not exist in the src or any other dir in the source folders. ![]() O. |
![]() |
![]() |
![]() |
#2 |
Knight
Join Date: Apr 2007
Posts: 590
![]() |
1) No, use only main-win.c . You only need one main()/WinMain() function.
2) the pwd.h error is because the WINDOWS macro is not being correctly auto-detected in h-config.h . Either pass it as a command-line define, or determine what flag MSVC 2008 is sending that would allow autodetection and send in a patch. 3) If I recall correctly (from ~1995), pay careful attention to MS remove() (which should bother you only in z-file.c). It has a non-POSIX return convention of -1 for failure rather than 0, so the usage of that return value has to be adjusted. |
![]() |
![]() |
![]() |
#3 |
Veteran
Join Date: Apr 2007
Posts: 1,951
Donated: $40
![]() |
Luckily nowhere in the game actually checks that, so you don't need to worry. I didn't know MS broke POSIX there too, though --ta.
|
![]() |
![]() |
![]() |
#4 | |
Scout
Join Date: Dec 2007
Age: 47
Posts: 37
![]() |
Quote:
My knowledge of VC++ is 2 days old. ![]() ![]() I know I'm asking a lot, but any more help you can provide would be great. ![]() In the meantime I'll continue reading the documentation and looking online for some info regarding doing either of the above. :P O. |
|
![]() |
![]() |
![]() |
#5 | |
Prophet
Join Date: Apr 2007
Location: Seattle, WA
Posts: 6,768
Donated: $40
![]() |
Quote:
VC build, since it's really intended only for UNIX/POSIX compiles. You do need to make sure that the appropriate defines are on your command line in the build process. The only way that pwd.h is getting included is if you have one of SET_UID or MACH_O_CARBON defined in the build arguments or in a .h file somewhere. Either of these is very wrong. To find out which defines you need, read Makefile.win: -DWINDOWS will WINDOWS in the list of predefined constants in the build options. You may also need an empty definition for NEAR in readdib.c Finally, if you can find a user's group or a mentor somewhere, an hour or two of help makes a huge difference. |
|
![]() |
![]() |
![]() |
#6 |
Scout
Join Date: Dec 2007
Age: 47
Posts: 37
![]() |
Ya I've been reading as much as I can! Trying to figure things out. :P I have a couple guys I can pester with questions, just need to wait till Monday for that!
![]() O. |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compile failure for 3.0.9 on Mac OS X 10.4.10 | TreeFrog | Vanilla | 4 | November 8, 2007 14:58 |