views:

65

answers:

1

Hi

Could someone please help me to compile my .c file with MSVC++6 in windows xp? From this morning, I am trying to compile it but it give me the following errors:

--------------------Configuration: server_th - Win32 Debug--------------------
Linking...
server_thread.obj : error LNK2001: unresolved external symbol _ThreadMain Debug/server_th.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe.

server_th.exe - 2 error(s), 0 warning(s)

The same file was compiled in Unix but in windows xp, I don't know what is the matter with it. Even when I changed "run-time library" to Debug Multithreaded or Debug Multithreaded DLL, the errors are the same .

So,I would be glad if somneone would help me with it...

Thanks in advance for your, replies

+1  A: 

i guess MSVC6 only recognize program execution starting point of either main(intargc,char*argv[],char*envp[]) or wmain(intargc,wchar_t*argv[],wchar_t*envp[]) for wide char version.

perhaps you forgot to link in files containing the _ThreadMain subroutine?

YeenFei
Thanks a lot my friend! I spent almost one to find out where is the error. Yes the threadmain function was missing and this is why I had a problem with linking ...Thanks gain!
make