Link to the source. Link to the build instructions.
- I create a new DLL C++ library project for .NET 4.7.
- I go into the properties and add the eigen directory (a dependency) to the "Additional Include Directories" and "Additional #using Directories".
- I add all of the .h files in the opennn directory to the project's "Header Files" directory and all of the .cpp files to the project's "Source Files" directory.
- I attempt to build the project and get a ton of the same error. I find the solution here, selecting every file in the Source Files directory, going into properties, and setting "Precompiled Header" to "Not Using Precompiled Headers".
- The build is running fine for a bit, with a bunch of signed/unsigned mismatch warnings I can ignore.
I get a boatload of errors.
missing type specifier - int assumed. Note: C++ does not support default-int ~ informedness_optimization_threshold.cpp ~ 172 syntax error: missing ';' before '*' ~ informedness_optimization_threshold.cpp ~ 172 'performance_functional_pointer': undeclared identifier ~ informedness_optimization_threshold.cpp ~ 172 'get_performance_functional_pointer': is not a member of 'OpenNN::TrainingStrategy' ~ informedness_optimization_threshold.cpp ~ 172 'performance_functional_pointer': undeclared identifier ~ informedness_optimization_threshold.cpp ~ 174 left of '->get_neural_network_pointer' must point to class/struct/union/generic type ~ informedness_optimization_threshold.cpp ~ 174 'maximum_iterations_number': undeclared identifier ~ informedness_optimization_threshold.cpp ~ 238 'MaximumIterations': is not a member of 'OpenNN::ThresholdSelectionAlgorithm' ~ informedness_optimization_threshold.cpp ~ 247 'MaximumIterations': undeclared identifier ~ informedness_optimization_threshold.cpp ~ 247 'final_binary_classification_test': is not a member of 'OpenNN::InformednessOptimizationThreshold::InformednessOptimizationThresholdResults' ~ informedness_optimization_threshold.cpp ~ 275 'maximum_iterations_number': undeclared identifier ~ informedness_optimization_threshold.cpp ~ 316 'maximum_time': undeclared identifier ~ informedness_optimization_threshold.cpp ~ 325 'maximum_time': undeclared identifier ~ informedness_optimization_threshold.cpp ~ 449 'set_maximum_iterations_number': identifier not found ~ informedness_optimization_threshold.cpp ~ 527 'set_maximum_time': identifier not found ~ informedness_optimization_threshold.cpp ~ 546
How do I achieve my end goal of calling OpenNN functions from C#?