• Opendoors 6.2

    From Sintrigue@VERT/ENDERBBS to Tharius on Wed Oct 13 17:57:00 2010
    Re: Opendoors 6.2
    By: Tharius to All on Tue Jun 28 2005 09:44 am

    I have set in Visual studio 6 a workspace for my BBSing projects. Inside this workspace I've defined 3 projects ... all windows console apps, 2 of which are online games and 1 is a supporting routine to both the games.

    I have modified the configurations to link in odoorw.lib and the programs seem able to find opendoor.h and related source based on modifications I mad the the include directories etc.

    Now for the weird one. Program 1 compiles and links, executes, no errors whatsoever. Program 2 always returns an unresolved external _main. (specifi error below.)

    Ok, so something in program 2's code right? Well, cut and paste program 1 over program 2 and now program 1 has the problem.

    Someone suggested program 1 is a .cpp and program 2 is a .c as being a possible problem, however, even after adjusting that, no dice.

    The code that seems to be causing the problem is from the opendoors documentation and reads more or less :

    #ifdef ODPLAT_WIN32
    int WINAPI WinMain (...)
    else
    int main(int argc, char *argv[])
    #endif

    { //code here
    }

    The specific error is :
    "LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main"

    I tracked down libcd.lib and don't see any reason why it wouldn't link if it were called, though I haven't specifically told it to link that in, but find no trace of crt0.obj anywhere. Again, this exact code is used in project 1 and works perfectly so I'm a little frustrated at trying to weed this out.

    Any advice would be greatly appreciated, I admit my own knowledge of visual studio is somewhat limited at this point but gaining all the time.

    Thanks


    Hi,
    VS6 has some odd little quirks, and you've obviously found one. Something you may want to consider is simply creating a new Project 2 and just copy the code from Project 1 into it and modify to suit your needs.

    From what you're saying, it's very likely some odd setting within the actual visual form settings that's the culprit and not your actual code. VS6 allows you to modify the form's countless features - one of those may have been inadvertently changed by you and is now causing the error.

    Just a thought. Best of luck.

    Sintrigue
    telnet://enderbbs.synchro.net
    enderbbs at gmail dot com
    I dream in code.

    ---
    ■ Synchronet ■ EnderBBS