Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Illegal characters in path during linking #122

Closed
dk1301 opened this issue Apr 8, 2017 · 2 comments
Closed

Illegal characters in path during linking #122

dk1301 opened this issue Apr 8, 2017 · 2 comments

Comments

@dk1301
Copy link

dk1301 commented Apr 8, 2017

I entered the windows library path that contains the linux shared libraries either on VC++ directories or in the "Shared library search path" of the linker but when linking the following error occurs:

Illegal characters in path

Expected results:
Linker links the objects file correctly in order to create the executable file.

Actual results:
No executable .out file is created in the relevant Ubuntu project folder.

The build output window correlates the error with the following line

Ld Condition="'@(RemoteLink)' != ''"

of the file:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Application Type\Linux\1.0\Linux.Common.targets

VC++ 2015 and 2017
VirtualBox Ubuntu 16.04
gcc 6.2
gdbserver 7.11.1
Windows 7

@prgtrdr
Copy link

prgtrdr commented Apr 8, 2017

I had this same problem, and it took a while to figure out. Of course, it had nothing to do with having illegal characters in the path!

Here are 2 important things to check:

  1. Make sure you have specified all the libraries needed for your project in Configuration Properties->Linker->Input->Library Dependencies. For my project it is: boost_filesystem;boost_system;boost_iostreams;boost_program_options;boost_date_time;gomp

  2. Copy (using WinSCP, ftp, etc.) the entire /usr/include directory tree from your Ubuntu machine to a local directory, say, c:\Libraries\Linux\usr\include. Then specify the local directory as the first path in Configuration Properties-> VC++ Directories->General->Include Directories, for example, c:\Libraries\Linux\usr\include;C:\Libraries\Linux\usr\include\x86_64-linux-gnu;$(IncludePath);$(ISenseIncludePath)

These steps are necessary not only for proper compile/link but also for Intellisense to (mostly) work.

Let me know if htis helps.

@dk1301
Copy link
Author

dk1301 commented Apr 8, 2017

I missed point 1 with the explicit declaration of the libraries. Thanks a lot for your help.

@dk1301 dk1301 closed this as completed Apr 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants