Can't resolve problematic dlopen() call.

Started by
14 comments, last by the_edd 11 years, 8 months ago

Oh, I mean, Code::Blocks has an option for "Execution working dir" [...] Through this, I should think I do understand "working directory" as it would be used for file paths within the executable.

If I understand its purpose, this option should not affect the resulting executable. Rather, it will only affect the working directory with which the process is launched through the IDE. It is an option that affects running the compiled code, not compiling it in the first place.



Now, using full strace (just "strace ./Launcher"), it seems that it detects the file correctly with an absolute path, but then it does a few things, and then it tries opening the file with some relative directory that wouldn't be correct anyways.


That relative directory is likely the working directory. Again, are you sure you understand the concept?

Do "man getcwd" and use it to print the working directory at the start of your program. Does it match the directory in which your shared object resides?
Advertisement
getcwd(), in fact, does output the correct directory when launching from terminal and not the IDE (Which is what I do anyway).
So set the correct directory in the IDE...(?)
I had already done that with relative and absolute directories, the correct dir, and setting the dir to empty. Either way doesn't work.
Bump. Still not solved, and not sure how to attempt to.
Can you do a binary diff of the file built in the IDE against the file built in a command shell?

Have you tried examining the difference between the build commands when you build in the IDE vs in a command shell?

This topic is closed to new replies.

Advertisement