Vijay Rajanna
Vijay Rajanna

Reputation: 665

How to Cross Compile using Eclipse C/C++ IDE?

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

Now I am trying to set up Eclipse C/C++ IDE on Windows to achieve the same. But I run into issues when I try to set Linker options.

Because on Linux, if I have to link a library libABCD.so.10.0.0 I just have to add ABCD in linker options, and create a symbolic link ABCD.so -> libABCD.so.10.0.0

Now, how do I solve the same issue on Windows, How can I create symbolic links on windows ? Directly specifying the absolute path of library didn't work as the compiler prefixes -l to library names (which can't be found). i

Upvotes: 4

Views: 2093

Answers (1)

Vijay Rajanna
Vijay Rajanna

Reputation: 665

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

> mklink

This functions exactly the same way as ln command on Linux to create symbolic links. So, if you have a library libABCD.so.10.0.0 and if you are linking to this through GCC cross compiler tool chain from an eclipse editor, you need to create the symbolic link.

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

> dir

libABCD.so

libABCD.so.10.0.0

Hence the linker successfully links to this library.

Upvotes: 1

Related Questions