|
0 / 0 / 0
Регистрация: 11.06.2011
Сообщений: 10
|
||||||
Компиляция с BAT-файла28.02.2013, 15:07. Показов 3058. Ответов 1
Метки нет (Все метки)
main.cpp
%comspec% /k ""d:\Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"" x86 -содержание батника прочитал что нужно еще "D:\Program Files\Microsoft Visual Studio 9.0\Common7\Tools\vsvars32.bat" этот батник как-то использовать , для подключения библиотек. Экспериментами не удается скомпилировать вышеприведенный исходник. Пожалуйста помогите. хочется получить исходник, в котором будет компилироваться файл main.cpp чтобы запустил батник => появился экзешник. ну или любой другой способ скомпилировать main.cpp программно, а не в вижуале Добавлено через 8 минут ошибка LNK1120 : 1 unresolved external при другом теле появляются еще больше таких же ошибок Добавлено через 28 минут пробую так cd "d:\\"Program Files"\\"Microsoft Visual Studio 9.0"\\Common7\\IDE" devenv.exe "d:\\l.cpp" x86 /REBUILD в результате открывается студия с окном Use: devenv [solutionfile | projectfile | anyfile.ext] [switches] The first argument for devenv is usually a solution file or project file. You can also use any other file as the first argument if you want to have the file open automatically in an editor. When you enter a project file, the IDE looks for an .sln file with the same base name as the project file in the parent directory for the project file. If no such .sln file exists, then the IDE looks for a single .sln file that references the project. If no such single .sln file exists, then the IDE creates an unsaved solution with a default .sln file name that has the same base name as the project file. Command line builds: devenv solutionfile.sln /build [ solutionconfig ] [ /project projectnameorfile [ /projectconfig name ] ] Available command line switches: /Build Builds the solution or project with the specified solution configuration. For example "Debug". If multiple platforms are possible, the configuration name must be enclosed in quotes and contain platform name. For example: "Debug|Win32". /Clean Deletes build outputs. /Command Starts the IDE and executes the command. /Deploy Builds and then deploys the specified build configuration. /Edit Opens the specified files in a running instance of this application. If there are no running instances, it will start a new instance with a simplified window layout. /LCID Sets the default language in the IDE for the UI. /Log Logs IDE activity to the specified file for troubleshooting. /NoVSIP Disables the VSIP developer's license key for VSIP testing. /Out Appends the build log to a specified file. /Project Specifies the project to build, clean, or deploy. Must be used with /Build, /Rebuild, /Clean, or /Deploy. /ProjectConfig Overrides the project configuration specified in the solution configuration. For example "Debug". If multiple platforms are possible, the configuration name must be enclosed in quotes and contain platform name. For example: "Debug|Win32". Must be used with /Project. /Rebuild Cleans and then builds the solution or project with the specified configuration. /ResetAddin Removes commands and command UI associated with the specified Add-in. /ResetSettings Restores the IDE's default settings, optionally resets to the specified VSSettings file. /ResetSkipPkgs Clears all SkipLoading tags added to VSPackages. /Run Compiles and runs the specified solution. /RunExit Compiles and runs the specified solution then closes the IDE. /SafeMode Launches the IDE in safe mode loading minimal windows. /Upgrade Upgrades the project or the solution and all projects in it. A backup of these files will be created as appropriate. Please see Help on 'Visual Studio Conversion Wizard' for more information on the backup process. Product-specific switches: /debugexe Open the specified executable to be debugged. The remainder of the command line is passed to this executable as its arguments. /useenv Use PATH, INCLUDE, LIBPATH, and LIB environment variables instead of IDE paths for VC++ builds. To attach the debugger from the command line, use: VsJITDebugger.exe -p <pid> и батник вообще не запускается из коммандной строки, только руками
0
|
||||||
| 28.02.2013, 15:07 | |
|
Ответы с готовыми решениями:
1
Компиляция BAT и VBS в EXE Компиляция проекта через .bat |
|
0 / 0 / 0
Регистрация: 11.06.2011
Сообщений: 10
|
|
| 02.03.2013, 16:20 [ТС] | |
|
решил использовать devc++
system("c:\\dev-cpp\\bin\\g++ -o c:\\dev-cpp\\my c:\\dev-cpp\\my.cpp"); //ок my.exe
0
|
|
| 02.03.2013, 16:20 | |
|
Помогаю со студенческими работами здесь
2
Запуск файла в директории с .bat, когда .bat запущен от имени администратора Один bat-файл запускает по очереди два других bat-файла
Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |
|
Новые блоги и статьи
|
|||
|
Переходник USB-CAN-GPIO
Eddy_Em 20.03.2026
Достаточно давно на работе возникла необходимость в переходнике CAN-USB с гальваноразвязкой, оный и был разработан. Однако, все меня терзала совесть, что аж 48-ногий МК используется так тупо: просто. . .
|
Оттенки серого
Argus19 18.03.2026
Оттенки серого
Нашёл в интернете 3 прекрасных модуля:
Модуль класса открытия диалога открытия/ сохранения файла на Win32 API;
Модуль класса быстрого перекодирования цветного изображения в оттенки. . .
|
SDL3 для Desktop (MinGW): Рисуем цветные прямоугольники с помощью рисовальщика SDL3 на Си и C++
8Observer8 17.03.2026
Содержание блога
Финальные проекты на Си и на C++:
finish-rectangles-sdl3-c. zip
finish-rectangles-sdl3-cpp. zip
|
Символические и жёсткие ссылки в Linux.
algri14 15.03.2026
Существует два типа ссылок — символические и жёсткие.
Ссылка в Linux — это запись в каталоге, которая может указывать либо на inode «файла-ИСТОЧНИКА», тогда это будет «жёсткая ссылка» (hard link),. . .
|
|
[Owen Logic] Поддержание уровня воды в резервуаре количеством включённых насосов: моделирование и выбор регулятора
ФедосеевПавел 14.03.2026
Поддержание уровня воды в резервуаре количеством включённых насосов: моделирование и выбор регулятора
ВВЕДЕНИЕ
Выполняя задание на управление насосной группой заполнения резервуара,. . .
|
делаю науч статью по влиянию грибов на сукцессию
anaschu 13.03.2026
прикрепляю статью
|
SDL3 для Desktop (MinGW): Создаём пустое окно с нуля для 2D-графики на SDL3, Си и C++
8Observer8 10.03.2026
Содержание блога
Финальные проекты на Си и на C++:
hello-sdl3-c. zip
hello-sdl3-cpp. zip
Результат:
|
Установка CMake и MinGW 13.1 для сборки С и C++ приложений из консоли и из Qt Creator в EXE
8Observer8 10.03.2026
Содержание блога
MinGW - это коллекция инструментов для сборки приложений в EXE. CMake - это система сборки приложений. Здесь описаны базовые шаги для старта программирования с помощью CMake и. . .
|