Microsoft Visual Studio.Net(VS2010/2008) 多project 的solution依赖顺序问题

zhangwuji156 2014-06-25 05:57:42

for_console是主工程,里面有main函数,新建一个添加到这个solution下的工程abc,新建的时候选项选了"空的项目",里面添加一个abc.h文件,里边定义的东西如图所示.

我在for_console的main.cpp里加上
#include "../abc/abc.h"
...
abc::test();

可以运行成功.

但项目依赖关系是没有,项目生成顺序也是错的.我就设置项目依赖关系,让for_console依赖于abc,结果就报错了,报的错就是图片中的错.查了,那个错是,如果工程里缺main函数就报这个错.要怎么弄呢?
...全文
117 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhangwuji156 2014-06-26
  • 打赏
  • 举报
回复
引用 6 楼 lsq19871207 的回复:
你应该创建Win32 Console Application吧
我建的是Win32 Console Application 不过按照xiaohuh421说的,建成"类库"就可以了.
信阳毛尖 2014-06-26
  • 打赏
  • 举报
回复
你应该创建Win32 Console Application吧
xiaohuh421 2014-06-26
  • 打赏
  • 举报
回复
还有你是想提供一个静态库, 那么abc就应该是一个静态库工程. 总之要分清工程类型.
xiaohuh421 2014-06-26
  • 打赏
  • 举报
回复
肯定是建错工程了. 你明明想建立一个 console工程, 却建了一个非console的工程.
zhangwuji156 2014-06-26
  • 打赏
  • 举报
回复
引用 1 楼 yumulinxiang 的回复:
设置启动项目了吗?
设了,还是不行
zhangwuji156 2014-06-26
  • 打赏
  • 举报
回复
引用 1 楼 yumulinxiang 的回复:
设置启动项目了吗?
for_console是粗体显示的,它不是启动项吗?怎么设
Jackxan 2014-06-26
  • 打赏
  • 举报
回复
设置启动项目了吗?
Summary of Notable New Features in 15.7 •We added support to change installation locations. •You can Save All your pending changes before you start your update. •The update dialog provides you even more details about your update during installation. •C# 7.3 is included in Visual Studio version 15.7. •We improved solution load time for C# and VB projects. •We made numerous updates to F# and its tools, with a focus on performance. •We reduced the time to enable IntelliSense for large .NET Core projects by 25%. •We made Quick Info improvements and new .NET refactorings like convert for-to-foreach and make private fields readonly. •We added the ability to publish ASP.NET Core applications to App Service Linux without containers. •Live Unit Testing works with embedded pdbs and supports projects that use reference assemblies. •The Test Explorer has more responsive icons during test runs. •C++ developers can use CodeLens for unit testing. •We added new rules enforcing items from the C++ Core Guidelines. •Debugging large solutions with /Debug:fastlink PDBs is more robust. •CMake integration supports CMake 3.11 and static analysis. •Python projects support type hints in IntelliSense, and a Run MyPy command has been added to look for typing errors in your code. •Conda environments are supported in Python projects. •We added a next version of our Python debugger based on the popular open source pydevd debugger. •TypeScript 2.8 is included in Visual Studio version 15.7. •We improved Kestrel HTTPs support during debugging. •We added support for JavaScript debugging with Microsoft Edge. •The Debugger supports VSTS and GitHub Authentication for Source Link. •IntelliTrace's step-back debugging feature is supported for debugging .NET Core projects. •We added IntelliTrace support for taking snapshots on exceptions. •We removed the blocking modal dialog from branch checkouts in Git when a solution or project reload is not required. •You have the option to choose between OpenSSL and SChannel in Git. •You can create and associate Azure Key Vaults from within the Visual Studio IDE. •Visual Studio Tools for Xamarin can automatically install missing Android API levels required by Xamarin.Android projects. •The Xamarin.Forms XAML editor provides IntelliSense and quick fixes for conditional XAML. •Visual Studio Build Tools now supports installing into a container, and we added support for building Azure, UWP, and additional project types. •You can create build servers without installing all of Visual Studio. •The Windows 10 April 2018 Update SDK - Build 17134 is the default required SDK for the Universal Windows Platform development workload. •We added support for Visual State Management for all UWP apps and more. •We enabled automatic updates for sideloaded APPX packages. •You have new tools for migrating to NuGet PackageReference. •We added support for NuGet package signatures. •We added Service Fabric Tooling for the 6.2 Service Fabric release. •We updated Entity Framework Tools to work with the EF 6.2 runtime and to improve reverse engineering of existing databases.
Reengineer .NET Code to Improve Quality, Update Architecture, Access New Tools, and Accelerate Delivery of New Features As software ages, it becomes brittle: difficult to understand, fix, manage, use, and improve. Developers working with many platforms have encountered this problem; now, developers working with Microsoft’s .NET are facing it as well. In Reengineering .NET, leading .NET architect Bradley Irby introduces proven best practices for revitalizing older .NET code and integrating new architectural and development advances into business-critical systems that can’t go offline. Using a step-by-step approach, .NET professionals can make legacy enterprise software more reliable, maintainable, attractive, and usable—and make it easier to upgrade for years to come. Through real-world case studies and extensive downloadable sample code, Irby shows how to carefully plan a .NET reengineering project, understand the true current state of your code, introduce unit testing and other agile methods, refactor to services and controllers, and leverage powerful .NET reengineering tools built into Microsoft Visual Studio 2012. This book is an indispensable resource for all developers, architects, and project managers responsible for existing .NET code bases and for a wide audience of non-technical managers and CTOs who want to understand the unique challenges faced by .NET teams involved in application or system reengineering projects. Coverage includes Migrating legacy .NET software to more flexible, extensible, and maintainable architectures—without breaking it Reengineering web applications with the MVC pattern, Winforms software with MVP, and WPF/Silverlight systems with MVVM Asking the right questions to predict refactoring problems before they happen Planning and organizing reengineering projects to apply the right expertise to each task at the right time Using innovative Test Doubling to make unit testing even more effective Applying Dependency Inversion to break tight coupling and promote easier development and testing Leveraging source control, defect tracking, and continuous integration “Cleaning up” legacy solutions to improve them before you even touch business logic Establishing solid development infrastructure to support your reengineering project Refactoring to services—including advanced techniques using Repositories, Domain Models, and the Command Dispatcher Refactoring to controller/view or ViewModel/View pairs Table of Contents Part I Target Architecture Chapter 1 Implementing a Service-Oriented Architecture Chapter 2 Understanding Application Architecture Chapter 3 Unit Testing Chapter 4 Understanding the Dependency Inversion Principle Chapter 5 Using Test Doubles with Unit Tests Part II Reengineering Chapter 6 Initial Solution Review Chapter 7 Planning the Project Chapter 8 Identifying Development Tools and the Build Process Chapter 9 Cleaning Up Legacy Solutions Chapter 11 Basic Refactoring to Services Chapter 12 Advanced Refactoring to Services Chapter 13 Refactoring to a Controller Appendix Reengineering .NET Projects with Visual Studio 2012

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧