0

Link to the source. Link to the build instructions.

  1. I create a new DLL C++ library project for .NET 4.7.
  2. I go into the properties and add the eigen directory (a dependency) to the "Additional Include Directories" and "Additional #using Directories".
  3. 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.
  4. 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".
  5. The build is running fine for a bit, with a bunch of signed/unsigned mismatch warnings I can ignore.
  6. 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#?

ZJohnsonPest
  • 11
  • 1
  • 3

1 Answers1

0

I have compiled OpenNN with flowing procedure.

  1. remove informedness_optimization_threshold.cpp, informedness_optimization_threshold.h from project.

  2. Add tinyxml2.cpp, tinyxml2.h in tinyxml2 folder to project.

I think it's not a good solution but may be we need more update of OpenNN.

Jake
  • 129
  • 10