Skip to content

saacsos/cpp-simple-make

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cpp-simple-make

  • สร้าง header file (ไฟล์ .h) ที่มีแต่ function prototype
  • สร้าง c++ file (ไฟล์ .cpp) ที่มี implementation ของ prototype และ include header file ด้วย
  • compile เป็น object file (ไฟล์ .o) $ g++ -c Student.cpp -o Student.o

  • นำ header file ไปใช้ใน main (main.cpp)
  • compile main เป็น object file (main.o) $ g++ -c main.cpp -o main.o

  • นำ object file ทั้งหมด มาสร้างโปรแกรม (ได้ไฟล์ .exe) $ g++ Student.o main.o -o main

  • รวม command line ทั้งหมด เป็น Makefile

About

How to separate cpp class file and create Makefile

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy