Added package object
This commit is contained in:
parent
c0fb378f2e
commit
ac1ac444aa
8 changed files with 117 additions and 17 deletions
3
examples/CMakeLists.txt
Normal file
3
examples/CMakeLists.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
add_executable(test test.cpp)
|
||||
target_include_directories(test PRIVATE ankiparser)
|
||||
target_link_libraries(test PRIVATE ankiparser)
|
22
examples/test.cpp
Normal file
22
examples/test.cpp
Normal file
|
@ -0,0 +1,22 @@
|
|||
#include <iostream>
|
||||
#include <Package.hpp>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
if (argc != 2)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0] << " <apkg file>" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
Anki::Package pkg(argv[1]);
|
||||
}
|
||||
catch (const char* e)
|
||||
{
|
||||
std::cerr << e << std::endl;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue