Linux Hello World C++ tutorial not compiling

I’m currently running on Linux Ubuntu 18.10.
I installed the Panda3d 1.10.2 SDK.

I tried to run the Hello World C++ example. I ran the command:

g++ -c main.cxx -o main.o -std=gnu++11 -O2 -I/usr/include/panda3d/

I got this error message back:

In file included from /usr/include/panda3d/config_linmath.h:20, from /usr/include/panda3d/lvecBase2.h:18, from /usr/include/panda3d/lpoint2.h:19, from /usr/include/panda3d/windowProperties.h:21, from /usr/include/panda3d/config_framework.h:19, from /usr/include/panda3d/pandaFramework.h:18, from main.cxx:1: /usr/include/panda3d/lsimpleMatrix.h:20:10: fatal error: Eigen/Dense: No such file or directory #include <Eigen/Dense> ^~~~~~~~~~~~~ compilation terminated.

Please advice
(Sorry about the mixup with posting this on the github error page, rdb)

Hi, welcome to the forums!

You should add -I/usr/include/eigen3 to the command-line to make that error go away.

Thanks man.

After quickly installing eigen3 it worked but now with the second command there is a new issue…

command: g++ main.o -o main -L/usr/lib/panda3d/ -lp3framework -lpanda -lpandafx -lpandaexpress -lp 3dtoolconfig -lp3dtool -lp3pystub -lp3direct

error: /usr/bin/ld: cannot find -lp3framework /usr/bin/ld: cannot find -lpanda /usr/bin/ld: cannot find -lpandafx /usr/bin/ld: cannot find -lpandaexpress /usr/bin/ld: cannot find -lp3dtoolconfig /usr/bin/ld: cannot find -lp3dtool /usr/bin/ld: cannot find -lp3pystub /usr/bin/ld: cannot find -lp3direct collect2: error: ld returned 1 exit status

Sorry for the hassle and thanks for the helping me.

You should find the location where libp3dtool.so et al are and then add that as an -L setting. They might not be in /usr/lib/panda3d but perhaps in something like /usr/lib/x86_64-linux-gnu/panda3d on your system.

Works! Thank for your help