Results 1 to 9 of 9

Thread: x11 Library location?

  1. #1

    Default x11 Library location?

    Code:
    #include <Clanlib/display.h>
    #include <Clanlib/core.h>
    #include <Clanlib/gl.h>
    #include <Clanlib/Application.h>
    #include <Clanlib/Sound.h>
    
    
    class cClanLibApp : public CL_ClanApplication
    {
    public:
           cClanLibApp();
           ~cClanLibApp();
    
           virtual int main(int, char **)
           {
           CL_SetupCore setup_core;
           CL_SetupDisplay setup_display;
           CL_SetupSound setup_sound;
           CL_SetupGL setup_gl;
    
           return 0;
           }
    
    }app;
    Hey you guys, I have a little problem here

    Switching to target: default
    construction.cpp
    d:\Program Files\CodeBlocks\Include\ClanLib\Display\keys.h(35 2) : fatal error C1083: Cannot open include file: 'X11/keysym.h': No such file or directory
    Process terminated with status 1 (0 minutes, 0 seconds)
    1 errors, 0 warnings
    I tried googling for the required library files, however I am unable to find ones that work with this setup.

    http://www.x.org/wiki/Releases/Downl...direct=Mirrors

    I tried a few of the later versions of the x windows library, but no go. Help me /b/ ;____;

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

    Default

    There is some dev-package missing, maybe libX11-dev. What OS do you use?

    Anyone know how to search which package is needed för a headerfile? Except via google of cource...

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

    Default

    Seems its Windows with some GCC compiler variant based on the output. It attempts to include X11 because the source code thinks you are compiling for unix. Specifically its the WIN32 define that is missing, but depending on how you are compiling ClanLib, it may be something more complex to solve than simply setting the WIN32 define.

  4. #4

    Default

    Platform is Windows XP, compiling using visual c++ toolkit 2003.

    Very new to this, got this far mostly by self learning, so forgive my noobishness. When you mentioned compiling clanlib did you mean compiling the clanlib files from source or using those files in a project?

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

    Default

    Same rule applies to compiling and using it. If you got this in Visual Studio 2003, then I assume you get this error in your own application and not when building ClanLib.

    Any Win32 application should have the following defines set:

    WIN32
    WINVER=0x0600
    _WIN32_WINNT=0x0600

    Normally Visual Studio projects define at least the first one, but you may have accidentially removed it from your project settings.

    The WIN32 define is what tells the Windows SDK and libraries that you are compiling for Windows. Other similar defines are the _APPLE_ define for Macs, WIN16 for 16 bit windows and so on.

    The WINVER and _WIN32_WINNT defines tell the Windows SDK what version of Windows you'd like to target. They are strictly not required, but if you do not set them, windows.h and other headers will assume you are targeting Windows 95, NT 4 or something like that. This means that certain functions you find in the MSDN documentation will be unavailable (that is, you get a compile error about them being undeclared if you try to call them). Btw, setting them to 0x0600 (Windows Vista) still allows your program to run on older versions of Windows - as long as you don't actually call any function only available in Vista.

  6. #6

    Default

    Interesting. Thanks for the info, the problem seems to be gone now.

    Using Code::Blocks, which does not seem to define that for you when you start a win32 gui app. Though it is best to know what you are doing whether or not you have automatic features.

    Got another error now though. No changes to original code.

    Project : Win32 Application
    Compiler : Microsoft Visual C++ Toolkit 2003 (called directly)
    Directory : C:\Documents and Settings\Owner\My Documents\C++ Projects\
    --------------------------------------------------------------------------------
    Switching to target: default
    Linking executable: C:\Documents and Settings\Owner\My Documents\C++ Projects\Win32GUI.exe
    LINK : fatal error LNK1104: cannot open file 'clanSignals-static-mt.lib'
    Process terminated with status 1 (0 minutes, 0 seconds)
    1 errors, 0 warnings
    I've already linked all the library files compiled when I built clanlib, so I have no idea where this is from especially since I did not include signals.h anywhere. Is this another devpack I require? Or did I compile clanlib wrongly the first time?

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

    Default

    This library should be generated when compiling ClanLib. Check the library directory and see if its there together with the other libraries (clanCore, clanDisplay, etc).

    If it is, add it to your linker settings. If not, make sure clanSignals is also compiled

  8. #8

    Default

    This is really strange. When I rebuilt the libraries, besides the include files in the include folder, I only ended up with clanSignals.lib and clanSignalsd.lib in the output library folder.

    I can't find clanSignals-static-mt.lib anywhere. Maybe there are some settings I am leaving out? Building Clanlib-0.8.0 btw.

    Project : clanSignals
    Compiler : Microsoft Visual C++ Toolkit 2003 (called directly)
    Directory : D:\ClanLib-0.8.0\Sources\
    --------------------------------------------------------------------------------
    Switching to target: Release
    slot_generic.cpp
    slot.cpp
    Linking static library: D:\Program Files\CodeBlocks\clanlib(lib)\clanSignals.lib
    Switching to target: Debug
    slot_generic.cpp
    slot.cpp
    Linking static library: D:\Program Files\CodeBlocks\clanlib(lib)\clanSignalsd.lib
    D:\ClanLib-0.8.0\Sources>if not exist "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib" mkdir "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib"
    D:\ClanLib-0.8.0\Sources>if not exist "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals" mkdir "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals"
    D:\ClanLib-0.8.0\Sources>copy "API\signals.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\signals. h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\signal.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ signal.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\signal_v0.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ signal_v0.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\signal_v1.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ signal_v1.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\signal_v2.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ signal_v2.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\signal_v3.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ signal_v3.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\signal_v4.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ signal_v4.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\signal_v5.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ signal_v5.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\slot.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ slot.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\slotbuffer_v0.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ slotbuffer_v0.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\slotbuffer_v1.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ slotbuffer_v1.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\slot_container.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ slot_container.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\slot_generic.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ slot_generic.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\slot_v0.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ slot_v0.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\slot_v1.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ slot_v1.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\slot_v2.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ slot_v2.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\slot_v3.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ slot_v3.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\slot_v4.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ slot_v4.h" 1>nul
    D:\ClanLib-0.8.0\Sources>copy "API\Signals\slot_v5.h" "D:\Program Files\CodeBlocks\clanlib(include)\ClanLib\Signals\ slot_v5.h" 1>nul
    Process terminated with status 0 (0 minutes, 2 seconds)
    0 errors, 0 warnings

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

    Default

    Perhaps it is only compiling clanSignals. Try batch build all the projects.

Similar Threads

  1. Error while Building clanDisplay Library
    By thfai2000 in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 12-21-2006, 07:21 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
  •