another newbie! Can't link MFC app...

another newbie! Can't link MFC app...

Post by B. Stur » Mon, 12 May 1997 04:00:00



I am trying to compile an MFC example taken from a book that uses only
afxwin.h for a header.  When linking I get the following errors...

nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
__endthreadex and the same with __beginthreadex.

I have tried including nafxcwd.lib into my project and not including
it.  I have also checked both use shared dll and staticly linked dll.
None of which helped.  Any help would be appreciated.  Also, I'm using
VC++5.0.
--
        Brian Sturk

Curator of the 'Unofficial Homepage for Borland C++ Builder'
http://www.nh.ultranet.com/~bsturk

'Whatever happened to Pong?' -- Frank Black (The Pixies)

 
 
 

another newbie! Can't link MFC app...

Post by David Sha » Tue, 13 May 1997 04:00:00


--------------732F1B36EB430C0E81D39783
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Sounds as if you havn't included the MFC dll in your linking.  Try going
to the build option in the menu, choose settings.  Then on the general
tab look at Microsoft Foundation Classes, it should be one of the 'use
MFC' choices, if it isn't then choose one of them.  That should sort out
your problem.



> I am trying to compile an MFC example taken from a book that uses
> only
> afxwin.h for a header.  When linking I get the following errors...

> nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external
> symbol
> __endthreadex and the same with __beginthreadex.

> I have tried including nafxcwd.lib into my project and not including

> it.  I have also checked both use shared dll and staticly linked
> dll.
> None of which helped.  Any help would be appreciated.  Also, I'm
> using
> VC++5.0.
> --
>         Brian Sturk

> Curator of the 'Unofficial Homepage for Borland C++ Builder'
> http://www.nh.ultranet.com/~bsturk

> 'Whatever happened to Pong?' -- Frank Black (The Pixies)

--------------732F1B36EB430C0E81D39783
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML><BODY>
Sounds as if you havn't included the MFC dll in your linking.&nbsp; Try
going to the build option in the menu, choose settings.&nbsp; Then on the
general tab look at Microsoft Foundation Classes, it should be one of the
'use MFC' choices, if it isn't then choose one of them.&nbsp; That should
sort out your problem.
<BR>

<BR>

<BLOCKQUOTE TYPE=CITE>I am trying to compile an MFC example taken from
a book that uses only
<BR>afxwin.h for a header.&nbsp; When linking I get the following errors...
<BR>
<BR>nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
<BR>__endthreadex and the same with __beginthreadex.
<BR>
<BR>I have tried including nafxcwd.lib into my project and not including
<BR>it.&nbsp; I have also checked both use shared dll and staticly linked dll.
<BR>None of which helped.&nbsp; Any help would be appreciated.&nbsp; Also,
I'm using
<BR>VC++5.0.
<BR>--
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Brian Sturk
<BR>
<BR>Curator of the 'Unofficial Homepage for Borland C++ Builder'
<BR><A HREF="http://www.nh.ultranet.com/~bsturk">http://www.nh.ultranet.com/~bsturk</A>
<BR>
<BR>'Whatever happened to Pong?' -- Frank Black (The Pixies)
</BLOCKQUOTE>
&nbsp;&nbsp;

</BODY>
</HTML>

--------------732F1B36EB430C0E81D39783--

 
 
 

another newbie! Can't link MFC app...

Post by David Sha » Tue, 13 May 1997 04:00:00


--------------8BE977AE5CE05E2BFF9108AB
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Sorry I am a donkey, I didn't read the message properly before
answering.


> Sounds as if you havn't included the MFC dll in your linking.  Try
> going to the build option in the menu, choose settings.  Then on the
> general tab look at Microsoft Foundation Classes, it should be one
> of the 'use MFC' choices, if it isn't then choose one of them.  That
> should sort out your problem.



>> I am trying to compile an MFC example taken from a book that uses
>> only
>> afxwin.h for a header.  When linking I get the following
>> errors...

>> nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external
>> symbol
>> __endthreadex and the same with __beginthreadex.

>> I have tried including nafxcwd.lib into my project and not
>> including
>> it.  I have also checked both use shared dll and staticly linked
>> dll.
>> None of which helped.  Any help would be appreciated.  Also, I'm
>> using
>> VC++5.0.
>> --
>>         Brian Sturk

>> Curator of the 'Unofficial Homepage for Borland C++ Builder'
>> http://www.nh.ultranet.com/~bsturk

>> 'Whatever happened to Pong?' -- Frank Black (The Pixies)

--------------8BE977AE5CE05E2BFF9108AB
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML><BODY>
Sorry I am a donkey, I didn't read the message properly before answering.
<BR>

<BLOCKQUOTE TYPE=CITE>&nbsp;
<BR>
<BR>Sounds as if you havn't included the MFC dll in your linking.&nbsp; Try
going to the build option in the menu, choose settings.&nbsp; Then on the
general tab look at Microsoft Foundation Classes, it should be one of the
'use MFC' choices, if it isn't then choose one of them.&nbsp; That should
sort out your problem.
<BR>

<BR>

<BLOCKQUOTE TYPE=CITE>I am trying to compile an MFC example taken from
a book that uses only
<BR>afxwin.h for a header.&nbsp; When linking I get the following errors...
<BR>
<BR>nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
<BR>__endthreadex and the same with __beginthreadex.
<BR>
<BR>I have tried including nafxcwd.lib into my project and not including
<BR>it.&nbsp; I have also checked both use shared dll and staticly linked dll.
<BR>None of which helped.&nbsp; Any help would be appreciated.&nbsp; Also,
I'm using
<BR>VC++5.0.
<BR>--
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Brian Sturk
<BR>
<BR>Curator of the 'Unofficial Homepage for Borland C++ Builder'
<BR><A HREF="http://www.nh.ultranet.com/~bsturk">http://www.nh.ultranet.com/~bsturk</A>&nbsp;
<BR>
<BR>'Whatever happened to Pong?' -- Frank Black (The Pixies)
</BLOCKQUOTE>
&nbsp;
</BLOCKQUOTE>

</BODY>
</HTML>

--------------8BE977AE5CE05E2BFF9108AB--

 
 
 

another newbie! Can't link MFC app...

Post by Chris Marriot » Tue, 13 May 1997 04:00:00




Quote:>I am trying to compile an MFC example taken from a book that uses only
>afxwin.h for a header.  When linking I get the following errors...

>nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
>__endthreadex and the same with __beginthreadex.

>I have tried including nafxcwd.lib into my project and not including
>it.  I have also checked both use shared dll and staticly linked dll.
>None of which helped.  Any help would be appreciated.  Also, I'm using
>VC++5.0.

You're compiling with the wrong version of the C runtime library. If
you're using MFC, you must set up the project options to use the
multithreaded C library, not the singlethreaded library.

Chris

----------------------------------------------------------------

Creators of fine astronomy software for Windows.
For full details, visit our web site at http://www.skymap.com

 
 
 

another newbie! Can't link MFC app...

Post by Graha » Wed, 14 May 1997 04:00:00


Whenever you have a newbie question do the following, it may save you some
time, it does for me!:

1.  Search MFC FAQ's - there are heaps around, try a search engine or two.
Get each one and save it on your local disk for reference.
2.  Try www.dejanews.com and search in newgroups starting in
"comp.ms-windows.*" for your keyword (eg. use the link error number
LNKnnnn)
3.  Search MS Knowledgebase.

I find most of my problems have been solved before via one of these
excellent services.  For this particular problem there are a huge number of
articles.  I solved my problem that was EXACTLY the same as yours by
re-ordering the search order that the LINKER uses by first excluding
several libraries then including them in the correct order.  There are
several articles on how to do this in dejanews.

Regards..........Graham



Quote:> I am trying to compile an MFC example taken from a book that uses only
> afxwin.h for a header.  When linking I get the following errors...

> nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
> __endthreadex and the same with __beginthreadex.

> I have tried including nafxcwd.lib into my project and not including
> it.  I have also checked both use shared dll and staticly linked dll.
> None of which helped.  Any help would be appreciated.  Also, I'm using
> VC++5.0.
> --
>    Brian Sturk

> Curator of the 'Unofficial Homepage for Borland C++ Builder'
> http://www.nh.ultranet.com/~bsturk

> 'Whatever happened to Pong?' -- Frank Black (The Pixies)

 
 
 

another newbie! Can't link MFC app...

Post by Kamlesh Talrej » Wed, 14 May 1997 04:00:00


Brian,
     Check if you have set the Use Microsoft Foundation Classes option in
the Project Settings Dialog box in the General tab.
I think that should solve your problem.
Kamlesh Talreja



Quote:> I am trying to compile an MFC example taken from a book that uses only
> afxwin.h for a header.  When linking I get the following errors...

> nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
> __endthreadex and the same with __beginthreadex.

> I have tried including nafxcwd.lib into my project and not including
> it.  I have also checked both use shared dll and staticly linked dll.
> None of which helped.  Any help would be appreciated.  Also, I'm using
> VC++5.0.
> --
>    Brian Sturk

> Curator of the 'Unofficial Homepage for Borland C++ Builder'
> http://www.nh.ultranet.com/~bsturk

> 'Whatever happened to Pong?' -- Frank Black (The Pixies)

 
 
 

another newbie! Can't link MFC app...

Post by A.A.Gerritse » Thu, 15 May 1997 04:00:00


How the hell do you create this unreadable big text!?

Armin

 
 
 

another newbie! Can't link MFC app...

Post by David Sha » Sat, 17 May 1997 04:00:00


--------------3C17D463FF38AEFE55B96CC4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit


> How the hell do you create this unreadable big text!?

> Armin

Is this better?

--------------3C17D463FF38AEFE55B96CC4
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<HTML><BODY>

<BLOCKQUOTE TYPE=CITE><FONT FACE="Arial,Helvetica"><FONT SIZE=-2>How the
hell do you create this unreadable big text!?</FONT></FONT>
<BR><FONT FACE="Arial,Helvetica"><FONT SIZE=-2></FONT></FONT>
<BR><FONT FACE="Arial,Helvetica"><FONT SIZE=-2>Armin</FONT></FONT>
</BLOCKQUOTE>
<FONT FACE="Arial,Helvetica"><FONT SIZE=-2>Is this better?</FONT></FONT>

</BODY>
</HTML>

--------------3C17D463FF38AEFE55B96CC4--

 
 
 

1. MFC and DOS apps - Redirecting console output to an MFC app (Newbie)

Greetings

An important part of my final year project  is using a DOS  program , inside
Windows 9x.
The program is written in Borland C++ 1.0 and it's impossible to be ported
to win32 because it performs hardware access using far and near pointers (as
you may know this is prohibited inside Visual C++)

So, I am stuck with a console application inside Win9x.The major problem is
the interface which has to be consistent with other MFC apps I have written.
So, I was wondering if it is possible to implement a basic MFC interface to
this ms-dos prompt program (like a window or a dialog).
Redirecting console output to an MFC application window would also be great
,but is it possible?.

Any suggestions would be highly appreciated.
Thanks in advance

George Sgouros

2. Windows XP and IIS compatibility

3. Adding an "Import" menu to an MFC SDI App (MFC newbie)...

4. What is diff between 2.02 vs. 3.0? (Netscape)

5. Using appwizard generated MFC DLL's with an appwizard MFC app

6. MULTIPLE E-MAIL ADDRESSES

7. Newbie: Win CE apps - Win32 or MFC

8. Parent detecting MouseMove in a child window

9. newbie: How to add wizard to your MFC app?

10. MFC Newbie & dialog app icon

11. Newbie, Win apps 'start in' box

12. WMV compile/link settins for an MFC app

13. How to slim down a statically linked MFC app?