How to compile using Eclipse C / C ++ IDE?

I install the Eclipse C / C ++ IDE on a Linux desktop to cross-compile programs on the Linux RT platform using the GCC cross-compiler.

Now I am trying to configure the Eclipse C / C ++ IDE on Windows to achieve the same. But I am having problems trying to set Linker parameters.

Because on Linux, if I need to link the library libABCD.so.10.0.0, I just need to add ABCDlinker options to the linker and create a symlinkABCD.so -> libABCD.so.10.0.0

Now, how to solve the same problem in Windows, How to create symbolic links on Windows? Directly specifying the absolute path of the library did not work, since the compiler prefixed -lthe names of the libraries (which could not be found). I am

+4
source share
1 answer

I found a solution to this problem. Symbolic links can be created in windows using the command

> mklink

This works just like the lnLinux command for creating symbolic links. So, if you have a library libABCD.so.10.0.0, and if you link to it through a whole chain of GCC compiler tools from the eclipse editor, you need to create a symbolic link.

> mklink / H libABCD.so libABCD.so.10.0.0

> dir

libABCD.so

libABCD.so.10.0.0

Therefore, the linker successfully binds to this library.

+1
source

Source: https://habr.com/ru/post/1545434/


All Articles