Code Monkey home page Code Monkey logo

Comments (10)

Islam0mar avatar Islam0mar commented on June 16, 2024

Hi,

  • Append -I/your/path to *cxx-compiler-flags* --be careful about spaces-- .
  • Then Append -l... to *cxx-compiler-link-libs* --may use -L for files spread across the system--.

*cxx-compiler-flags* defaults to -std=c++17 -Wall -Wextra -I/usr/include/eigen3. see Flags Table for details.

Kindly feel free to ask for improvements.

from cl-cxx-jit.

tcyuan373 avatar tcyuan373 commented on June 16, 2024

Another issue is that, no matter how I update the ld linker for the system and cxx-compiler-link-libs and cxx-compiler-flags, it seems cxx-jit cannot find the corresponding libraries with -lmylib flag, I was wondering if this is the problem on my side or the problem with cxx-jit itself, would you mind helping me with this? Your help is greatly appreciated!

from cl-cxx-jit.

Islam0mar avatar Islam0mar commented on June 16, 2024

The error message would help,so kindly post it.

Assuming your lib is named libmylib.so, you have to add -L/path/to/dir as well as -lmylib. See -l and -L compiler flags for more info.

Or add your lib full path /path/to/libmylib.so as a flag.

from cl-cxx-jit.

tcyuan373 avatar tcyuan373 commented on June 16, 2024

That is exactly what I did, I added -L/path/to/mylib, and -lmylib, and update ld, then sudo ldconfig and also add /path/to/libmylib.so, so I had this question.

The error message would be:
/tmp/plugin.cpp:1:10: fatal error: mylib/foo.h: no such file or directory

from cl-cxx-jit.

tcyuan373 avatar tcyuan373 commented on June 16, 2024

The error message would help,so kindly post it.

Assuming your lib is named libmylib.so, you have to add -L/path/to/dir as well as -lmylib. See -l and -L compiler flags for more info.

Or add your lib full path /path/to/libmylib.so as a flag.

Sorry to bother again, did you have the chance to check this issue yet

from cl-cxx-jit.

Islam0mar avatar Islam0mar commented on June 16, 2024

/tmp/plugin.cpp:1:10: fatal error: mylib/foo.h: no such file or directory is an error for header file inclusion. -I

let the header file full path is /home/me/code/mylib/foo.h, you have to add -I/home/me/code to *cxx-compiler-flags*, so compiler would find #include "mylib/foo.h".

from cl-cxx-jit.

tcyuan373 avatar tcyuan373 commented on June 16, 2024

/tmp/plugin.cpp:1:10: fatal error: mylib/foo.h: no such file or directory is an error for header file inclusion. -I

let the header file full path is /home/me/code/mylib/foo.h, you have to add -I/home/me/code to *cxx-compiler-flags*, so compiler would find #include "mylib/foo.h".

That is exactly what I did, but the problem persist. Would you mind checking on your side, for a project installed using cmake, to be imported using cxx-jit

from cl-cxx-jit.

Islam0mar avatar Islam0mar commented on June 16, 2024

I need some context to reproduce, so kindly provide a complete command like the following:

CL-USER> (cxx-jit:from '("asd.h") 'import nil )

"/usr/bin/g++ -shared -fPIC -Wl,--no-undefined -Wl,--no-allow-shlib-undefined -std=c++17 -Wall -Wextra -I/usr/include/eigen3 /tmp/plugin.cpp -o /tmp/plugin.so -lm" 
"/tmp/plugin.cpp:1:10: fatal error: asd.h: No such file or directory" 
"    1 | #include \"asd.h\"" 
"      |          ^~~~~~~" 
"compilation terminated." 
NIL
CL-USER> 

Plus your project directory tree. minimal complete example would also help.

I have no issue using the lib.

from cl-cxx-jit.

tcyuan373 avatar tcyuan373 commented on June 16, 2024

I need some context to reproduce, so kindly provide a complete command like the following:

CL-USER> (cxx-jit:from '("asd.h") 'import nil )

"/usr/bin/g++ -shared -fPIC -Wl,--no-undefined -Wl,--no-allow-shlib-undefined -std=c++17 -Wall -Wextra -I/usr/include/eigen3 /tmp/plugin.cpp -o /tmp/plugin.so -lm" 
"/tmp/plugin.cpp:1:10: fatal error: asd.h: No such file or directory" 
"    1 | #include \"asd.h\"" 
"      |          ^~~~~~~" 
"compilation terminated." 
NIL
CL-USER> 

Plus your project directory tree. minimal complete example would also help.

I have no issue using the lib.

Do you mind if we discuss through email

from cl-cxx-jit.

Islam0mar avatar Islam0mar commented on June 16, 2024

Nope.

[email protected]

from cl-cxx-jit.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.