Linux裡使用ACE時的makefile

來源:互聯網
上載者:User
如果你想寫一個原始碼,可能直接跨過windows與linux with ACE.那可能要留意以下幾點了.一個對於#include裡,不要像在VC裡使用時,檔案的大小寫沒有區別.在linux裡是不行的.還有目錄的表示如:#include "ace/ACE.h"與#include "ace/ACE.h"都是一樣的.但是在linux裡只會認識#include "ace/ACE.h"還需要重新提一下以前寫過了makefile檔案的問題.ace架構為了方便我們做一個make檔案,它們做了一些GNU.如果你的工程有多個檔案的時候要如何做呢.看一下這個makefile檔案吧: BIN = main
FILES= ProactorTask Send connecte
SRC = $(addsuffix .cpp,$(FILES))
OBJ=$(addsuffix .o,$(FILES))
BUILD = $(VBIN)
#LIBS = -lMyOtherLib
LDFLAGS = -L$(ACE_ROOT)/lib
include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
include $(ACE_ROOT)/include/makeinclude/macros.GNU
include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU其中有幾句FILES= ProactorTask Send connecte這個就是將你寫的ProactorTask.cpp,Send.cpp,connecte.cpp這一句將會把你目錄下的除main.cpp檔案之外的,加入的cpp檔案.留意:對於本目錄的#include "./connecte.h"這個也需要注意./這樣就會在本目錄裡搜尋.

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.