MSVC Compile Issues

Do you need help? Ask here!

Bug reporting belongs here: http://developer.wz2100.net/newticket
ratarf
Trained
Trained
Posts: 154
Joined: 29 Nov 2006, 09:45

MSVC Compile Issues

Post by ratarf »

- I downloaded the latest source code from the SVN
- I have VC correctly installed with the windows SDK correctly linked
- I copied the 'lib' and 'include' folders from 'lexfiles' to the warzone src folder

- Folder structure of "H:\Warzone"
  • warzone-devpkg
    • include
    • lib
  • warzone
    • src
    • data
    • ...
The error I get (and 100's of similar errors):

Code: Select all

1>h:\warzone\warzone\lib\gamelib\animobj.c(13) : fatal error C1083: Cannot open include file: 'lib/framework/frame.h': No such file or directory
The file is not missing!

I think it has something to do with the library/include files that are not correctly refered to in the project.

The compile guide says:

Code: Select all

"Change the “Additional Includedirectories” in “C/C++ / General” and “Additional Librarydirectories” in “Linker / General” according to your setup"
I already tried that... In 10000 ways. I also tried moving the dev-package lib and include folders into the src folders etc...
But I always get the same errors! Please help...
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: MSVC Compile Issues

Post by Watermelon »

ratarf wrote: - I downloaded the latest source code from the SVN
- I have VC correctly installed with the windows SDK correctly linked
- I copied the 'lib' and 'include' folders from 'lexfiles' to the warzone src folder

- Folder structure of "H:\Warzone"
  • warzone-devpkg
    • include
    • lib
  • warzone
    • src
    • data
    • ...
The error I get (and 100's of similar errors):

Code: Select all

1>h:\warzone\warzone\lib\gamelib\animobj.c(13) : fatal error C1083: Cannot open include file: 'lib/framework/frame.h': No such file or directory
The file is not missing!

I think it has something to do with the library/include files that are not correctly refered to in the project.

The compile guide says:

Code: Select all

"Change the “Additional Includedirectories” in “C/C++ / General” and “Additional Librarydirectories” in “Linker / General” according to your setup"
I already tried that... In 10000 ways. I also tried moving the dev-package lib and include folders into the src folders etc...
But I always get the same errors! Please help...
try adding 'warzone' folder to 'tools->options->VC++ directories->included files' and  'tools->options->VC++ directories->source files'
tasks postponed until the trunk is relatively stable again.
UrbanVoyeur
Trained
Trained
Posts: 50
Joined: 10 Mar 2007, 05:03
Location: NYC

Re: MSVC Compile Issues

Post by UrbanVoyeur »

Here's a different error:

Error 9 fatal error C1083: Cannot open include file: 'strings.h': No such file or directory w:\warzone_project\wz_2100_source\devpkg\include\sdl\sdl_stdinc.h 61

Error Repeats 175x for different files/locations

MSVC 2005  (same error on full and express, Win XP and 2003 R2 x64)
I have devpkg, MS SDK  and the source files all included. I used the flex and bison instructions to produce the .c & .h from the .y and .l

I do not have a "lexfiles" folder. Is string.h in the lexfiles folder? Ideas?
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: MSVC Compile Issues

Post by Watermelon »

UrbanVoyeur wrote: Here's a different error:

Error 9 fatal error C1083: Cannot open include file: 'strings.h': No such file or directory w:\warzone_project\wz_2100_source\devpkg\include\sdl\sdl_stdinc.h 61

Error Repeats 175x for different files/locations

MSVC 2005  (same error on full and express, Win XP and 2003 R2 x64)
I have devpkg, MS SDK  and the source files all included. I used the flex and bison instructions to produce the .c & .h from the .y and .l

I do not have a "lexfiles" folder. Is string.h in the lexfiles folder? Ideas?
strings.h is a header located in 'mingw\include' to ensure string.h with 'oldname' is included/defined.
tasks postponed until the trunk is relatively stable again.
UrbanVoyeur
Trained
Trained
Posts: 50
Joined: 10 Mar 2007, 05:03
Location: NYC

Re: MSVC Compile Issues

Post by UrbanVoyeur »

Watermelon wrote: strings.h is a header located in 'mingw\include' to ensure string.h with 'oldname' is included/defined.
Thanks.

I'm using MS Visual Studio 2005 to compile. If I include miniGW/include I get a gazillion syntax errors.

So i copied just strings.h to another inlcude directory and got past that error.

Now I get: Can't find 'inttypes.h'

Which is also a minGW file. Do I need to set some flag in the compile for MSVC or is this an issue with the sdl code not being set up for VC.
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: MSVC Compile Issues

Post by Watermelon »

UrbanVoyeur wrote: Thanks.

I'm using MS Visual Studio 2005 to compile. If I include miniGW/include I get a gazillion syntax errors.

So i copied just strings.h to another inlcude directory and got past that error.

Now I get: Can't find 'inttypes.h'

Which is also a minGW file. Do I need to set some flag in the compile for MSVC or is this an issue with the sdl code not being set up for VC.
I think you will have to investigate why it's using OS2 config instead of WIN32 config set for SDL...maybe 'WIN32' preprocessor is missing in your warzone->properties->C/C++->Preprocessor in your current settings.
tasks postponed until the trunk is relatively stable again.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: MSVC Compile Issues

Post by DevUrandom »

In the vcproj included in the SVN, WIN32 is correctly set for both compilation types...
UrbanVoyeur
Trained
Trained
Posts: 50
Joined: 10 Mar 2007, 05:03
Location: NYC

Re: MSVC Compile Issues

Post by UrbanVoyeur »

DevUrandom wrote: In the vcproj included in the SVN, WIN32 is correctly set for both compilation types...
I working from the 2.0.5 code. The compilation type appears to be set correctly to WIN32

Edit: I set up Tortoise, checked out the SVN tree, and I get the same error - inttypes.h not found.
BTW, flex and bison work, but the paths need to be included in the MSVC environment first.
tools --> options --> projects and solutions --> VC++ directories -->  [add the GNUWin32 and GNUWin32\bin paths]
Last edited by UrbanVoyeur on 24 Mar 2007, 05:35, edited 1 time in total.
User avatar
Watermelon
Code contributor
Code contributor
Posts: 551
Joined: 08 Oct 2006, 09:37

Re: MSVC Compile Issues

Post by Watermelon »

UrbanVoyeur wrote: I working from the 2.0.5 code. The compilation type appears to be set correctly to WIN32

Edit: I set up Tortoise, checked out the SVN tree, and I get the same error - inttypes.h not found.
BTW, flex and bison work, but the paths need to be included in the MSVC environment first.
tools --> options --> projects and solutions --> VC++ directories -->  [add the GNUWin32 and GNUWin32\bin paths]
the only workaround I could think of atm is to remove SDL_config_os2.h and rename SDL_config_win32.h in dev_package\include\SDL...it's obvious that SDL is choosing the wrong config file to include additional headers for some unknown reason...
tasks postponed until the trunk is relatively stable again.