Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Running GCC through Visual studio

I have been writing an app that parses a Visual Studio 2010 solution and attempts to compile it using GCC.

As I built the app I have had it running in a standard console window and I have had no problems (provided you ignore my slight GCC incompatibilities ;)).

The problem comes that when I execute this application under Visual Studio it fires up fine but when it spawns the GCC child processes it reports:

cc1plus.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

This is very confusing as it works fine as a standalone console app. So has anyone idea what is going on? What is this "?" library? Why does it work under the console but not through VStudio?

I dump my PATH env var from inside the build app and it definitely includes my cygwin/bin directory. Does it get lost immediately after this? If I run the cygwin bash shell then /usr/bin is in the path.

So what gives? Has anyone got any ideas?

like image 324
Goz Avatar asked Jan 20 '11 19:01

Goz


2 Answers

I haven't tried this problem with visual studio and I am not sure if this solves your problem, but faced a similar issue when trying to compile a program with cygwin's gcc in windows with emacs. Siince cygwin's gcc.exe is not an executable, but a type of symlink to the actual executable (which is either gcc-3.exe or gcc-4.exe depending on what you have installed). In the BASH shell these symlinks are easily resolved, in cmd.exe they are not.

like image 116
Rozuur Avatar answered Sep 22 '22 05:09

Rozuur


Run SysInternals ProcMon and see what files are failing to load?

like image 42
Len Holgate Avatar answered Sep 23 '22 05:09

Len Holgate