Skip to content

Instantly share code, notes, and snippets.

@ftiasch
Last active December 17, 2018 07:50
Show Gist options
  • Save ftiasch/66127fef9df5c204d76d2128fcf4ec30 to your computer and use it in GitHub Desktop.
Save ftiasch/66127fef9df5c204d76d2128fcf4ec30 to your computer and use it in GitHub Desktop.
buck issue report
prebuilt_cxx_library(
name = 'test',
exported_headers = ['test.h'],
shared_lib = 'libtest.so',
preferred_linkage = 'shared',
)
cxx_binary(
name = 'main',
srcs = ['main.cpp'],
deps = [':test'],
)
#include "test.h"
#include <iostream>
int main()
{
std::cout << test() << std::endl;
}
libtest.so: test.h test.cpp
c++ -shared test.cpp -olibtest.so
#include "test.h"
int test()
{
return 42;
}
#pragma once
int test();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment