#How to convert files from text to cpp?

39 messages · Page 1 of 1 (latest)

lament karma
#

I'm trying a library could Eigen. There, I'm having a problem with running the library, in which the cmd doesn't recognize the directory. I've noticed that the files which Dense is leading for, are not a c++ files but just files, soo I thought I need to change that.

keen scrollBOT
#

When your question is answered use !solved to mark the question as resolved.

Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For more information use !howto ask.

hard rapids
#

Eigen I believe is all header files

#

I don't think you would have to convert it to cpp files.

Where are the Eigen files stored relative to the code project you are working on?

#
#include <Eigen/Dense>
#

this should be good enough as long as you pass in the correct directories to the compiler

lament karma
#

The error I'm getting that it doesn't exist

#

and I saw that all the files in Eigen are just files

#

They're not cpp

#

I mean by the includes

hard rapids
#

Ok - did you link the correct directory for the compiler?

lament karma
#

They just can't work

lament karma
hard rapids
#

how are you compiling the code?

#

What command do you use to compile/build your code?

lament karma
#

It's like that: g++ -I "C:\grand\program files..."

#

That's one of the things that I needed to do

hard rapids
#

ok so g++ -l"C:\some\path\to\your\code" is that the full command?

lament karma
#

I'll show you all

#

Sorry I'm taking the time

#

I just had some problem

#

Wait one second

hard rapids
#
  1. Show me the path to where you extracted/compiled the Eigen package
  2. Show me the full g++ command that you use to compile the code
lament karma
lament karma
#

these are the two

hard rapids
#

you need to add -I "C:\Users\grand\OneDrive\....\eigen-3.4.0" to your second command

#

just like the first one

lament karma
#

after the g++?

hard rapids
#

yes

lament karma
#

Okay

#

Thank you

#

It worked

#

That's how you do that

hard rapids
#

np 🙂 - in general you have to tell the compiler where the library you want to link to is. And thats how you do it

lament karma
#

I understand

#

!solved