Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

basicmind

macrumors newbie
Original poster
Oct 12, 2007
3
0
I have a simple c++ program with lua embedded into it.

Is there a difference when you double click an executable? or when you ./file_name it in the terminal. as I get two different results.

if I double click the icon it just ignores the lua
if I ./file_name it works perfectly.

interestingly If I access the executable with the full path I get the same result as double clicking it.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Sounds like it's something to do with the current/working directory. When you run it via ./ the cwd is the one the executable is in. Via full path/double click this is probably not the case.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.