0

I am trying to compile a .so file the relies on the FTDI library. I'm not sure how to include the library so that it compiles correctly. (Below is my best guess). Is this possible or is there another way to go about it?

shared: pldevice pldeviceenttecpro pluniverse $(CC) -shared -Wl,-soname,libplanklight.so -o libplanklight.so\ -L/usr/local/lib -lftd2xx \ pldevice.o pldeviceenttecpro.o pluniverse.o 

Edit: This is what the output is:

g++ -fPIC -c pldevice.cpp g++ -fPIC -c pldeviceenttecpro.cpp g++ -fPIC -c pluniverse.cpp g++ -shared -Wl,-soname,libplanklight.so -o libplanklight.so\ -L/usr/local/lib -lftd2xx \ pldevice.o pldeviceenttecpro.o pluniverse.o /usr/bin/x86_64-linux-gnu-ld: cannot open output file libplanklight.so-L/usr/local/lib: No such file or directory collect2: error: ld returned 1 exit status Makefile:5: recipe for target 'shared' failed make: *** [shared] Error 1 
3
  • 2
    What problems do you have? How does the command you show work or not work? Commented Sep 28, 2018 at 8:08
  • looks like you are simply missing a space before the first \ Commented Sep 28, 2018 at 8:11
  • If you look at the error message, it should be quite clear what the problem is. Add a space somewhere (like before the backslash). Commented Sep 28, 2018 at 8:13

1 Answer 1

4

You're missing a space.

 $(CC) -shared -Wl,-soname,libplanklight.so -o libplanklight.so \ ^^ Add a space here 

The \ just makes the command continue on the next line, so when you have

-o libplanklight.so\ -L/usr/local/lib 

It will be the same as -o libplanklight.so-L/usr/local/lib

But you want -o libplanklight.so -L/usr/local/lib

Sign up to request clarification or add additional context in comments.

1 Comment

Yep that was the issue, Thanks, I should have seen that

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.