Results 1 to 7 of 7

Thread: Cannot open include file 'pthread.h'?

  1. #1

    Default Cannot open include file 'pthread.h'?

    I started up a console 'Hello World' project, and while trying to compile it gives me that error. It doesn't give me the same error for the examples, though, what gives? I followed the project settings instructions under the tutorial, too.

  2. #2

    Default

    The file that asks for pthread.h is mutex.h @ line 44.

  3. #3
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Add "-pthread" to the GCC flags in your applications makefile

  4. #4

    Default

    I'm using Visual Studio 2008.

  5. #5

    Default

    Ah; I've seen this thread: http://www.rtsoft.com/forums/showthread.php?t=2706 , and I added WIN32 to the preprocessor options, but now I get these errors:

    Warning 1 warning LNK4031: no subsystem specified; CONSOLE assumed ClanLibHelloWorld ClanLibHelloWorld

    Error 2 error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup LIBCMTD.lib ClanLibHelloWorld

    Error 3 fatal error LNK1120: 1 unresolved externals W:\Users\Nicolas\Documents\Visual Studio 2008\Projects\ClanLibHelloWorld\Debug\ClanLibHello World.exe 1 ClanLibHelloWorld

  6. #6
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Your visual studio project options have not been set up.

    Have a look at the clanlib examples, and copy the settings.

  7. #7

    Default

    That did it, thanks!

Similar Threads

  1. open gl issue
    By thirun in forum Official ClanLib SDK Forums
    Replies: 1
    Last Post: 11-19-2009, 08:59 AM
  2. Starting up: issue with pthread.h
    By Flav in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 06-17-2009, 01:25 AM
  3. How do i set up the system to simply use <include.h>?
    By NVanGogh in forum Official ClanLib SDK Forums
    Replies: 4
    Last Post: 09-01-2008, 07:03 AM
  4. Console Problem - Doesn't want to open for me
    By webbear1000 in forum Novashell Game Creation System
    Replies: 4
    Last Post: 04-12-2007, 09:44 AM
  5. Documentation bug: please include OSX equivalents to hotkeys
    By whisperstorm in forum Novashell Game Creation System
    Replies: 2
    Last Post: 01-13-2007, 03:55 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
  •