Results 1 to 7 of 7

Thread: Compiling CL in VS 2008

  1. #1

    Default Building CL in VisualStudio 2008

    I would just like to start by saying that I am extremely new to programming, so the more simple the explanation, the better, if it's possible. However, I will appreciate any help I can get:

    I have creating the CL solution in VS 2008, and I am trying to build it now. I have set up the directories for the include and lib files, and I downloaded and linked the DirectX SDK as well. When I try to build it following the directions on the clanlib.org website, I get the following error messages:

    (CORE)
    fatal error C1083: cannot open include file 'zlib.h': no such file or directory

    (DISPLAY)
    fatal error C1083: cannot open include file 'png.h': no such file or directory
    fatal error C1083: cannot open include file 'jpeglib.h': no such file or directory
    fatal error C1083: cannot open include file 'f2build.h': no such file or directory

    Please help! Any info, even a nudge in the right direction will be appreciated! Thanks in advance!
    Last edited by ViolentOne; 08-14-2009 at 12:25 AM.

  2. #2

    Default

    Any reason you need to compile them yourself? If your new to programming, it would be much easier to start with the pre-compiled binaries. But if you want to give compiling ClanLib yourself a try, you'll need to get the required external dependencies(add them to your include and lib directories).

    Both the pre-compiled binaries, and external dependencies for Windows can be found here.

    I've never compiled ClanLib myself yet, so if you still can't seem to get it to compile, it might be that I don't know what I'm talking about. But then at least you could go the pre-compiled version route.

    Ether way, good luck!
    Last edited by Protocol; 08-12-2009 at 11:50 PM.

  3. #3

    Default

    My sincerest apologies protocol. It seems I have used the wrong terminology. I downloaded the pre-compiled binaries, so I guess what I am trying to do is build the CL environment in VS 2008, not compile it. I am using the build option when the errors are occuring. When I try to debug, it asks me to "specify the name of the executable file to be used for the debug session", which I don't understand, so I tried to build it and I am now getting those errors. Any suggestions?

  4. #4

    Default

    No problem.
    According to your first post, it seems that your missing the external libraries needed to used CL(this is why you have missing header files).

    As for the other message that your getting: DLLs require a host executable to run, which is what VC++ is asking for. Therefor, I think your project is set to be built as a DLL--probably something you don't want. You can check for this under your project settings: C/C++: Code Generation: Runtime library. Make sure it is set to "Multi-threaded Debug (/MTd)" to build the project as an executable.

    If you still can't get things to work, try building one of the examples that come in the source package. If you can get one of those to work, you can take a look at the example's settings, and compare it with your own project for differences.

    I'm not entirely fluent in this stuff, but hopefully that helps.

  5. #5

    Default

    Thanks for the help so far.

    I had already downloaded the external libraries and installed them in the same directory as the other include and lib files. I downloaded the set you linked to just to double-check, but I still got the same error messages. I also checked the Code Generation settings and they were already set to "Multi-Threaded Debug", so that doesn't seem to be the problem either. Any other suggestions?

    I built one of the examples, "Basic2D", but I got the following error message:

    LINK : fatal error LNK1104: cannot open file 'zlib-static-mt-debug.lib'


    I really want to finish this book I am reading and get comfortable with the basics of C++ programming, and this is a huge setback right now. Are there any other good places to learn C++ game programming online(hopefully using the Visual Studio IDE)?

  6. #6
    ClanLib Developer
    Join Date
    Sep 2006
    Location
    Bergen, Norway
    Posts
    588

    Default

    You need to set the Library path in Developer Studio to point where the zlib library is located (same as you did for includes). You find it under Tools->Options->Projects & Solutions->VC++ Directories->Show Directories for Library Files->Add

    http://clanlib.org/docs/clanlib-2.0.0/overview/install-windows-msvc.html

  7. #7

    Default

    Thank you so much for your help! It worked! I really appreciate it. Now I have another question, which I will post a new topic for.

Similar Threads

  1. A General VC 2008 Question/Problem
    By catch22 in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 06-06-2009, 09:50 PM
  2. Clanlib 0.8.1 & Visual Studio 2008 Breakpoints
    By Angelo in forum Official ClanLib SDK Forums
    Replies: 7
    Last Post: 04-17-2009, 06:25 PM
  3. Help in Installing Clanlib [Visual 2008]
    By AndrewFM in forum Official ClanLib SDK Forums
    Replies: 11
    Last Post: 11-05-2008, 03:42 AM
  4. How To Configure IDE VisualC++ 2008 Express to Build ClanLib
    By THULE in forum Official ClanLib SDK Forums
    Replies: 2
    Last Post: 08-28-2008, 09:50 AM
  5. Help, vc++ 2008, failed compiling
    By ironized in forum Official ClanLib SDK Forums
    Replies: 3
    Last Post: 08-13-2008, 06:56 AM

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
  •