ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
||||
|
||||
DLL-Project - include stdafx.h
Hello,
I've tried to add a few headers and cpps to the dll-project. With this extension Visual Studio forces me to include the stdafx.h into the DLLMain.cpp. If I do this then I got errors because of the multiple definitions (p.e. DECLARATIONTYPE etc.). How can I solve this problem? greetings Carsten |
#2
|
|||
|
|||
Hi Carsten,
If I remember right you only need to use stdafx.h if you have chose to use pre-compiled headers. Turn off pre-compiled headers and remove stdafx.h. Lars-Olof |
The Following User Says Thank You to Lars-Olof Leven For This Useful Post: | ||
Carsten Seehafer (11-14-2011) |
#3
|
||||
|
||||
Hi Lars,
I've turned off already precompiled headers. VS includes a stdafx.h to add the MFC-components. I've tried to rename this header but without a result. I've got always an error from the linker " fatal error LNK1169: Found at least one multiply-defined symbol. " (translated - german version). The main problem seems to be the definition of DECLARATIONTY. greetings Carsten |
#4
|
|||
|
|||
Hi,
Try to remove the stdafx.h from the code and the disk. If you do not get it to work, can you send me the project? I have Visual Studio 2008 std and Visual C++ 2010 Express. Lars-Olof |
The Following User Says Thank You to Lars-Olof Leven For This Useful Post: | ||
Carsten Seehafer (11-14-2011) |
#5
|
||||
|
||||
Hi Lars,
I've tried to remove stdafx.h but it looks like that MFC is inextricably linked with stdafx.h. Maybe there's a way to change the definitions of DECLARATIONTYP?! MFC needs a full-version of Visual Studio. Because of that I'm using VS 2010 Professional. I've try to send you the project. Thanks for your helping hand. greetings Carsten |
Thread | Thread Starter | Forum | Replies | Last Post |
Dll Project applicationcommand | Carsten Seehafer | User Development | 2 | 05-09-2011 02:50 AM |
Project sharing | KelvinHo | Tips and Tricks | 6 | 09-09-2010 01:51 AM |
Cannot save project under Windows 7 64bit with FS4.5.2 | Stephan Seidel | Installation | 6 | 06-14-2010 07:30 AM |
How to debug through vcpp project? | william aponte | Q&A | 3 | 04-08-2010 03:42 PM |
project sharing | LINWEIXU | Tips and Tricks | 0 | 04-04-2010 02:15 AM |