線上訂房服務-台灣趴趴狗聯合訂房中心
發文 回覆 瀏覽次數:2023
推到 Plurk!
推到 Facebook!

請問一下 編譯的問題

尚未結案
small77
一般會員


發表:5
回覆:8
積分:2
註冊:2005-10-09

發送簡訊給我
#1 引用回覆 回覆 發表時間:2005-10-18 22:37:32 IP:203.70.xxx.xxx 未訂閱
請問    我寫了     (c 語言而已 用 borland c++ ) _math.cpp _file.cpp _mem.cpp _string.cpp    要用的時候     我是用    #inclue  <_math.cpp> #inclue <_file.cpp> #inclue <_string.cpp> #inclue <_mem.cpp> void main() { } 請問一下 能像以前 dos 時一樣 先編譯成 _math.obj _file.obj _mem.obj _string.obj 然後 再 link _math.obj _file.obj _mem.obj _string.obj 嗎 如果可以 可是要用時 我也不知怎麼用 引入編譯後的 library
RedSnow
版主


發表:79
回覆:1322
積分:845
註冊:2003-12-15

發送簡訊給我
#2 引用回覆 回覆 發表時間:2005-10-19 12:35:16 IP:59.115.xxx.xxx 未訂閱
small77 你好:    你既然提到 DOS 時代,那麼你應該會知道 Command-line 程式大都有提供參數說明的功能,以 bcc32.exe 為例,當你不給予任何參數執行它時,會顯示出下列的參數說明:
C:\>bcc32
Borland C   5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Syntax is: BCC32 [ options ] file[s]     * = default; -x- = turn switch x off
  -3    * 80386 Instructions        -4      80486 Instructions
  -5      Pentium Instructions      -6      Pentium Pro Instructions
  -Ax     Disable extensions        -B      Compile via assembly
  -C      Allow nested comments     -Dxxx   Define macro
  -Exxx   Alternate Assembler name  -Hxxx   Use pre-compiled headers
  -Ixxx   Include files directory   -K      Default char is unsigned
  -Lxxx   Libraries directory       -M      Generate link map
  -N      Check stack overflow      -Ox     Optimizations
  -P      Force C   compile         -R      Produce browser info
  -RT   * Generate RTTI             -S      Produce assembly output
  -Txxx   Set assembler option      -Uxxx   Undefine macro
  -Vx     Virtual table control     -X      Suppress autodep. output
  -aN     Align on N bytes          -b    * Treat enums as integers
  -c      Compile only              -d      Merge duplicate strings
  -exxx   Executable file name      -fxx    Floating point options
  -gN     Stop after N warnings     -iN     Max. identifier length
  -jN     Stop after N errors       -k    * Standard stack frame
  -lx     Set linker option         -nxxx   Output file directory
  -oxxx   Object file name          -p      Pascal calls
  -tWxxx  Create Windows app        -u    * Underscores on externs
  -v      Source level debugging    -wxxx   Warning control
  -xxxx   Exception handling        -y      Produce line number info
  -zxxx   Set segment names    C:\>_
你可以依據那些說明來設定編譯參數,如果你僅想編譯 abc.c 檔案為 abc.obj 檔,那麼就使用 -c 參數,例如:bcc32 -c abc.c,連結程式也可使用相同方式來取得參數說明,自己動手試試看吧。 7 天天敲鍵盤 v 時時按滑鼠 8
small77
一般會員


發表:5
回覆:8
積分:2
註冊:2005-10-09

發送簡訊給我
#3 引用回覆 回覆 發表時間:2005-10-19 14:49:37 IP:61.59.xxx.xxx 未訂閱
我原本以為 現在都是 視窗環境 而且 borland 那麼強 所以應該也已經 發展到有視窗操作方式 來操作 link *.obj....... 原來沒有哩 還是得徒手煉鋼 多謝您的回覆 收到了
系統時間:2024-04-29 16:32:38
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!