Visual studio выглядит в правильном каталоге, но все еще говорит, что файлы не найдены - PullRequest
0 голосов
/ 31 декабря 2018

Я создал свой собственный каталог "cpplibs" для хранения кода моей библиотеки, и файлы там.По какой-то причине файл "portaudio.sln" не может правильно связать мои файлы.Как мне организовать свои файлы так, чтобы все попало в нужное место, и я не получил никаких «неопределенных идентификаторов» или подобных ошибок?

Вот конкретный вывод, который я получаю.Я провел некоторое исследование или определил каталоги, но все же столкнулся с некоторыми проблемами.

1>------ Build started: Project: portaudio, Configuration: Debug Win32 ------
1>C:\Program Files (x86)\for visual studio\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(944,5): warning MSB8027: Two or more files with the name of asio.cpp will produce outputs to the same location. This can lead to an incorrect build result.  The files involved are ..\..\..\ASIOSDK2.3.2\common\asio.cpp, ..\..\src\hostapi\asio\ASIOSDK\common\asio.cpp.
1>C:\Program Files (x86)\for visual studio\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(944,5): warning MSB8027: Two or more files with the name of asiodrivers.cpp will produce outputs to the same location. This can lead to an incorrect build result.  The files involved are ..\..\..\ASIOSDK2.3.2\host\asiodrivers.cpp, ..\..\src\hostapi\asio\ASIOSDK\host\asiodrivers.cpp.
1>C:\Program Files (x86)\for visual studio\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(944,5): warning MSB8027: Two or more files with the name of asiolist.cpp will produce outputs to the same location. This can lead to an incorrect build result.  The files involved are ..\..\..\ASIOSDK2.3.2\host\pc\asiolist.cpp, ..\..\src\hostapi\asio\ASIOSDK\host\pc\asiolist.cpp.
1>cl : Command line warning D9035: option 'Gm' has been deprecated and will be removed in a future release
1>hostsample.cpp
1>c:\program files\cpplibs\asiosdk2.3.2\host\sample\hostsample.cpp(13): fatal error C1083: Cannot open include file: 'asiosys.h': No such file or directory
1>asiolist.cpp
1>c:\program files\cpplibs\asiosdk2.3.2\host\pc\asiolist.cpp(2): fatal error C1083: Cannot open include file: 'iasiodrv.h': No such file or directory
1>asiodrivers.cpp
1>c:\program files\cpplibs\asiosdk2.3.2\host\asiodrivers.h(13): fatal error C1083: Cannot open include file: 'asiolist.h': No such file or directory
1>asiodrvr.cpp
1>c:\program files\cpplibs\asiosdk2.3.2\common\asiodrvr.cpp(16): fatal error C1189: #error:  do not use this
1>asio.cpp
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): error C2011: 'IASIO': 'struct' type redefinition
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asiodrvr.h(26): error C2504: 'IASIO': base class undefined
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(79): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(81): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(87): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(88): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(76): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\string.h(119): note: see declaration of 'strcpy'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(86): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\string.h(119): note: see declaration of 'strcpy'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(101): error C2039: 'removeCurrentDriver': is not a member of 'AsioDriver'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asiodrvr.h(26): note: see declaration of 'AsioDriver'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(114): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(121): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(131): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(141): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(151): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(158): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(165): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(172): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(182): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(189): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(196): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(208): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(205): warning C4996: 'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
1>c:\program files (x86)\windows kits\10\include\10.0.10240.0\ucrt\string.h(119): note: see declaration of 'strcpy'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(221): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(228): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(235): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(242): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\asio.cpp(249): error C2027: use of undefined type 'IASIO'
1>c:\program files\cpplibs\asiosdk2.3.2\common\iasiodrv.h(11): note: see declaration of 'IASIO'
1>Generating Code...
1>Done building project "portaudio.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Ответы [ 2 ]

0 голосов
/ 14 февраля 2019

Вот как вы можете создать portaudio из командной строки:

  1. git clone https://git.assembla.com/portaudio.git
  2. cd portaudio
  3. cmake -S .
  4. msbuild portaudio.sln /m /p:Configuration=Release

Ваш вывод находится в каталоге Release.


Вы можете скачать форму утилит:

0 голосов
/ 07 января 2019

Используете ли вы git в своем проекте?

У меня была такая же проблема, и когда я удалил git из каталога, он работал хорошо.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...