Jump to content
Sign in to follow this  
ahuimanu

Eventually stupid question about VC++2K5 Express

Recommended Posts

Hey folks,there one little detail that I appear to be too stupid to figure out.When opening up the FSX SDK sample gauge file in VC++ 2005 Express, all single *.cpp sub gauge files as well as the main gauge CPP appear under Source Files within the Project Explorer.In that gauge and also in my own gauges the sub gauges are included via #include "subgauge.cpp" from the main gauge, just as usual.But now, if I create a new project and add the files to the Project Explorer, things won't compile anymore. The only solution seems to be removing the sub gauges from the explorer. It seems that then only the main CPP is being compiled directly, which of course still includes the sub gauges using the #include directive.Obviously I would like to have all my sub gauges within the Project Explorer though for much improved access...If I have all the sub gauges within the Project Explorer it seems the compiler tries to compile every single file more or less out of context. I wonder why it works in the MS sample though.What am I missing here??Thanks for any hint,Etienne

Share this post


Link to post
Share on other sites

If you right-click on the sub-gauge file in the Solution Explorer, you should find the option to "Exclude from Build." You need to ensure you have excluded all of the sub-gauge source files here, as they are compiled by way of the #include statements in your main source file.Doug

Share this post


Link to post
Share on other sites

Thanks for the prompt reply, exactly the one I was looking for.Still, the MS sample does not seem to need this option...Glad it now works though. :)Thanks again!Etienne

Share this post


Link to post
Share on other sites
Guest Patrick_Waugh

If you write click on them in the MS sample, you should see that they are alread excluded, that is why.You can only build them once... either by putting them under source, or by #including them.You could put a "#pragma once" at the top too if you want I suppose.Most of us here do not use the MS way (including source) as this is considered bad form. Most of us have a completely different setup so that we can use C++ as well.

Share this post


Link to post
Share on other sites

>Most of us here do not use the MS way (including source) as>this is considered bad form. Most of us have a completely>different setup so that we can use C++ as well....and at least one of us (me) uses a modified form which combines both... ;)


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites

>If you write click on them in the MS sample, you should see>that they are alread excluded, that is why.>>You can only build them once... either by putting them under>source, or by #including them.>>You could put a "#pragma once" at the top too if you want I>suppose.>>Most of us here do not use the MS way (including source) as>this is considered bad form. Most of us have a completely>different setup so that we can use C++ as well.>can you elaborate?


Jeff Bea

I am an avid globetrotter with my trusty Lufthansa B777F, Polar Air Cargo B744F, and Atlas Air B748F.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...