C++ with scripting language issues

Discussion in 'Mac Programming' started by basicmind, Oct 31, 2009.

  1. basicmind macrumors newbie

    Oct 12, 2007
    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.
  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    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.

Share This Page