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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - souwanttocaude

Pages: [1]
1
General / Re: Binding to C++ (Eclipse CDT - Mac os X)
« on: May 07, 2018, 11:55:34 pm »
Usually the approach with linking libraries is to point the -L flag to the library directory and then only specify the library name like -lsfml-graphics
However I'm unfamiliar with macOS and its dylib.
It applies as well to macOS and dylib/framework (with the later, use the -F and -framework flags, but it's the same).

You were right. I changed the command line to invoke the compiler with this:
g++ -std=c++1y -I/Library/Frameworks/sfml-graphics.framework -I/Library/Frameworks/sfml-window.framework -I/Library/Frameworks/sfml-audio.framework -I/Library/Frameworks/sfml-network.framework -I/Library/Frameworks/sfml-system.framework -I/Library/Frameworks/SFML.framework -O0 -g3 -Wall -c -fmessage-length=0 -Wno-attributes -MMD -MP -MF"src/graphSFMLInit.d" -MT"src/graphSFMLInit.o" -o "src/graphSFMLInit.o" "../src/graphSFMLInit.cpp"

Eclipse CDT is able to find SFML frameworks and now I moved on to a new problem! -sf- is an undefined symbol

Undefined symbols for architecture x86_64:
  "sf::CircleShape::CircleShape(float, unsigned long)", referenced from:

2
General / Re: Binding to C++ (Eclipse CDT - Mac os X)
« on: May 04, 2018, 05:51:03 pm »
 :) Yes the file exits at the specified location

3
General / Binding to C++ (Eclipse CDT - Mac os X)
« on: May 04, 2018, 05:28:11 pm »
Morning,

First thing, I am new to SFML
Second, after running a basic example from the tutorial I got this linker error:
ld: library not found for -l/usr/local/lib/libsfml-graphics.2.4.1.dylib
clang: error: linker command failed with exit code 1 (use -v to see invocation)

invoking the compiler here:
g++ -L/usr/local/lib/ -o "graphSFMLInit"  ./src/graphSFMLInit.o   -l/usr/local/lib/libsfml-graphics.2.4.1.dylib -l/usr/local/lib/libsfml-window.2.4.1.dylib -l/usr/local/lib/libsfml-audio.2.4.1.dylib -l/usr/local/lib/libsfml-network.2.4.1.dylib -l/usr/local/lib/libsfml-system.2.4.1.dylib

I told the linker where to find those libs by settings :
Project Properties->C/C++ Build->Settings->Tool Settings->MacOS X C++ Linker->Libraries :
/usr/local/lib/libsfml-graphics.2.4.1.dylib
/usr/local/lib/libsfml-window.2.4.1.dylib
/usr/local/lib/libsfml-audio.2.4.1.dylib
/usr/local/lib/libsfml-network.2.4.1.dylib
/usr/local/lib/libsfml-system.2.4.1.dylib

Image attached

Pages: [1]