Problem to Link with CppAD and Ipopt #209
Replies: 16 comments
-
Take a look at the discussion In particular the suggestion |
Beta Was this translation helpful? Give feedback.
-
But how exactly to include that particular library? Please see below my CMakeLists.txt. There is an entry called cppad_lib, but the problem remains.
|
Beta Was this translation helpful? Give feedback.
-
And this is how compiler error log sounds:
|
Beta Was this translation helpful? Give feedback.
-
The only workaround I have found so far is to include the following header (copied from inside CppAD):
|
Beta Was this translation helpful? Give feedback.
-
Please take a look at the following Many other people are having this problem and I think I should put something in the documentation for this: Do you have a suggesiton ? Where did you look in the documentation ? Did you do a search for |
Beta Was this translation helpful? Give feedback.
-
Did the message above solve the problem for you ? If so, would you please close this issue. |
Beta Was this translation helpful? Give feedback.
-
No, the message above did not help. Sounds like the library does not have temp_file method inside for some reason. The problem was solved the other way: by directly compiling with adding the temp_file method to the header included in the entry point main.cpp. |
Beta Was this translation helpful? Give feedback.
-
temp_file should be in cppad_lib. What system / compiler are you using and what does your link command look like ? |
Beta Was this translation helpful? Give feedback.
-
Is this still a problem for you ? |
Beta Was this translation helpful? Give feedback.
-
Had the same issue. |
Beta Was this translation helpful? Give feedback.
-
@smith-nekrald and @Geryyy what do you get in response to the command ? |
Beta Was this translation helpful? Give feedback.
-
@bradbell |
Beta Was this translation helpful? Give feedback.
-
@Geryyy What happens when you add these flags to you link command (without the separate copy of temp_file mentioned above) ? If you are using cmake to link your program, see the following: |
Beta Was this translation helpful? Give feedback.
-
Thank you for the hint! Adding this to CMakeLists.txt fixed it for me:
and In CMakeCache.txt the lib paths are:
|
Beta Was this translation helpful? Give feedback.
-
@Geryyy If so, I am going to close this issue and convert it to a discussion. |
Beta Was this translation helpful? Give feedback.
-
Yes, it is solved for me. |
Beta Was this translation helpful? Give feedback.
-
After compiling and installing CppAD, there was a problem to link CppAD and Ipopt with C++ linker. Looks like the method std::string temp_file(void); in namespace CppAD::local is referenced withing CppAD include and is not present in the linking library. So far I have just grepped and copied this method to a separate header (and therefore linked), but I guess this is considered an issue.
Beta Was this translation helpful? Give feedback.
All reactions