Giter VIP home page Giter VIP logo

Comments (7)

aespielberg avatar aespielberg commented on June 11, 2024

I resolved this by adding set(CMAKE_CXX_STANDARD_LIBRARIES -ldl) to my cmakelists, or -Wl,--no-as-needed -ldl to my g++ options. Maybe this should be added to the wiki?

from cppadcodegen.

bradbell avatar bradbell commented on June 11, 2024

If you enter the distribution directory cppad-20180000.0 and execute the command
bin/run_cmake.sh
and then execute
cd build
make check_example_general
does the HesLagrangian example report OK ?

from cppadcodegen.

aespielberg avatar aespielberg commented on June 11, 2024

Yes.

Begin test group example/general
abort_recording     OK
fabs                OK
acos                OK
acosh               OK
ad_assign           OK
ad_ctor             OK
Add                 OK
AddEq               OK
ad_fun              OK
ad_in_c             OK
ad_input            OK
ad_output           OK
asin                OK
asinh               OK
atan2               OK
atan                OK
atanh               OK
azmul               OK
BenderQuad          OK
BoolFun             OK
capacity_order      OK
change_param        OK
compare_change      OK
Compare             OK
complex_poly        OK
CondExp             OK
Cos                 OK
Cosh                OK
Div                 OK
DivEq               OK
EqualOpSeq          OK
Erf                 OK
exp                 OK
expm1               OK
ForOne              OK
ForTwo              OK
forward_dir         OK
Forward             OK
forward_order       OK
fun_assign          OK
FunCheck            OK
HesLagrangian       OK
HesLuDet            OK
HesMinorDet         OK
Hessian             OK
HesTimesDir         OK
Independent         OK
Integer             OK
Interface2C         OK
interp_onetape      OK
interp_retape       OK
JacLuDet            OK
JacMinorDet         OK
Jacobian            OK
log10               OK
log1p               OK
log                 OK
LuRatio             OK
LuVecADOk           OK
MulEq               OK
mul_level           OK
mul_level_ode       OK
Mul                 OK
NearEqualExt        OK
number_skip         OK
NumericType         OK
num_limits          OK
OdeStiff            OK
ode_taylor          OK
opt_val_hes         OK
ParVar              OK
Poly                OK
pow_int             OK
pow                 OK
reverse_any         OK
reverse_one         OK
reverse_three       OK
reverse_two         OK
RevOne              OK
RevTwo              OK
Rosen34             OK
runge_45_2          OK
seq_property        OK
sign                OK
Sinh                OK
Sin                 OK
Sqrt                OK
StackMachine        OK
SubEq               OK
Sub                 OK
Tanh                OK
Tan                 OK
TapeIndex           OK
UnaryMinus          OK
UnaryPlus           OK
Value               OK
Var2Par             OK
vec_ad              OK
check_for_nan       OK
memory_leak         OK
All 100 tests passed.
End test group example/general

from cppadcodegen.

bradbell avatar bradbell commented on June 11, 2024

Did the commands above work before you changed any of the CppAD CMakeLists.txt files ?

If not, do you have a suggested change to get it to work.

If yes, then the following command would show the flags used to compile and link the example
bin/run_cmake.sh --verbose
cd build
make clean
make check_example_general

My mistake: I thought this was a CppAD bug report, instead of a CppADCodeGen bug report.

from cppadcodegen.

aespielberg avatar aespielberg commented on June 11, 2024

The above worked before I changed any CppAD CMakeLists.txt files, yes. The issue I had was in using CppADCodeGen in my own project. I suggested the CMakeLists.txt flag that I needed to include in my project.

As for those flags, would you like me to report what make does here when I run that?

from cppadcodegen.

joaoleal avatar joaoleal commented on June 11, 2024

To know how to build an example I would suggest to look at
https://github.com/joaoleal/CppADCodeGen/blob/master/example/CMakeLists.txt

Regarding the Lagrangian, the key section is:

############################################################################
#                                  lagrangian
############################################################################
ADD_EXECUTABLE(lagrangian lagrangian.cpp)
SET(EXAMPLES_COMMAND "${EXAMPLES_COMMAND} COMMAND lagrangian")
TARGET_LINK_LIBRARIES(lagrangian ${DL_LIBRARIES})
ADD_CUSTOM_TARGET(example_lagrangian
                  COMMAND lagrangian)

from cppadcodegen.

aespielberg avatar aespielberg commented on June 11, 2024

Thank you for the reply. I somehow missed this CMakeLists.txt file. I believe it was the ${DL_LIBRARIES} that I forgot.

from cppadcodegen.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.