Comments (7)
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.
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.
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.
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.
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.
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.
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)
- CppADCodeGen support for Eigen `.transpose()` operation HOT 6
- Found CppAD version '' but at least version '20200000.1' is required HOT 5
- Loops reusing intermediate results HOT 1
- Using LLVM to improve CppAD HOT 4
- Question about wrong type argument error
- Examples on using CppADCodeGen with Eigen HOT 5
- Use CppADCodeGen with variable number of independent variable arrays HOT 2
- GreaterThanZero cannot be called for non-parameters for eigen determinant HOT 2
- Code generation with if/else statements HOT 18
- Large computational graphs fail at link time HOT 4
- cppad_ipopt dependency HOT 3
- Calling CppAD::ipopt::solve from CppADCodeGen HOT 8
- How to get the value of a CppADCodeGen scalar type HOT 1
- Generating Jacobians as Tensors HOT 12
- icpc build fails for dynamic_linux.cpp example HOT 1
- make build_tests fails HOT 1
- Supporting runtime compilation and dynamic linking in MacOSX M1,2 chips HOT 2
- model->Domain() returns size for previous model
- Running the test program Jacobian module listwith cppAD library gives a lot of errors HOT 6
- error when complie function library
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppadcodegen.