Solved

Problem when building a project using  "use MFC in Static library" setting

Posted on 2008-06-10
4
514 Views
Last Modified: 2013-12-14
hi,
  i have an application in MFC and i am using following code

                   AfxGetModuleState()->m_dwVersion = 0x0601;
                  CDaoDatabase db;
                  db.Create(glblDBName,dbLangGeneral,0x40);        
                  db.Close();

to create a database, when i building this  project using  "use MFC in Static library" setting it display an error "m_dwVersion' : is not a member of 'AFX_MODULE_STATE"

but when building this project using  "use MFC in shared  library" setting it is working properly .  i need to build it using  "use MFC in Static library" setting

so please tell me how it will possible
 
0
Comment
Question by:rajnish1579
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 5

Expert Comment

by:marcodalzotto
ID: 21749071
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
ID: 21749078
http://support.microsoft.com/kb/236991

This tells you how to do it for a static build
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

717 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