简体   繁体   中英

Batch File New Line in Compiling C program

I am writing a program that many files and I write those in a batch file and compile that in MS Dos. I cannot write gcc command in multiple lines and this give me a huge line to scroll every time i need to edit something. Can anyone help me to divide the gcc command in multiple lines?

This is how it looks. C:\\Qt\\Tools\\mingw482_32\\bin\\gcc.exe -DWITH_OPENSSL -DWITH_DOM and so on.....

You can use ^ as a line continuation character in batch files:

C:\Qt\Tools\mingw482_32\bin\gcc.exe ^
    -DWITH_OPENSSL ^
    -DWITH_DOM ^
    and so on.....

But you really ought to look at using a Makefile or similar instead.

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