public inbox for pthreads-win32@sourceware.org
 help / color / mirror / Atom feed
* Link error with VS71(.Net 2003): LNK1136, LNK2001
@ 2005-01-21 21:51 Gary bai
  2005-01-21 23:12 ` Gary bai
  0 siblings, 1 reply; 2+ messages in thread
From: Gary bai @ 2005-01-21 21:51 UTC (permalink / raw)
  To: pthreads-win32

Hi All,
I'm new to pthread-win32. I'm trying to build one test
program join3.c in the tests directory. If I build it
in command line "nmake clean VC", everything works.
But when I use MS Visual Studio .NET 2003 IDE to buld
the program, I got link errors.
If I link with pthreadVC1.dll, then the erorr is:
    fatal error LNK1136: invalid or corrupt file
If I link with pthreadVC1.lib, then the erorr are:
  error LNK2001: unresolved external symbol
_mainCRTStartup
  fatal error LNK1120: 1 unresolved externals
 
I have tried different compiler options like /MD or
/MT, etc, still failed. From the makefile provided in
the tests, there is one lib: ws2_32.lib to include. I
did it too, still failed. I also tried use the dll or
lib build by the nmake, still failed.
 
It works by invoking nmake in the tests dir to produce
the join3.exe, but not work in the IDE. Do I miss some
importent linker or C/C++ settings in IDE?
 
Any help is appreciate.
 
Gary



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Link error with VS71(.Net 2003): LNK1136, LNK2001
  2005-01-21 21:51 Link error with VS71(.Net 2003): LNK1136, LNK2001 Gary bai
@ 2005-01-21 23:12 ` Gary bai
  0 siblings, 0 replies; 2+ messages in thread
From: Gary bai @ 2005-01-21 23:12 UTC (permalink / raw)
  To: pthreads-win32

After I add libcmt.lib or msvcrt.lib, I can build the
test program with link to pthreadVC1.lib

Thank,

Gary

--- Gary bai <bai_gary@yahoo.com> wrote:

> Hi All,
> I'm new to pthread-win32. I'm trying to build one
> test
> program join3.c in the tests directory. If I build
> it
> in command line "nmake clean VC", everything works.
> But when I use MS Visual Studio .NET 2003 IDE to
> buld
> the program, I got link errors.
> If I link with pthreadVC1.dll, then the erorr is:
>     fatal error LNK1136: invalid or corrupt file
> If I link with pthreadVC1.lib, then the erorr are:
>   error LNK2001: unresolved external symbol
> _mainCRTStartup
>   fatal error LNK1120: 1 unresolved externals
>  
> I have tried different compiler options like /MD or
> /MT, etc, still failed. From the makefile provided
> in
> the tests, there is one lib: ws2_32.lib to include.
> I
> did it too, still failed. I also tried use the dll
> or
> lib build by the nmake, still failed.
>  
> It works by invoking nmake in the tests dir to
> produce
> the join3.exe, but not work in the IDE. Do I miss
> some
> importent linker or C/C++ settings in IDE?
>  
> Any help is appreciate.
>  
> Gary
> 
> 
> 
> 		
> __________________________________ 
> Do you Yahoo!? 
> The all-new My Yahoo! - What will yours do?
> http://my.yahoo.com 
> 



		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-01-21 23:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-21 21:51 Link error with VS71(.Net 2003): LNK1136, LNK2001 Gary bai
2005-01-21 23:12 ` Gary bai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).