Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Compiling in terminal- Mac  (Read 1751 times)

0 Members and 1 Guest are viewing this topic.

luckyluckluck

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Compiling in terminal- Mac
« on: July 21, 2017, 02:07:53 am »
I have been trying to compile my code using g++ main.cpp -L <path to library folder> -l <libraryname>

I have downloaded the SFML package onto my Desktop with a file path of /Users/Erica/Desktop/SFML

The file I a trying to compile is also on the Desktop, "Graphics.cpp"

I have tried putting "Graphics.hpp" and "sgml-graphics" for the library name

No matter what I do I keep getting this message when I compile:

Graphics.cpp:3:10: fatal error: 'SFML/Graphics.hpp' file not found
#include <SFML/Graphics.hpp>

I am completely out of ideas for compiling, I have tried every solution on 4 pages of google for this issue and I am continuing to get this same error. I have attached a screen shot.

PLEASE HELP ME COMPILE IM GOING CRAZYYYY

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Re: Compiling in terminal- Mac
« Reply #1 on: July 21, 2017, 08:51:45 am »
You should take a moment to read the manpage, you're completely mixing the meaning of your compiler options.
SFML / OS X developer

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: Compiling in terminal- Mac
« Reply #2 on: July 22, 2017, 12:03:25 am »
try
-I instead of -L

-I /users/Erica/Desktop/SFML/include -lsfml-graphics -lsfml-window -lsfml-system

https://courses.cs.washington.edu/courses/cse373/99au/unix/g++.html

http://web.engr.oregonstate.edu/~rubinma/Mines_274/Content/Slides/05_compilation.pdf

 

anything