Results 1 to 19 of 19

Thread: Can't find windows.h - Compiling ClanLib

  1. #1

    Default Can't find windows.h - Compiling ClanLib

    __________
    Last edited by Katzewurzt; 09-29-2009 at 02:19 PM.

  2. #2

    Default

    what version of VS do you have? I had this error on VC++ 2005 Express. Solved this error by installing Visual Studio 2005 full.

  3. #3
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    Hi, I wrote the walkthrough you linked to. Maybe I forgot some steps, but when I checked in the control panel, I didn't install any more programs at that time.

    Do you use the 0.8.0 svn version or the 0.8.0 release? I had problems with the release version. I don't remember if it was connected with your "windows.h" problem, but it rings a bell in my head...

  4. #4
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    I used the 7.1 option and it worked for me (visual studio express 2008 beta).

    Do you mean that you don't get a clanlib project file of version 7.1 that you can convert to your choice, i.e. double click and open with visual studio?

  5. #5
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    Where is the clanlib project file generated?
    It should be next to the configure solution, and not in a "Debug" sub directory. Otherwise the paths are not correct. I had to remove Debug in the configure project file to accomplish this.

    Thus,
    I have clanlib.sln next to configure-vc80.exe and have Sources, Examples as sub directories

  6. #6
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    Very strange. Maybe something went wrong in the creation of configure.

    Is it possible for you to use the attached clanlib.sln? remove .txt in the end of the name...
    Attached Files Attached Files

  7. #7
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    Do you have that file? I have it.

    configure-vc80.exe should create it. I have just tried this once again.

    I think that you have not "fixed" the configure.vcproj file correct. There are Debug on many places in the configure-vc80.vcproj file

    Open configure-vc80.sln (doubleclick and convert). Remove Debug from sln in project properties

    I think it could be "Debug" in around 6-10 places in the menus. Pleace create configure-vc80.exe again! I believe this should work!

  8. #8

    Default

    First of all:
    If you have VC 2005 express, you need to download the Platform SDK (search around the microsoft downloads site, it's there). It already comes bundled with the professional version because they're distributed as CDs as opposed to the express which are downloaded (the Platform SDK's more than 200 MB I think... it may even reach 500 MB). Make sure that it's updated to SP1.

    Then you have to set your compiler paths so that it can "find" the platform SDK. Instructions on how to do it is already in the documentation of the Platform SDK so I'm not gonna repeat it here.

    Then you have to download the precompiled files for VC 8 + SP1 (unless you want to build em yourself). Organize them in a way such that you have a folder called "Libraries" and in it has "include", "lib" and "bin" folders. Unzip the precompiled files and make sure that all *.h or *.hpp or *.hxx files are in "include", all *.lib in "lib" and the rest (*.exe, *.dll) in "bin".

    Open up the configure solution and press F5, if you set the platform SDK paths correctly, it should build and run without any major problems.

    When the configure app asks for the "include" and "lib" files, point them to the "Libraries\include" and "Libraries\lib" folders that you created a moment ago.

    The configure app will then create a couple of projects and solutions in the same directory. Open them. If they ask for conversion, proceed.

  9. #9
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    SnT2k:
    Is it differences between VS express 2005 and 2008? I didn't install any platform sdk what I know. I use VS express 2008 and installed the DirectX sdk. It seems that dsound.h, dinput.h are in the DirectX SDK


    Katzewurzt:
    Have you done this?
    "Download needed packages at http://clanlib.org/download-binaries-win32-vc80.html Put include + lib directories on hard disk, e.g. c:\Programs\dev\{include|lib}. Add these directories to Visual studio (tools->options->projects and solutions->vc++ directories->{library|include} files)"

    Example:
    Extract SDL-1.2.9.zip to temp directory. Copy the content inside include (the SDL directory) to e.g. c:\development\include. Copy the content inside lib(some lib and pdp files) to e.g. c:\development\lib.

  10. #10

    Default

    2005 vs. 2008: class designer, promise of better performance in the ide, better C++ compliance, better dynamic help, improved intellisense. Just to name a few. downside: it's in beta and most of the precompiled stuff here are for vc 2005. That is, you'll have to compile libjpeg, libpng, libvorbis, libogg, etc. by yourself. It would've been fine if they were at least compiled as DLLs but they aren't so you really have to compile them from scratch.

    DirectX is COM-based, so it still needs the Platform SDK, that is, don't be too surprised if you find "#include <windows.h>" in one of the DirectX headers... you'll eventually need it... you won't get away without it unless all you do is to do console programs.

    Also, it's been pointed out by they docs already: you don't need all of the libraries. That is, if you're not gonna use ClanSDL, you don't have to get SDL.

  11. #11
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    You download them from http://clanlib.org/download-binaries-win32-vc80.html as written before.

    libjpeg-6b.zip
    libpng-1.2.14.zip
    zlib-1.2.3.zip
    libmikmod-3.2.0-b2.zip (Visual C++ 7 binary)
    libvorbis-1.1.2.zip
    libogg-1.1.3.zip
    SDL-1.2.9.zip (Visual C++ 7 binary)
    sdl-gfx-2.0.13.zip (Visual C++ 7 binary)

    Inside each .zip (extract!), there is a include and a lib directory that you put in a common place. I copied them to C:\programs\dev\lib and C:\programs\dev\include

    Example:
    libjpeg-6b.zip has a "include" directory that contains 4 .h files and lib directory that confains .lib and .pdb files. Copy the include and lib directories to a common place!

    Then you tell VS where to find them. "Add these directories to Visual studio (tools->options->projects and solutions->vc++ directories->{library|include} files)"

  12. #12
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    I have my dsound.h in "C:\Program Files (x86)\Microsoft DirectX SDK (August 2007)\Include\dsound.h", i.e. the place where direcx sdk is installed.

    To tell VS where to find that file, I have added a directory in "tools->options->projects and solutions->vc++ directories" on the same way as for the downloaded include directories from the .zip files (libjpeg-6b.zip, libpng-1.2.14.zip, zlib-1.2.3.zip ...)

  13. #13
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    SDL is on the top right on the page: http://clanlib.org/download-binaries-win32-vc80.html
    vorbis/codec.h is in the vorbis package at the same page...
    Maybe you missed them?

  14. #14
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    I would have corrected it and removed yor fix. It could just cause strange problems later on...

    It works now, right?

    To compile the examples is hopefully easier for you But a good step to take to prove that you have a good environment!

  15. #15
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    I am oldfashioned and have icq. Anyway, it is good that this thread is filled, because other might need the info...

  16. #16

    Default

    make sure that libs were installed, not only compiled . or compile them in release mode, not in debug. as for me, when I compiled in debug mode, clanlib examples run succesfuly, but there occured error in compiling my own projects. solved this problem by compiling ClanLib in release mode )

  17. #17
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    Since you hade wrong path to your includes, check path to your libs!

    Can you confirm that you have the file?

    Is that path correct in "tools->options->projects and solutions->vc++ directories->library files" ?

  18. #18
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Denmark
    Posts
    554

    Default

    The problem is most likely that he runs the configure application from the debug directory (i.e. from explorer instead of launching it from within visual studio). This causes the configure program to fail because it expects the root directory of the clanlib package to be the current working directory.

    For tips on how to setup ClanLib and Visual Studio Express, please see: http://clanlib.org/docs/clanlib-0.9....dows-msvc.html

    Although that's for 0.9 most of the things apply to 0.8 as well.

  19. #19
    Squire
    Join Date
    Oct 2007
    Location
    Stockholm
    Posts
    26

    Default

    Quote Originally Posted by Magnus Norddahl View Post
    For tips on how to setup ClanLib and Visual Studio Express, please see: http://clanlib.org/docs/clanlib-0.9....dows-msvc.html

    Although that's for 0.9 most of the things apply to 0.8 as well.
    Nice link! Very useful, but the page would be much more used if 0.8.0-people know it exist. Have I missed that link? I suggest a link from the 0.8.0/Overview docs!

Similar Threads

  1. Help compiling ClanLib
    By Shauni in forum Official ClanLib SDK Forums
    Replies: 7
    Last Post: 06-28-2007, 12:53 AM
  2. having trouble compiling clanlib programs on a mac
    By mike in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 06-20-2007, 05:00 PM
  3. Latest windows build corrupted?
    By whisperstorm in forum Novashell Game Creation System
    Replies: 1
    Last Post: 03-03-2007, 12:22 PM
  4. error compiling 0.9 svn
    By voudras in forum Official ClanLib SDK Forums
    Replies: 0
    Last Post: 01-11-2007, 06:47 AM
  5. Animated Windows and Dialogs
    By AllenJB in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 09-20-2006, 04:28 PM

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •