Results 1 to 6 of 6

Thread: Weird build problem

  1. #1

    Default Weird build problem [Solved!]

    Just transferred everything to vs2005 and getting a weird problem when I build. Everything compiles and links alright, but when I run the program all I get is the libpng test program. ?!?!?. Tried rebuilding libpng from latest sources.

    Using some precompiled binaries from my last environment, the ones that are called clanApp-static-mt-debug.lib etc.

    Worked fine before reinstalling windows and switching to vs2005. Is there a solution that avoids rebuilding all the other libs?

    Thanks, Dom.
    Last edited by void_kill; 11-10-2006 at 05:06 PM. Reason: Solved

  2. #2
    Administrator Seth's Avatar
    Join Date
    Jul 2002
    Location
    Japan
    Posts
    5,343

    Default

    Hmm, depending on what you've upgraded from (vc6?) you probably do need to recompile. And use the VC7 binaries of the support libs like libpng too.
    Seth A. Robinson
    Robinson Technologies

  3. #3

    Default

    Actually thinking about it, it was just vs2005 express edition, the free download. Gonna start a complete rebuild now anyway.

    UPDATE: just did a complete rebuild and still have the same problem. Very odd. Must be going to a different "main" from somewhere but I don't know how. Exactly the same code as before, and it's exactly the same code as my gcc build on linux which works fine.
    Last edited by void_kill; 11-07-2006 at 03:50 PM.

  4. #4
    Peasant
    Join Date
    Nov 2006
    Location
    Laval, Qc, Canada
    Posts
    5

    Default

    I am having the same problem as void_kill. When I include the file <ClanLib/display.h>, the program compiles successfully and the resulting executable is the libpng test program.

    When I remove that #include directive, however, the linking phase fails with the following error:
    Linking...
    LINK : warning LNK4031: no subsystem specified; CONSOLE assumed
    LIBCMT.lib(crt0.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup

    This is just a wild guess, but it appears that somewhere in ClanLib/display.h, there is some library import that contains the wrong entry point for the program (namely, the libpng test...)

    I am using ClanLib 0.8 with Visual C++ 2005 Express Edition.

  5. #5

    Default

    Solved this! You have to set the subsytem to Windows (Properties > Configuration > Linker > System > SubSystem). Working for me now. Hope this works for you as well, Sherack Nhar.

  6. #6
    Peasant
    Join Date
    Nov 2006
    Location
    Laval, Qc, Canada
    Posts
    5

    Default

    IT'S ALIIIIIVE!

    Thank you so much void_kill! I can't believe how much of a hassle it is to set up VS2005 Express just to develop Win32 applications. Once I get the hang of Clanlib, I think I'll switch to the Eclipse environment...

Similar Threads

  1. bow problem
    By rabidwolf9 in forum Dink Smallwood HD
    Replies: 0
    Last Post: 12-23-2004, 08:28 PM
  2. Somthin Weird
    By AntiLoveShadow in forum Dink Smallwood HD
    Replies: 2
    Last Post: 11-26-2004, 12:52 PM
  3. Try my weird little game
    By Seth in forum RTsoft Tavern
    Replies: 10
    Last Post: 03-29-2003, 08:34 PM
  4. Weird Idea
    By redink1 in forum Funeral Quest
    Replies: 1
    Last Post: 12-07-2002, 11:32 PM
  5. Weird Redraw Bug
    By redink1 in forum Other RTsoft Games
    Replies: 1
    Last Post: 10-14-2002, 10:51 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
  •