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 - YaBoi

Pages: [1]
1
General / Re: Problems linking to the libraries for VS code on a Mac
« on: April 19, 2022, 01:24:52 pm »
Thank you so much for your advice. I decided to install sfml using homebrew and changing my compiler path using this video: (in case anyone needs to use this thread for help later).

2
General / Re: Problems linking to the libraries for VS code on a Mac
« on: April 16, 2022, 06:27:16 pm »
Hi, thank you for your reply. I tried to run the executable with the a copy of the dylibs in the same folder as well as different combinations exclusively in the lib folder but nothing seemed to work. Currently I have all of my dylibs in a lib folder.

I am still new to C++ so I am unsure what you mean by building in the standard library? Is this when I do the cmake step? If so where can I find the standard library?

Similarly, I am unsure how to set my rpath manually, do I do that in VScode?

Thank you so much for your help, this has been a massive nightmare for me!

3
Hi there, I am new to C++ and I am attempting to compile a the tutorial code using VS code. I have looked all across the internet and I have not been able to find a tutorial that shows how to install SFML for VS code on a Mac. I have made a lot of progress but I am seemingly stumbling at the last hurdle after days of trying, so any help would be appreciated!

I downloaded the source code version of SFML and used cmake to build the libraries. This only produced dylib files. I created a src folder in my work environment and created two folders, lib and include within. I then moved the dylib files into the lib folder and the contents of the include folder into my include folder (Sorry if this is too much detail I just don't want to miss a step I where I made a mistake).

I then changed my task.json file so that the compiler path now read
"-fdiagnostics-color=always",
"-I${workspaceFolder}/src/include",
"-g",
"${workspaceFolder}/*.cpp",
"-o",
"${fileDirname}/${fileBasenameNoExtension}",
"-L${workspaceFolder}/src/lib",
"-lsfml-graphics",
"-lsfml-window",
"-lsfml-system""

Finally I moved the osx frameworks in the extlib folder to the Library/Frameworks folder on my mac. After all of this when I compile I produce an executable which provides the following error message:
dyld: Library not loaded: @rpath/libsfml-graphics.2.5.dylib
  Referenced from: /Users/myusername/Desktop/Cpp_Project/main
  Reason: image not found

I have been trying to get SFML to work for days and finally needed to cry for help! Any advice or tips would be greatly appreciated. Thank you!

P.S I have tried to add different combinations of the dylibs to my workspace folder but it hasn't made a difference.

Pages: [1]