cxxproject 0.6.14 → 0.6.17
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +18 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +31 -0
- data/LICENSE +22 -0
- data/README.md +868 -0
- data/Rakefile.rb +25 -24
- data/cxx.gemspec +22 -0
- data/example/.gitignore +1 -0
- data/example/Rakefile.rb +35 -0
- data/example/big_project/.gitignore +2 -0
- data/example/big_project/Rakefile_generator.rb +80 -0
- data/example/big_project/fak.h +9 -0
- data/example/ckLayout/cxxproject/Rakefile.rb +4 -0
- data/example/ckLayout/io/Io.cpp +7 -0
- data/example/ckLayout/io/Io.h +6 -0
- data/example/ckLayout/io/project.rb +5 -0
- data/example/ckLayout/lang/Lang.cpp +7 -0
- data/example/ckLayout/lang/Lang.h +6 -0
- data/example/ckLayout/lang/project.rb +3 -0
- data/example/ckLayout/projects/test/main.cpp +8 -0
- data/example/ckLayout/projects/test/project.rb +6 -0
- data/example/custom/.gitignore +1 -0
- data/example/custom/Rakefile.rb +12 -0
- data/example/custom/foo.cpp +5 -0
- data/example/custom/project.rb +27 -0
- data/example/dependency_tests/Rakefile.rb +3 -0
- data/example/dependency_tests/help1.h +12 -0
- data/example/dependency_tests/help2.h +10 -0
- data/example/dependency_tests/main.cpp +6 -0
- data/example/dependency_tests/project.rb +3 -0
- data/example/generator/Rakefile.rb +12 -0
- data/example/generator/main/main.cpp +3 -0
- data/example/generator/main/project/project.rb +3 -0
- data/example/oneFileOnly/Rakefile.rb +3 -0
- data/example/oneFileOnly/config.h +2 -0
- data/example/oneFileOnly/main.cpp +8 -0
- data/example/oneFileOnly/project_compile.rb +3 -0
- data/example/protobuf/.gitignore +4 -0
- data/example/protobuf/Rakefile.rb +70 -0
- data/example/protobuf/addressbook/addressbook.proto +24 -0
- data/example/protobuf/addressbook/addressbook_read.cc +67 -0
- data/example/protobuf/addressbook/addressbook_write.cc +93 -0
- data/example/protobuf/addressbook/project.rb +16 -0
- data/example/protobuf/protobuf.files +37 -0
- data/example/protobuf/protobuf_project.rb +9 -0
- data/example/simpleUnitTest/Rakefile.rb +4 -0
- data/example/simpleUnitTest/atest.cpp +16 -0
- data/example/simpleUnitTest/atest.h +11 -0
- data/example/simpleUnitTest/project.rb +5 -0
- data/example/simpleUnitTest/test.cpp +13 -0
- data/example/strange_dirs/Rakefile.rb +4 -0
- data/example/strange_dirs/lazyLib/project.rb +5 -0
- data/example/strange_dirs/main/main.cpp +5 -0
- data/example/strange_dirs/main/project.rb +5 -0
- data/example/strange_dirs/src/test.cpp +4 -0
- data/example/test.rb +10 -0
- data/example/three_tests/Rakefile.rb +5 -0
- data/example/three_tests/allsuites/project.rb +4 -0
- data/example/three_tests/main/main.cpp +13 -0
- data/example/three_tests/main/project.rb +5 -0
- data/example/three_tests/suite1/project.rb +6 -0
- data/example/three_tests/suite1/suite1.cpp +3 -0
- data/example/three_tests/suite1/suite1.h +28 -0
- data/example/three_tests/suite2/project.rb +6 -0
- data/example/three_tests/suite2/suite2.cpp +3 -0
- data/example/three_tests/suite2/suite2.h +29 -0
- data/lib/cxxproject/version.rb +4 -1
- data/plugins/tmp/.rvmrc +1 -0
- data/plugins/tmp/BuildDir/objects/testme/test.o +0 -0
- data/plugins/tmp/BuildDir/objects/testme/test.o.d +1 -0
- data/plugins/tmp/BuildDir/testme.exe +0 -0
- data/plugins/tmp/Rakefile.rb +6 -0
- data/plugins/tmp/project.rb +6 -0
- data/plugins/tmp/reinstall/Rakefile.rb +15 -0
- data/plugins/tmp/test.cpp +7 -0
- data/rake_helper/perftools.rb +34 -0
- data/rake_helper/spec.rb +80 -0
- data/roodi.yml +8 -0
- data/spec/testdata/basic/exe12/help.cpp +5 -0
- data/spec/testdata/basic/exe12/help.h +6 -0
- data/spec/testdata/basic/exe12/main.cpp +10 -0
- data/spec/testdata/basic/lib1/lib1.cpp +7 -0
- data/spec/testdata/basic/lib1/lib1.h +8 -0
- data/spec/testdata/basic/lib2/lib2.cpp +17 -0
- data/spec/testdata/basic/lib2/lib2.h +6 -0
- data/spec/testdata/multiple_levels/libs/lib1/lib1.cpp +7 -0
- data/spec/testdata/multiple_levels/libs/lib1/lib1.h +8 -0
- data/spec/testdata/multiple_levels/libs/lib2/lib2.cpp +21 -0
- data/spec/testdata/multiple_levels/libs/lib2/lib2.h +6 -0
- data/spec/testdata/multiple_levels/mainproject/basic/help.cpp +5 -0
- data/spec/testdata/multiple_levels/mainproject/basic/help.h +6 -0
- data/spec/testdata/multiple_levels/mainproject/basic/main.cpp +10 -0
- data/spec/testdata/onlyOneHeader/.gitignore +1 -0
- data/spec/testdata/onlyOneHeader/help.cpp +5 -0
- data/spec/testdata/onlyOneHeader/help.h +7 -0
- data/spec/testdata/onlyOneHeader/main.cpp +8 -0
- data/spec/testdata/onlyOneHeader/testin.c +0 -0
- metadata +191 -91
@@ -0,0 +1,93 @@
|
|
1
|
+
#include <iostream>
|
2
|
+
#include <fstream>
|
3
|
+
#include <string>
|
4
|
+
#include "addressbook/addressbook.pb.h"
|
5
|
+
using namespace std;
|
6
|
+
|
7
|
+
// This function fills in a Person message based on user input.
|
8
|
+
void PromptForAddress(tutorial::Person* person) {
|
9
|
+
cout << "Enter person ID number: ";
|
10
|
+
int id;
|
11
|
+
cin >> id;
|
12
|
+
person->set_id(id);
|
13
|
+
cin.ignore(256, '\n');
|
14
|
+
|
15
|
+
cout << "Enter name: ";
|
16
|
+
getline(cin, *person->mutable_name());
|
17
|
+
|
18
|
+
cout << "Enter email address (blank for none): ";
|
19
|
+
string email;
|
20
|
+
getline(cin, email);
|
21
|
+
if (!email.empty()) {
|
22
|
+
person->set_email(email);
|
23
|
+
}
|
24
|
+
|
25
|
+
while (true) {
|
26
|
+
cout << "Enter a phone number (or leave blank to finish): ";
|
27
|
+
string number;
|
28
|
+
getline(cin, number);
|
29
|
+
if (number.empty()) {
|
30
|
+
break;
|
31
|
+
}
|
32
|
+
|
33
|
+
tutorial::Person::PhoneNumber* phone_number = person->add_phone();
|
34
|
+
phone_number->set_number(number);
|
35
|
+
|
36
|
+
cout << "Is this a mobile, home, or work phone? ";
|
37
|
+
string type;
|
38
|
+
getline(cin, type);
|
39
|
+
if (type == "mobile") {
|
40
|
+
phone_number->set_type(tutorial::Person::MOBILE);
|
41
|
+
} else if (type == "home") {
|
42
|
+
phone_number->set_type(tutorial::Person::HOME);
|
43
|
+
} else if (type == "work") {
|
44
|
+
phone_number->set_type(tutorial::Person::WORK);
|
45
|
+
} else {
|
46
|
+
cout << "Unknown phone type. Using default." << endl;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
// Main function: Reads the entire address book from a file,
|
52
|
+
// adds one person based on user input, then writes it back out to the same
|
53
|
+
// file.
|
54
|
+
int main(int argc, char* argv[]) {
|
55
|
+
// Verify that the version of the library that we linked against is
|
56
|
+
// compatible with the version of the headers we compiled against.
|
57
|
+
GOOGLE_PROTOBUF_VERIFY_VERSION;
|
58
|
+
|
59
|
+
if (argc != 2) {
|
60
|
+
cerr << "Usage: " << argv[0] << " ADDRESS_BOOK_FILE" << endl;
|
61
|
+
return -1;
|
62
|
+
}
|
63
|
+
|
64
|
+
tutorial::AddressBook address_book;
|
65
|
+
|
66
|
+
{
|
67
|
+
// Read the existing address book.
|
68
|
+
fstream input(argv[1], ios::in | ios::binary);
|
69
|
+
if (!input) {
|
70
|
+
cout << argv[1] << ": File not found. Creating a new file." << endl;
|
71
|
+
} else if (!address_book.ParseFromIstream(&input)) {
|
72
|
+
cerr << "Failed to parse address book." << endl;
|
73
|
+
return -1;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
// Add an address.
|
78
|
+
PromptForAddress(address_book.add_person());
|
79
|
+
|
80
|
+
{
|
81
|
+
// Write the new address book back to disk.
|
82
|
+
fstream output(argv[1], ios::out | ios::trunc | ios::binary);
|
83
|
+
if (!address_book.SerializeToOstream(&output)) {
|
84
|
+
cerr << "Failed to write address book." << endl;
|
85
|
+
return -1;
|
86
|
+
}
|
87
|
+
}
|
88
|
+
|
89
|
+
// Optional: Delete all global objects allocated by libprotobuf.
|
90
|
+
google::protobuf::ShutdownProtobufLibrary();
|
91
|
+
|
92
|
+
return 0;
|
93
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
cxx_configuration do
|
2
|
+
|
3
|
+
source_lib 'addressbook_pb_api',
|
4
|
+
:sources => ['gen/addressbook/addressbook.pb.cc'],
|
5
|
+
:includes => ['gen'],
|
6
|
+
:dependencies => ['protobuf']
|
7
|
+
|
8
|
+
exe 'addressbook_write',
|
9
|
+
:sources => ['addressbook_write.cc'],
|
10
|
+
:dependencies => ['addressbook_pb_api']
|
11
|
+
|
12
|
+
exe 'addressbook_read',
|
13
|
+
:sources => ['addressbook_read.cc'],
|
14
|
+
:dependencies => ['addressbook_pb_api']
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
- google/protobuf/stubs/common.cc
|
2
|
+
- google/protobuf/stubs/once.cc
|
3
|
+
- google/protobuf/stubs/hash.h
|
4
|
+
- google/protobuf/stubs/map-util.h
|
5
|
+
- google/protobuf/stubs/stl_util-inl.h
|
6
|
+
- google/protobuf/extension_set.cc
|
7
|
+
- google/protobuf/generated_message_util.cc
|
8
|
+
- google/protobuf/message_lite.cc
|
9
|
+
- google/protobuf/repeated_field.cc
|
10
|
+
- google/protobuf/wire_format_lite.cc
|
11
|
+
- google/protobuf/io/coded_stream.cc
|
12
|
+
- google/protobuf/io/coded_stream_inl.h
|
13
|
+
- google/protobuf/io/zero_copy_stream.cc
|
14
|
+
- google/protobuf/io/zero_copy_stream_impl_lite.cc
|
15
|
+
- google/protobuf/stubs/strutil.cc
|
16
|
+
- google/protobuf/stubs/strutil.h
|
17
|
+
- google/protobuf/stubs/substitute.cc
|
18
|
+
- google/protobuf/stubs/substitute.h
|
19
|
+
- google/protobuf/stubs/structurally_valid.cc
|
20
|
+
- google/protobuf/descriptor.cc
|
21
|
+
- google/protobuf/descriptor.pb.cc
|
22
|
+
- google/protobuf/descriptor_database.cc
|
23
|
+
- google/protobuf/dynamic_message.cc
|
24
|
+
- google/protobuf/extension_set_heavy.cc
|
25
|
+
- google/protobuf/generated_message_reflection.cc
|
26
|
+
- google/protobuf/message.cc
|
27
|
+
- google/protobuf/reflection_ops.cc
|
28
|
+
- google/protobuf/service.cc
|
29
|
+
- google/protobuf/text_format.cc
|
30
|
+
- google/protobuf/unknown_field_set.cc
|
31
|
+
- google/protobuf/wire_format.cc
|
32
|
+
- google/protobuf/io/gzip_stream.cc
|
33
|
+
- google/protobuf/io/printer.cc
|
34
|
+
- google/protobuf/io/tokenizer.cc
|
35
|
+
- google/protobuf/io/zero_copy_stream_impl.cc
|
36
|
+
- google/protobuf/compiler/importer.cc
|
37
|
+
- google/protobuf/compiler/parser.cc
|
@@ -0,0 +1,9 @@
|
|
1
|
+
cxx_configuration do
|
2
|
+
deps = [BinaryLibrary.new('z'), BinaryLibrary.new('pthread')]
|
3
|
+
|
4
|
+
source_lib 'protobuf',
|
5
|
+
:sources => PROTOBUF_LITE_SOURCES.delete_if{ |i| i.index('.h') },
|
6
|
+
:includes => [File.join(PROTOBUF_BASE, 'src'), File.join(PROTOBUF_BASE, 'tmp')],
|
7
|
+
:dependencies => deps,
|
8
|
+
:file_dependencies => [PROTOBUF_CONFIG_H]
|
9
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
#include <cassert>
|
2
|
+
|
3
|
+
#include <cppunit/TestCase.h>
|
4
|
+
#include <cppunit/ui/text/TestRunner.h>
|
5
|
+
#include <cppunit/extensions/TestFactoryRegistry.h>
|
6
|
+
|
7
|
+
int main( int argc, char **argv) {
|
8
|
+
CppUnit::TextUi::TestRunner runner;
|
9
|
+
CppUnit::TestFactoryRegistry ®istry = CppUnit::TestFactoryRegistry::getRegistry();
|
10
|
+
runner.addTest( registry.makeTest() );
|
11
|
+
bool wasSuccessful = runner.run( );
|
12
|
+
return wasSuccessful ? 0 : 1;
|
13
|
+
}
|
data/example/test.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#include <cassert>
|
2
|
+
|
3
|
+
#include <cppunit/TestCase.h>
|
4
|
+
#include <cppunit/ui/text/TestRunner.h>
|
5
|
+
#include <cppunit/extensions/TestFactoryRegistry.h>
|
6
|
+
|
7
|
+
int main( int argc, char **argv) {
|
8
|
+
CppUnit::TextUi::TestRunner runner;
|
9
|
+
CppUnit::TestFactoryRegistry ®istry = CppUnit::TestFactoryRegistry::getRegistry();
|
10
|
+
runner.addTest( registry.makeTest() );
|
11
|
+
bool wasSuccessful = runner.run( );
|
12
|
+
return wasSuccessful ? 0 : 1;
|
13
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
#ifndef suite1_h_
|
2
|
+
#define suite1_h_
|
3
|
+
|
4
|
+
#include <cppunit/TestCase.h>
|
5
|
+
#include <cppunit/extensions/HelperMacros.h>
|
6
|
+
|
7
|
+
class Suite1 : public CppUnit::TestFixture {
|
8
|
+
|
9
|
+
public:
|
10
|
+
|
11
|
+
void setUp() {
|
12
|
+
}
|
13
|
+
|
14
|
+
|
15
|
+
void tearDown() {
|
16
|
+
}
|
17
|
+
|
18
|
+
void test1() {
|
19
|
+
CPPUNIT_ASSERT_MESSAGE( "hat geklappt", true );
|
20
|
+
}
|
21
|
+
|
22
|
+
CPPUNIT_TEST_SUITE( Suite1 );
|
23
|
+
CPPUNIT_TEST( test1 );
|
24
|
+
CPPUNIT_TEST_SUITE_END();
|
25
|
+
|
26
|
+
};
|
27
|
+
|
28
|
+
#endif
|
@@ -0,0 +1,29 @@
|
|
1
|
+
#ifndef suite2_h_
|
2
|
+
#define suite2_h_
|
3
|
+
|
4
|
+
#include <cppunit/TestCase.h>
|
5
|
+
#include <cppunit/extensions/HelperMacros.h>
|
6
|
+
|
7
|
+
class Suite2 : public CppUnit::TestFixture {
|
8
|
+
|
9
|
+
public:
|
10
|
+
|
11
|
+
void setUp() {
|
12
|
+
}
|
13
|
+
|
14
|
+
|
15
|
+
void tearDown() {
|
16
|
+
}
|
17
|
+
|
18
|
+
void test2() {
|
19
|
+
printf("inside test2\n");
|
20
|
+
CPPUNIT_ASSERT_MESSAGE( "hat auch geklappt", true );
|
21
|
+
}
|
22
|
+
|
23
|
+
CPPUNIT_TEST_SUITE( Suite2 );
|
24
|
+
CPPUNIT_TEST( test2 );
|
25
|
+
CPPUNIT_TEST_SUITE_END();
|
26
|
+
|
27
|
+
};
|
28
|
+
|
29
|
+
#endif
|
data/lib/cxxproject/version.rb
CHANGED
data/plugins/tmp/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use 1.9.3@cxxgcctoolchaintest --create
|
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
--- []
|
Binary file
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'rake/clean'
|
2
|
+
|
3
|
+
desc 'reinstall plugins'
|
4
|
+
task :reinstall do
|
5
|
+
toolchainpath="../../../plugins/"
|
6
|
+
plugins = ["gcc","clang","diab"]
|
7
|
+
plugins.each do |p|
|
8
|
+
plugin = "cxxproject_#{p}toolchain"
|
9
|
+
sh "gem uninstall #{plugin}"
|
10
|
+
cd "#{toolchainpath}toolchain#{p}" do
|
11
|
+
sh "gem build #{p}.gemspec"
|
12
|
+
sh "gem install #{plugin}"
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
begin
|
2
|
+
require 'perftools'
|
3
|
+
namespace :perftools do
|
4
|
+
def my_cd
|
5
|
+
cd('example/big_project', :verbose => false) do
|
6
|
+
yield
|
7
|
+
end
|
8
|
+
end
|
9
|
+
task :clean_big_project do
|
10
|
+
my_cd do
|
11
|
+
require 'fileutils'
|
12
|
+
FileUtils.rm_rf('build')
|
13
|
+
FileUtils.rm_rf('gen')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
task :generate_big_project => [:clean_big_project] do
|
17
|
+
my_cd do
|
18
|
+
sh 'rake -f Rakefile_generator.rb'
|
19
|
+
end
|
20
|
+
end
|
21
|
+
task :big_project => [:generate_big_project] do
|
22
|
+
my_cd do
|
23
|
+
sh 'CPUPROFILE=./test.profile RUBYOPT="-r`gem which perftools | tail -1`" ruby gen/Rakefile.rb'
|
24
|
+
end
|
25
|
+
end
|
26
|
+
desc 'Show perftools profile'
|
27
|
+
task :show_profile => [:big_project] do
|
28
|
+
my_cd do
|
29
|
+
sh 'pprof.rb --web profile'
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
rescue LoadError => e
|
34
|
+
end
|
data/rake_helper/spec.rb
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
SPEC_PATTERN ='spec/**/*_spec.rb'
|
2
|
+
require './lib/cxxproject/utils/optional'
|
3
|
+
def rcov_for_18
|
4
|
+
use_rcov = true
|
5
|
+
begin
|
6
|
+
gem "rcov"
|
7
|
+
rescue LoadError
|
8
|
+
warn "rcov not installed...code coverage will not be measured!"
|
9
|
+
use_rcov = false
|
10
|
+
end
|
11
|
+
use_rcov
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
def coverage
|
16
|
+
load_rcov = lambda do
|
17
|
+
require 'rcov'
|
18
|
+
RSpec::Core::RakeTask.new(:coverage) do |t|
|
19
|
+
t.pattern = SPEC_PATTERN
|
20
|
+
t.rcov = true
|
21
|
+
t.rcov_opts = ['--exclude', '.*/gems/.*']
|
22
|
+
end
|
23
|
+
end
|
24
|
+
simple_cov_or_nothing = lambda do
|
25
|
+
load_simplecov = lambda do
|
26
|
+
require 'simplecov'
|
27
|
+
task :coverage do
|
28
|
+
ENV['COVERAGE'] = 'yes'
|
29
|
+
Rake::Task['spec:spec'].invoke
|
30
|
+
end
|
31
|
+
end
|
32
|
+
could_not_define_rcov_or_simplecov = lambda do
|
33
|
+
task :coverage do
|
34
|
+
puts "Please install coverage tools with\n\"gem install simplecov\" for ruby 1.9 or\n\"gem install rcov\" for ruby 1.8"
|
35
|
+
end
|
36
|
+
end
|
37
|
+
Cxxproject::Utils::optional_package(load_simplecov, could_not_define_rcov_or_simplecov)
|
38
|
+
end
|
39
|
+
Cxxproject::Utils::optional_package(load_rcov, simple_cov_or_nothing)
|
40
|
+
end
|
41
|
+
|
42
|
+
def new_rspec
|
43
|
+
require 'rspec/core/rake_task'
|
44
|
+
desc "Run examples"
|
45
|
+
RSpec::Core::RakeTask.new() do |t|
|
46
|
+
t.pattern = SPEC_PATTERN
|
47
|
+
end
|
48
|
+
|
49
|
+
desc 'Run examples with coverage'
|
50
|
+
coverage
|
51
|
+
CLOBBER.include('coverage')
|
52
|
+
end
|
53
|
+
|
54
|
+
def old_rspec
|
55
|
+
require 'spec/rake/spectask'
|
56
|
+
desc "Run examples"
|
57
|
+
Spec::Rake::SpecTask.new() do |t|
|
58
|
+
t.spec_files = SPEC_PATTERN
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
namespace :spec do
|
63
|
+
begin
|
64
|
+
new_rspec
|
65
|
+
rescue LoadError
|
66
|
+
begin
|
67
|
+
old_rspec
|
68
|
+
rescue LoadError
|
69
|
+
desc "Run examples"
|
70
|
+
task 'spec' do
|
71
|
+
puts 'rspec not installed...! please install with "gem install rspec"'
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
task :spec do
|
77
|
+
puts 'Please use spec:spec or spec:coverage'
|
78
|
+
end
|
79
|
+
task :gem => [:spec]
|
80
|
+
|
data/roodi.yml
ADDED
@@ -0,0 +1,8 @@
|
|
1
|
+
CaseMissingElseCheck: { }
|
2
|
+
CyclomaticComplexityBlockCheck: { complexity: 9 }
|
3
|
+
CyclomaticComplexityMethodCheck: { complexity: 10 }
|
4
|
+
#MethodLineCountCheck: { line_count: 100 }
|
5
|
+
MethodNameCheck: { pattern: !ruby/regexp /^[_a-z<>=\[\]|+-\/\*`]+[_a-z0-9_<>=~@\[\]]*[=!\?]?$/ }
|
6
|
+
ModuleLineCountCheck: { line_count: 300 }
|
7
|
+
ModuleNameCheck: { pattern: !ruby/regexp /^[A-Z][a-zA-Z0-9]*$/ }
|
8
|
+
ParameterNumberCheck: { parameter_count: 6 }
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#include "lib2.h"
|
2
|
+
|
3
|
+
#include <iostream>
|
4
|
+
#include <math.h>
|
5
|
+
#include "lib1.h"
|
6
|
+
#include <dlfcn.h>
|
7
|
+
#include <zlib.h>
|
8
|
+
|
9
|
+
void lib2() {
|
10
|
+
std::cout << "lib2" << std::endl;
|
11
|
+
lib1();
|
12
|
+
std::cout << sin(5) << std::endl;
|
13
|
+
void* help = dlopen("test", RTLD_LAZY);
|
14
|
+
std::cout << (long)help << std::endl;
|
15
|
+
Bytef b = 0;
|
16
|
+
uLong res = crc32(0, &b, 1);
|
17
|
+
}
|