| | |
the most simple makefile ever
Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Sep 2008
Posts: 20
Reputation:
Solved Threads: 0
hi, this is embarrassing, for whatever reason I am getting "Don't know how to make target driver.o" whenever i type make. There is only one file named "driver.cpp" in the directory that i have to compile. I am staring at tutorials and don't understand why this won't work.
heres whats in the make file
heres whats in the make file
C++ Syntax (Toggle Plain Text)
run: driver.o CC -o run driver.o driver.o: driver.cpp CC -c driver.cpp
•
•
Join Date: Sep 2008
Posts: 20
Reputation:
Solved Threads: 0
yes, but you cannot use the tab key in the forum message box so i used spaces to simulate the tab. The actual make file has tabs and the newline so i know those are not the problem, also I am using sun's c++ CC compiler in linux. sorry for the confusion
•
•
Join Date: Sep 2008
Posts: 20
Reputation:
Solved Threads: 0
•
•
•
•
Does this line work if you type it into a console in the proper directory?
CC -c driver.cpp
When I used unix I only used C. Is CC (as opposed to cc) the C++ compiler?
yes if i compile the file manually it produces an executable, and yes to your second question as well, the sun studio 12 suite i believe its called
I don't currently have access to Solaris ATM... alas, but perhaps it is something as simple as needing a blank line after each target:
BTW, you can have tabs in the forum message boxes, but you have to cut and paste them in...
(So you can just cut and paste this code block into a file and it would work.)
The CC is a makefile macro. Sun's compiler is "cc". (I think...)
Hope this helps.
C++ Syntax (Toggle Plain Text)
CC = cc run: driver.o CC -o run driver.o driver.o: driver.cpp CC -c driver.cpp
(So you can just cut and paste this code block into a file and it would work.)The CC is a makefile macro. Sun's compiler is "cc". (I think...)
Hope this helps.
Last edited by Duoas; Apr 9th, 2009 at 1:15 pm.
![]() |
Similar Threads
- Simple Makefile Problem (with a simple dependency) (C++)
- Makefile for C++ one file programs (C++)
- makefile question (C)
- compile cppunit using a makefile (C++)
- Crazy Leak...plz help (C++)
- Installing GTK and MinGW in Windows (C)
- .exe (C)
Other Threads in the C++ Forum
- Previous Thread: question about judge the puctuations
- Next Thread: Help with Classes and Doubly Linked Lists
Views: 693 | Replies: 5
| Thread Tools | Search this Thread |
Tag cloud for C++
6 add api array arrays beginner binary c++ c/c++ calculator char class classes code compile compiler console conversion convert count data delete desktop directshow dll download dynamic encryption error file forms fstream function functions game givemetehcodez google graph gui homeworkhelper iamthwee ifstream input int integer java lib library linkedlist linker linux loop looping loops map math matrix memory microsoft newbie news number output pointer problem program programming project python random read recursion recursive reference return sort stream string strings struct studio system template templates test text text-file tree unix url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets






