Solved

Using CFile & CString in non-MFC app

Posted on 1997-07-07
4
823 Views
Last Modified: 2013-11-20

I am trying to write a program that uses Driect X for display. I have a early version working, but I wanted to use CFile and CString to access the filesystem. I can't make htis an MFC project since DirectX will fight over control of the event loop. (If I am wrong, please correct me)
        I tried including afx.h which seemed to work OK, except that the linker complains that __beginthreadex and __endthreadex were unresolved externals. I tried changing the libraries and compiler defentitions, but it always made things worse. What do I need to add to comile my program with CString?

-John Huebner
0
Comment
Question by:jh6p
  • 2
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
vmanocha earned 100 total points
Comment Utility
you can force the linker to produce the exe file. since you are not using mfc for anything else, these unresolved symbols should not cause any problems while running. to force an exe to be generated, go to Build->Settings. click on the Link Tab. selectCustomize from the Category combo-box. check the 'Force file output' check-box. click on the OK button to dismiss the dialog. you will still get the link errors while building, but the linker will also generate an exe file, which should work just fine.
0
 

Author Comment

by:jh6p
Comment Utility
Thanks! you got me over a major hurdle. I'm still having a lot of trouble integrating the two, but now I'm not stuck.

0
 

Author Comment

by:jh6p
Comment Utility
I got a better answer through usenet a week after I got the answer from experts exchange:
--------------------------------------------------------
 Usually linker complains about  __beginthreadex and __endthreadex when
in your project settings option "Not Using MFC" is choosen.
Change it (Build | Settings | General).

Viktor Artemov

0
 
LVL 1

Expert Comment

by:vmanocha
Comment Utility
yes, that's another way to solve this problem. but i thought that you could not make this a mfc project (as mentioned in your initial question) and that is why i did not suggest this alternative.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Expand LInux Boot partition remotly 3 78
List out all word 7 220
dog bark java program 15 81
zeroFront challenge 7 71
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now