Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems to build executable from my own files #45

Open
leonelpm opened this issue Nov 2, 2022 · 1 comment
Open

Problems to build executable from my own files #45

leonelpm opened this issue Nov 2, 2022 · 1 comment

Comments

@leonelpm
Copy link

leonelpm commented Nov 2, 2022

I already installed PSOPT and the examples were compiled and they execute well. However, when I try to compile my own files using the instructions included in the PDF manual:

$ cd psopt/build/examples/user
$ make

I get the following message make: *** No targets specified and no makefile found. Stop. I was wondering, where can I find the required makefile?

@vmbecerra
Copy link
Contributor

Hello

The first thing to try would be the command

$ make user

instead of simply 'make'. You must run this command from psopt/build/examples/user

If you just replaced the user.cxx file located under /psopt/examples/user with your own code, then the above should work in the same way as with the original code, assuming that there are no compilation errors after the modifications you made. In this case, you must use the same filename for your code: user.cxx. A new executable file called user should be created after you run make.

If the changes you have made require additional source code, header files, or libraries, you must modify the file CMakeLists.txt which is located under psopt/examples/user. To do this, you will need to understand some basic principles of CMake.

I hope that helps.

Best wishes

Victor Becerra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants