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
Sysop: | Eric Oulashin |
---|---|
Location: | Beaverton, Oregon, USA |
Users: | 90 |
Nodes: | 16 (0 / 16) |
Uptime: | 08:44:28 |
Calls: | 5,073 |
Calls today: | 5 |
Files: | 8,491 |
Messages: | 352,810 |