Skip to content
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

可以采用库的方式提供接口吗 #12

Open
yongxiangzheng opened this issue Sep 13, 2018 · 10 comments
Open

可以采用库的方式提供接口吗 #12

yongxiangzheng opened this issue Sep 13, 2018 · 10 comments

Comments

@yongxiangzheng
Copy link

No description provided.

@qicosmos
Copy link
Owner

ormpp是header only的,引用头文件就行了。

@yongxiangzheng
Copy link
Author

是的,不过不仅要包含dbng头文件,而且还有其他的,是想是不是把一些外部不关心的头文件通过库方式隐藏起来,这样使用更便捷呢

@qicosmos
Copy link
Owner

是希望做成boost那样,对外只提供一个头文件,其它的放到子目录里吗?

@yongxiangzheng
Copy link
Author

是的。这样可以避免配置引用文件、库目录等,便于后期开发,不过熟悉下你的代码,用起来也是挺方便哈

@yongxiangzheng
Copy link
Author

你好,请问blob数据类型怎么存储呢?

@micfan
Copy link

micfan commented Apr 4, 2019

可以提供 libormpp.a 来 static link 吗?

现在需要分离编译发现报错:

/usr/bin/ld: CMakeFiles/bot.dir/src/main.cpp.o: in function `ormpp::get_sql_conditions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/usr/include/boost/system/error_code.hpp:401: multiple definition of `ormpp::get_sql_conditions(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)';

@qicosmos
Copy link
Owner

qicosmos commented Apr 4, 2019

这个问题好改,函数前加inline就可以了。

@micfan
Copy link

micfan commented Apr 4, 2019

是要user来侵入修改library?

对每个用到的函数都要加 inline 吗?

@qicosmos
Copy link
Owner

qicosmos commented Apr 4, 2019

不用,我来统一改。
那种全局函数都要加,之前有些全局函数漏加了。

@micfan
Copy link

micfan commented Apr 4, 2019

那就对了。。

关联 issue #17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants