Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #7717 > unrolled thread

how to include lua

Started byMichael <Michael@notspam.com>
First post2011-07-11 09:00 +0200
Last post2011-07-12 20:48 +0200
Articles 6 — 3 participants

Back to article view | Back to comp.lang.c++


Contents

  how to include lua Michael <Michael@notspam.com> - 2011-07-11 09:00 +0200
    Re: how to include lua Michael DOUBEZ <michael.doubez@free.fr> - 2011-07-11 01:21 -0700
      Re: how to include lua Michael <Michael@notspam.com> - 2011-07-11 14:02 +0200
        Re: how to include lua Michael <Michael@notspam.com> - 2011-07-12 10:28 +0200
          Re: how to include lua Miles Bader <miles@gnu.org> - 2011-07-12 17:50 +0900
            Re: how to include lua Michael <Michael@notspam.com> - 2011-07-12 20:48 +0200

#7717 — how to include lua

FromMichael <Michael@notspam.com>
Date2011-07-11 09:00 +0200
Subjecthow to include lua
Message-ID<a9dde$4e1a9f7a$c299b776$19074@news.hispeed.ch>
Hi
how to include lua (eclipse,linux)?
Thanks Michael

with
> #include <lua.h>
> #include <lauxlib.h>

i get:
> ../plugin_source/luagl.c:27:17: warning: lua.h: No such file or directory
> ../plugin_source/luagl.c:28:21: warning: lauxlib.h: No such file or directory

[toc] | [next] | [standalone]


#7721

FromMichael DOUBEZ <michael.doubez@free.fr>
Date2011-07-11 01:21 -0700
Message-ID<f3b983bf-6996-4cdf-950f-f12c449ffb7a@n28g2000vbs.googlegroups.com>
In reply to#7717
On Jul 11, 9:00 am, Michael <Mich...@notspam.com> wrote:
> how to include lua (eclipse,linux)?
> Thanks Michael
>
> with
>
> > #include <lua.h>
> > #include <lauxlib.h>
>
> i get:
>
> > ../plugin_source/luagl.c:27:17: warning: lua.h: No such file or directory
> > ../plugin_source/luagl.c:28:21: warning: lauxlib.h: No such file or directory

Add lua to your include path:
http://help.eclipse.org/galileo/topic/org.eclipse.cdt.doc.user/tasks/cdt_t_proj_paths.htm

Ask on eclipse/CDT or eclipse forums for further questions, you are OT
here.

--
Michael

[toc] | [prev] | [next] | [standalone]


#7727

FromMichael <Michael@notspam.com>
Date2011-07-11 14:02 +0200
Message-ID<7ef75$4e1ae646$c299b776$31015@news.hispeed.ch>
In reply to#7721
yes I've included lua headers but am unsure about the linker settings. 
tried lua and LUA without changes and that errors are weird. will ask
also in eclipse forum

[toc] | [prev] | [next] | [standalone]


#7746

FromMichael <Michael@notspam.com>
Date2011-07-12 10:28 +0200
Message-ID<74ca8$4e1c05a2$c299b38b$18367@news.hispeed.ch>
In reply to#7727
Following this:
http://csl.sublevel3.org/lua/


extern "C" {
#include <lua.h>
#include <lauxlib.h>
}

I get this error:

agl.c:14: error: expected identifier or ‘(’ before string constant
l.c:15:17: warning: lua.h: No such file or directory
uagl.c:16:21: warning: lauxlib.h: No such file or directory

Why? Thanks

[toc] | [prev] | [next] | [standalone]


#7747

FromMiles Bader <miles@gnu.org>
Date2011-07-12 17:50 +0900
Message-ID<buo8vs3g9wo.fsf@dhlpc061.dev.necel.com>
In reply to#7746
Michael <Michael@notspam.com> writes:
> extern "C" {
> #include <lua.h>
> #include <lauxlib.h>
> }
>
> I get this error:
>
> agl.c:14: error: expected identifier or ‘(’ before string constant

Are you actually using a C++ compiler?

> l.c:15:17: warning: lua.h: No such file or directory
> uagl.c:16:21: warning: lauxlib.h: No such file or directory

It looks like those include files are not on your include path...

Where did you install them?

-Miles

-- 
80% of success is just showing up.  --Woody Allen

[toc] | [prev] | [next] | [standalone]


#7753

FromMichael <Michael@notspam.com>
Date2011-07-12 20:48 +0200
Message-ID<f0b32$4e1c9706$c299b38b$27261@news.hispeed.ch>
In reply to#7747
Hi -Miles
g++

michael@ubuntu:~$ cd /usr
michael@ubuntu:/usr$ find . -name "*lua*"
./local/lib/luarocks
./src/linux-headers-2.6.32-23-generic-pae/include/config/sound/kahlua.h
./src/linux-headers-2.6.32-23-generic-pae/include/config/scsi/dh/alua.h
./include/FL/Fl_Valuator.H
./include/luajit-2.0
./include/luajit-2.0/luajit.h
./include/luajit-2.0/lualib.h
./include/luajit-2.0/lua.h
./include/luajit-2.0/luaconf.h
./include/luajit-2.0/lua.hpp
./include/lua5.1
./include/lua5.1/lua-curl.h
./include/lua5.1/luasocket.h
./include/lua5.1/lualib.h
./include/lua5.1/lua.h
./include/lua5.1/luaconf.h
./include/lua5.1/lua.hpp


at least lua.h should be found as I do:

-I/usr/include/lua5.1
Thanks
Michael

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.c++


csiph-web