Wednesday 15 August 2012

sdk - C++ - Linking Error Using AMD Source Library -


Hello DEEEST INTERNET,

So, I've downloaded Clam Fault Library.

I have also done further, (linking the compilers / system paths to the source files / libraries) Here they are following this fact:

  echo $ LIBRARY_PATH /usr/lib:/opt/clAmdFft-1.10.321/lib64:/usr/lib: echo $ C_INCLUDE_PATH include /opt/clAmdFft-1.10 .321 /: echo $ LD_LIBRARY_PATH /opt/clAmdFft-1.10.321/lib64 : /opt/klamdfft-lkl0k32l/lib32 / sterile / lib: / sterile / local / Kdaa / Lib64 / sterile / local / Kdaa /lib::/opt/klamdfft-lkl0k32l   

Here is one of the .cpp files that I would like to use this library:

  // AMD APPML FFT # include & lt; ClAmdFft.h & gt; // Includes "Clamdfft H" // #included in "IVE Triad in Too #" & lt; ClAmdFft & gt;   

And finally, this is my Chinese sweet makefile, (here nothing is complicated, I have done it like this before)

  # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # objects = L1.o L2.o L3.o sharedObjects = SL1.so Exec = SL1 GCC = GCC GPP = g ++ CFLAGS = I / usr / local / CUDA / include G LDFLAGS = L / usr / lib -lOpenCL # This is apparently addressing problems connecting w / clAmdFft & amp; NVIDIA drivers LDFLAGS + = -Wl, - the unresolved-symbols = ignore shared-libs SL1: $ (GPP) $ (CFLAGS) -o L1.o -c -std = c ++ 0x -fPIC main.cpp $ (GPP ) $ (CFLAGS) -o L2.o -c -fPIC L2.cpp $ (GPP) $ (CFLAGS) -o L3.o -c -fPIC L3.cpp $ (GPP) share $ (CFLAGS) -Wall are - o Why $ (SharedObjects) $ (objects) $ (GPP) $ (SharedObjects) -o $ (executive) G $ (LDFLAGS) .PHONY: clean: rm $ (objects) $ (SharedObjects) $ (executive), Dear Internet, Do I get the following error?  
  L3.cpp: 24: 22: Fatal error: clAmdFft h: Do not close any such file or directory compilation.   

I mean it sounds pretty straightforward. Normally after this site, along with Google's quick overview, I can not find a solid answer to why this is not working correctly. Hope you guys can help! Thank you.

As a comment, by adding the -i /opt/clAmdFft-1.10. 321 / to CFLAGS = -i / usr / local / kuda / included -g my preferred way of solving this particular problem is to compile the code with gcc , But G ++

How to use C_INCLUDE_PATH / code> and so on to you CPLUS_INCLUDE_PATH

Here's a compile-example (my xemacs session is created as test.cpp and test.h - test.cpp only #include is a simple defined that I Dry am).

  $ mkdir ../testing $ export C_INCLUDE_PATH = .. / test $ g ++ -Wall test.cpp test.cpp: 2: 21: fatal error: test.h: such a File or directory compilation is not finished. $ Export CPLUS_INCLUDE_PATH = .. / test $ g ++ -Wall test.cpp   

However, the full position to use makefile is that they define what you want from that place Has been included. Using the global environment variable will increase the likelihood of your project, depending on whether each user has configured their C_INCLUDE_PATH and CPLUS_INCLUDE_PATH on the system.

Similarly, if you are taking your machine from one project to another, if all the in-paths, etc. are in Mayfile, then you can only copy project files [and establish dependencies Of course, - although you can do the makefile even if you work it out] If you rely on CPLUS_INCLUDE_PATH and the choice, you also have your own .bashrc or whatever

(And I learned something new today, I It did not even know that exist in the environment variable).

No comments:

Post a Comment