-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can i link external c++ libraries #15
Comments
Ok, i actually saw that but it didn't work, then i found that this is the problem:
I removed the |
Ah, I can see why this is a bit confusing. I just added an example to the C++ folder. The correct configuration is:
Bake's configuration is composed out of generic configuration ( Bake automatically loads the correct language driver based on the When you removed the In practice, the C and C++ drivers are almost the same (C++ inherits the definitions from C) so most configuration settings apply to both. If you would like to know more about driver configuration, see the READMEs in the driver projects: C: https://github.com/SanderMertens/bake/tree/master/drivers/lang/c |
Btw, here is a trick that, based on your example, you may find useful. You can encapsulate the SFML configuration, by doing this:
Then, in your application project, you can simply do this:
Note I changed the name of the application, so that it doesn't clash with the SFML package. |
Thanks :D |
That is a good question. It would be nice if bake could provide configurations for well-known libraries out of the box. There could be a folder in the repository called It would be great if you could upload the sfml configuration, once it is in place |
I just implemented the above functionality. Any projects you add to the location below will be automatically installed during bake setup: https://github.com/SanderMertens/bake/tree/master/libraries See the SDL2 template for an example. |
Closing the issue as question is answered. |
I just found this project on my news feed and it looks amazing
but while reading the README i didn't understand how to link to an external library
for example i googled an SFML helloworld and it includes the library like this
(#include <SFML/Window.hpp>)
then links it like this
(g++ -o sfml_hello sfml_hello.cpp -lsfml-graphics -lsfml-window -lsfml-system)
so what is the equivalent of (-lsome-library) in bake json file :D
This is the helloworld example:
gist.github.com/emersonmx/31004a311efb2876d187
Maybe you can make a working example of this code in the examples/cpp folder :D
The text was updated successfully, but these errors were encountered: