ATTENTION

This 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

Go Back   FlexSim Community Forum > FlexSim Software > User Development
FAQ Downloads Calendar Search Mark Forums Read

User Development User developed add-ons to Flexsim

Reply
 
Thread Tools Display Modes
  #1  
Old 11-11-2011
Carsten Seehafer's Avatar
Carsten Seehafer Carsten Seehafer is offline
FlexSim Geek
 
Join Date: Oct 2008
Location: Ritterhude, Deutschland
Posts: 230
Downloads: 45
Uploads: 1
Thanks: 474
Thanked 320 Times in 143 Posts
Rep Power: 373
Carsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud of
Question 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
Reply With Quote
  #2  
Old 11-14-2011
Lars-Olof Leven Lars-Olof Leven is offline
Flexsim Distributor
 
Join Date: Aug 2007
Location: Sweden, Borlnge
Posts: 312
Downloads: 278
Uploads: 2
Thanks: 300
Thanked 256 Times in 139 Posts
Rep Power: 324
Lars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to behold
Default

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
Reply With Quote
The Following User Says Thank You to Lars-Olof Leven For This Useful Post:
Carsten Seehafer (11-14-2011)
  #3  
Old 11-14-2011
Carsten Seehafer's Avatar
Carsten Seehafer Carsten Seehafer is offline
FlexSim Geek
 
Join Date: Oct 2008
Location: Ritterhude, Deutschland
Posts: 230
Downloads: 45
Uploads: 1
Thanks: 474
Thanked 320 Times in 143 Posts
Rep Power: 373
Carsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud of
Default

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
Reply With Quote
  #4  
Old 11-14-2011
Lars-Olof Leven Lars-Olof Leven is offline
Flexsim Distributor
 
Join Date: Aug 2007
Location: Sweden, Borlnge
Posts: 312
Downloads: 278
Uploads: 2
Thanks: 300
Thanked 256 Times in 139 Posts
Rep Power: 324
Lars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to beholdLars-Olof Leven is a splendid one to behold
Default

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
Reply With Quote
The Following User Says Thank You to Lars-Olof Leven For This Useful Post:
Carsten Seehafer (11-14-2011)
  #5  
Old 11-14-2011
Carsten Seehafer's Avatar
Carsten Seehafer Carsten Seehafer is offline
FlexSim Geek
 
Join Date: Oct 2008
Location: Ritterhude, Deutschland
Posts: 230
Downloads: 45
Uploads: 1
Thanks: 474
Thanked 320 Times in 143 Posts
Rep Power: 373
Carsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud ofCarsten Seehafer has much to be proud of
Default

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -6. The time now is 08:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 1993-2018 FlexSim Software Products, Inc.