Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ktalebian

macrumors regular
Original poster
Dec 25, 2007
214
0
Hi there,
I have the following Makefile:
sudoku-solver: sudoku2.c
g++ sudoku2.c -o sudoku-solver

When I run make on my Mac, the sudoku2.c compiles flawlessly and works fine.
Now, on my Linux machine, I "tried" to install the GNU compiler (i suck at Linux! So I don't know if I installed it correctly or not!)
But when I run make on Linux, I get an error saying that the files
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
where not found!!
So is this because I didn't correctly install the libraries, or do I have to include these files some other way on a Linux?

Thanks!
 

ktalebian

macrumors regular
Original poster
Dec 25, 2007
214
0
Is that the only problem??
Because my computer broke down and I don't have a linux to check this out!!
So I don't have any other problem other than the way I compiled it right?! :p

Thanks!!
 

Cromulent

macrumors 604
Oct 2, 2006
6,817
1,102
The Land of Hope and Glory
Is that the only problem??
Because my computer broke down and I don't have a linux to check this out!!
So I don't have any other problem other than the way I compiled it right?! :p

Thanks!!

Hard to say. I don't know which Linux distro you are using, which version of GCC you have, whether you installed it from source or it came with the distro, what your paths are setup as or any number of other things that could cause an issue.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.