Solved

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

Posted on 2008-06-10
4
498 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
4 Comments
 
LVL 5

Expert Comment

by:marcodalzotto
Comment Utility
0
 
LVL 44

Accepted Solution

by:
AndyAinscow earned 500 total points
Comment Utility
http://support.microsoft.com/kb/236991

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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 …
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
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 keystrokes in Netbeans IDE 8.0 for Windows.

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

8 Experts available now in Live!

Get 1:1 Help Now