简体   繁体   中英

Visual Studio C++ multi-project solution

I have created an C++ solution in VS2008. The first project contains the model. The second projects is the view. The problem is that i don't get make references to my model classes defined in the first project. The message error is :

Error   1   fatal error C1083: Cannot open include file: 'utils/GeradorSistematicoDeAlturaDoPlanoDeCorteStrategy.h': No such file or directory  c:\Users\user\Programação em C++\Simulacao\Simulacao_Testes\src\Teste1.cpp  3   Simulacao_Testes

Is there any configuration in VS2008 that makes to be made in order to, from the my view (second project) project, i do make references to the first project, the model?

您可以在include语句本身中使用相对路径,也可以将模型.h文件所在的目录添加到项目设置的其他include目录中(进入项目属性,然后是Configuration properties / C ++ / General,Additional include directory) 。

First of all I find this approach for the MVC pattern quite strange. But if you really want to do it like that you have to link the resulting DLL/LIB from your model project to your view project (go to the project properties, then Configuration Properties/Linker/Input/Additional Dependencies ; you may need to set the right path too in Configuration Properties/Linker/General/Additional Library Directories )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM