Click here to Skip to main content
Click here to Skip to main content

Tool for Converting VC++2005 Project to Linux Makefile

By , 13 Jul 2012
 

Introduction

This tool automatically converts Visual C++ 8.0 or 9.0 projects to Linux makefile. Important note, there is no loss during the conversion: source code and .sln/.vcproj files are left unchanged. The tool has been implemented in C# VS 2005.

Why?

  • Your application is cross-platform based.
  • Now you are facing a decision to migrate from Visual C++ 6 to 8 or 9.

Both these reasons force you to create a makefile manually and each small change in your project requires hard physical labor in makefile maintenance.

This tool will do it for you automatically and will provide you with the ability to keep .sln/.vcproj and .mak files synchronized.

Using the Tool

The tool is a command line (console application).

There are three cases for tool use I covered in this article:

  1.  You have a .sln - solution that has one or more .vcproj (projects), among which one of them has the same name as the solution itself and is the main/leading project. This leading project should be a target project that will be compiled into .exe or .dll. Other projects in this solution are dependencies for the leading project. Makefiles will not be generated for those projects that do not have dependencies. Sub-projects can have additional dependencies on external precompiled libraries (libs), stdlib.
  2. You should not sign those dependencies explicitly for a tool; it will be parsed from .vcproj files.

    In this case, the usage:

    sln2mak [Solution_FullPath_File_Name].sln

    Example:

    sln2mak c:/myprojects/test/unit_test.sln
  3. The same case as 1, except that the leading project has a name that is different from the solution name. Flag –l for leading followed by leading project name and then solution fullpath.  
  4. In this case, the usage:

    sln2mak -l [LEADING_Project_Name] [Solution_FullPath_File_Name].sln

    Example:

    sln2mak -l unit_test c:/myprojects/test/test.sln
  5. You'd like to create a makefile from a list of projects without solution "wrapper". For example, you'd like to create a makefile with different structures, not like the one you have for WindowsOS.

    You have a main/leading project and other projects are dependencies of that.

    In addition, you have some precompiled libraries (libs) that you'd like to see them as dependencies for the leading project.  However, they are not listed in the main .vcproj. How can it be, you'll ask? For example, in some solution you have your leading project with all its sub-projects. One of those projects, that the leading project is dependent on, has a dependencies to some precompiled libraries and those are listed within its .vcproj file. So if you use the tool for the whole solution, those dependencies for linker will be parsed from this project and will be listed in its .mak file and then linked by linker to the main/leading project well. But now you'd like to compile only specific list of project that don’t involve  the dependent project, so you  are required to list those libs dependencies manually. Flag –d for dependencies followed by the list of those libs dependencies. 

    sln2mak [LEADING_Project_FullPath_Name].vcproj [Project_FullPath_Name_2].vcproj ... 
             [Project_FullPath_Name_n].vcproj -d [lib_Name_1] ... [lib_Name_n]

    Example:

    sln2mak c:/myprojects/tets/unit_test.vcproj c:/myprojects/tets/test_lib.vcproj 
        -d mystaticlib1 mystaticlib2 mystaticlib3 

    For usage, call sln2mak with no arguments.  

    After application runs, you'll find .mak file in path where .vcproj is located with the same name as the project.

    .mak files have all additional libraries path, sources, flags for compiler, linker, preprocessor and target path. 

In .sln path, you'll find Makefile that will handle all target rules (clean, make) and dependencies.

sln2mak/Makefile.JPG

Points of Interest

Parser Class

This class has a static constructor that aims to be known for all classes without instantiation.

It holds regular expression that serves all other classes for parsing .sln and .vcproj files.

Regex m_ProjectGuid      = new Regex(@"ProjectGUID=""\{(.*)\}"""        ) ;
Regex m_SlnExtention     = new Regex(@"(.*)(.[Ss][Ll][Nn])$"            ) ;
Regex m_VcprojExtention  = new Regex(@"(.*)(.[Vv][Cc][Pp][Rr][Oo][Jj])$") ;
Regex m_ProjectRegex     = new Regex(@"Project\(""\{(.*)\}""\) = ""(.*)"", ""(.*)"",
   ""\{(.*)\}""") ;

VcSlnInfo Class

This class parses solution file and creates Makefile with target rules.

This class uses stream reader for reading .sln file line by line. During reading .sln file, it recognizes an active project (its name is similar to the solution name) and creates four dictionaries that hold information about all main and dependent projects:

  • Key = Guid number , Value = ProjectName
  • Key = ProjectName , Value = ProjectFullPath
  • Key = ProjectName , Value = MakeFileName
  • Key = ProjectName , Value = ProjectDependencies
Dictionary<string, string>  m_ProjGuidName = new Dictionary<string, string>() ;

Then method ParseVcproj is called - public VcProjInfo class's function, but first for each .vcproj  instance of VcProjInfo object created with projectName, projectFullPath and projectMakFileName.

VcProjInfo Class

In this class, VCProjectEngine object is used for retrieving all the necessary information about .vcproj, like target type and name, compiler flags, additional libraries, linker flags, sources and filters, preprocessor definitions, configurations, etc.

using Microsoft.VisualStudio.VCProjectEngine;
VCProjectEngine vcprojEngine = new VCProjectEngineObject();
//Init VCProject vcProj object
VCProject m_VcProj = (VCProject)vcprojEngine.LoadProject(vcProjFile);

//Init vcproj configurations list 
IVCCollection m_ConfigCollection = (IVCCollection)m_VcProj.Configurations;

All these helped me to create .mak file with CFLAGS, LDFLAGS, OBJS, etc.

Important Notes

  • There is no loss during the conversion: source code stays unchanged.  
  • Probably I did not cover all flags during parsing from .vcproj to .mak, but now you have all necessary information to be able to add anything I've missed.
  • During my work I inspect that there are few differences between VC++ 8 solution/vcproj and VC++ 9, so you can use this tool for both.
  • If you convert this source code to Visual Studio 2008, please use proper Microsoft.VisualStudio.VCProjectEngine reference version 9.0.0.0 instead of 8.0.0.0.

History  

Prior to writing the application, I tried to find a similar tool on the internet, but was only successful in finding other people's questions on online forums regarding the issue.
Then I attempted to understand XML-schema of a VC++8 solution and project, but the schema wasn't clear enough.

Suddenly I found a Microsoft.VisualStudio.VCProjectEngine reference with VCProjectEngine object within .NET components which helped me to understand the structure of a VC++ 2005 project. I used this object in my application for .vcproj parsing instead of using System.Xml for XML tree reading, and this without proper XML schema documentation.

sln2mak/reference.JPG

Disclaimer 

The information provided on this page comes without any warranty whatsoever.  

This tool has been extensively tested before being published, but always there is the possibility to find some weakness. I strongly recommend that you back up your project before using this tool. Moreover, though I am willing to know if there is anything I can do in order to improve it, let me clearly say that it's not my fault if your project is corrupted by this tool.

Update History  

  • 20/4/2009 Bug fixes (sorry for long delay)
    • Added some spaces in dependencies
    • Removed a loop which was creating multiple rules for a single project
    • Added uppercase WIN32 to be replaced by uppercase LINUX
    • Removed -o option for CPP files
    • Removed printing of "else"
    • Full path for dependent project fixed.

    Especially thanks to Ahmad and Adrej, who helped me to find and fix all listed bugs.

  • 6/9/2008 Bug fixes
    • Uses sln2mak.exe from the same path as .sln/.vcproj.
  • 16/9/2008 Bug fixes 
    • Handles null reference for VC compiler tool, recursive file filters expanding during sources list creation

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Maria Adamsky
Software Developer EFC Real Solutions on Time,LTD
Israel Israel
Member
Software developer at EFC Real Solutions on Time,LTD(Israel) in infrastructure team.
Developing Grid computing application for data communication simulations.
Writing Cross-Platform Software (Windows and Linux).

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralRe: Good toolmemberMaria Adamsky4 Jan '10 - 1:00 
Thanks.
I did not understand your request about CMake files, since the purpose of this tool was to prevent new language learning.
Regards,
Maria.
 
There is nothing impossible.

GeneralRe: Good toolmemberP.Gopalakrishna4 Jan '10 - 17:00 
CMake is a cross platform build utility. Its easy to use and configurable on all platforms - all it needs is a list of files in the code.
 
I see that currently your application generates GCC or g++ based make files, which is not a "platform compatible option" really. For example, I might just want to use the make files for MSVC itself. Or use mingw32 on different platform or Qt...
 
Also, there is a bug in the output.Please check the below
.PHONY: ConsoleTestApp
ConsoleTestApp: MusicNoteLib
	cd  $(MAKE) -f ConsoleTestApp.mak
Empty "cd" command and it turns out in the code the path computation is not working correctly. I changed the code and it started to generate "hard coded" path such as c:/path/to/makefile. For example,
.PHONY: ConsoleTestApp
ConsoleTestApp: MusicNoteLib
	cd c:/path/to/makefile/ $(MAKE) -f ConsoleTestApp.mak
A more good option is to generate relative path. Such as..
 
.PHONY: ConsoleTestApp
ConsoleTestApp: MusicNoteLib
	cd ../ $(MAKE) -f ConsoleTestApp.mak
 
This is more portable.
 
CMake addresses all these problems and very elegantly too. Dependencies are handled very neat.
 
http://www.cmake.org/[^] Create CMake files is also just easy. Hope you got my meaning.
 
Thank you,
Gopalakrishna
Creator of CFugue
GeneralRe: Good toolmemberMaria Adamsky4 Jan '10 - 20:55 
1) I know what CMake is, also i know that CMake does not require only files list, also some CMake scripts creation and its internal language knowledge. If you just want to talk about CMake advantages it's not the place, since:
My tool were created especially for those users who use Windows-Linux cross-platform and do not skilled enough with LINUX makefile creation and/or someone who'd like to save its time and avoid manual LINUX makefile creation.
I have discussed this issue in my previous messages on this forum, you are welcome to read it there as well.
Moreover, if you are not one of those users i described above, you don't have to use my tool, it's too easySmile | :) My tool has its own target audience, i will excuse you if you are not within it.
 
2) It's not a bug, please read an usage.
 
Regards,
Maria.
 
There is nothing impossible.

GeneralRe: Good toolmemberP.Gopalakrishna5 Jan '10 - 1:24 
Hmmm.... What an arrogance !! All that I was asking is if you could make your application output CMake files also. You can say no if you do not want to. No need to defend it too much. As for the bugs:
if (!(m_ProjMakFilePath[m_MainProjectName].Equals("")))
{
    Int32 stripStart = Path.GetDirectoryName(m_SlnFullPath).Length + 1;
    Int32 stripLength = m_ProjMakFilePath[projectName].Length - stripStart - 4 - projectName.Length;
    String projMakFilePath = m_ProjMakFilePath[m_MainProjectName].Substring(stripStart, stripLength);
    m_MakefileWriter.WriteLine("\tcd {0} && $(MAKE) -f {1} {2}", projMakFilePath, m_MainProjectName + ".mak", ruleString);
}
Pray tell us if you believe the above code is bug free. If you think it is, then let me know what the below one will do:
if (!(m_ProjMakFilePath[projectName].Equals("")))
{
    Int32 stripStart = Path.GetDirectoryName(m_SlnFullPath).Length + 1;
    Int32 stripLength = m_ProjMakFilePath[projectName].Length - stripStart - 4 - projectName.Length;
    String projMakFilePath = m_ProjMakFilePath[projectName].Substring(0, stripStart);//, stripLength);
    m_MakefileWriter.WriteLine("\tcd {0} && $(MAKE) -f {1}", projMakFilePath, projectName + ".mak");
}
m_MakefileWriter.WriteLine();
Your code produced the below output. Do you see the empty "cd" command? What kind of usage you want me to read to correct it??? Don't tell me its by design now !!
	cd $(MAKE) -f ConsoleTestApp.mak
 
And how about the below error while running your application? I am not the only one who got it - Some one else also reported it !! Any idea why you got that error ??
Unhandled Exception: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {FBBF3C66-2428-11D7-8BF6-00B0D03DAA06} failed due to the following error: 80040154.
at sln2mak.VcProjInfo..ctor(String vcProjFile, String outFile, String[] projDependencies)
at sln2mak.VcSlnInfo.iSendToParseVcprojFiles()
at sln2mak.VcSlnInfo.GenerateMakefile(Boolean parseVcproj)
at sln2mak.VcSlnInfo.GenerateMakefile()
at sln2mak.Parser.ParseSln(String projName, String slnFName)
at sln2mak.Program.Main(String[] args)
 
And who ever said that Linux people only use gcc or g++ ??
 
We are trying to help you improve your application, Maria. We are not here to fight with you. No need to say "don't use my tool if you don't want to". That's not the right attitude. If you don't want any one to use your tool, why did you put it in public site? You say you want only someone to use your tool and not others, then I say - let me help you make the tool acceptable for everyone by proposing more correct architecture and additional features. If you cannot implement the features, thats fine. But if you cannot accept the criticism itself, then you should not come into public.
 
Defending your application, does not make it correct. Accepting the feedback and trying to address it will make it correct.
 
I wanted to use your tool - but your tool did not work for me because of the above bugs !! I have absolutely no need to take time to write all this for you - but I am doing it wasting my time - do you know the reason? A simple hope that one day you might learn to accept the failures and address them correctly.
 
Good day.
 
Gopalakrishna
Creator of CFugue
GeneralRe: Good toolmemberSharjith23 Feb '10 - 13:23 
Hi Gopalakrishna, as you pointed out this application is not working at all. However this led me to your application -- CFuge. Wonderful Guru!!! Simple yet cool application. I wonder why you say that it is in Alpha stage yet! This is not the right forum to comment I know, but couldn't resist, its that good.
 
And Maria, what Gopalkrishna commented is very much true. I have seen your profile on linked-in. You are a professional and you must show professionalism especially when you are making yourself visible to the world. The effort behind the application is appreciable. We need such applications for the open source community. I wish it worked well and you responded positively to the shortcomings reported by its users. No hard feelings intended, only a friendly advice...
RegardsSmile | :)
N. Sharjith

GeneralRe: Good toolmemberP.Gopalakrishna23 Feb '10 - 15:20 
Glad to hear that you found CFugue to be good, Sharjith. Unfortunately, I cannot still mark it is as full release or at least beta - since much of the work is still in progress. I understand the initial release with few features (such as notes, chords and durations etc.) is working correctly - but there is some platform dependent code that need be fixed and there are few API interface changes that need be improved.
 
The idea was to make the release 1.0 available simultaneously on all platforms at the same time. But then may be you are right - may be I can try to be "less ambitious", so to say, and try to spread the design goals across multiple releases instead of one single "big bang" release. Let me see what I can do.
 
Thanks for your inputs though. Appreciate it.
 
Thank you,
Gopalakrishna Palem
http://gpalem.web.officelive.com/CFugue.html
GeneralRe: Good toolmemberamol987625 Oct '10 - 4:03 
hi, If possible please let know how did you resolve the above COMException error.
GeneralRe: Good toolmemberP.Gopalakrishna25 Oct '10 - 20:02 
If you are running on 64-bit machine, you might hit this.
 
Try building the project with x86 target and see if it resolves.
 
Gopalakrishna Palem
Creator of CFugue Runtime
QuestionWould this work for VS 2003 projects?memberboilers110 Dec '09 - 4:39 
Would this work for VS 2003 projects?
AnswerRe: Would this work for VS 2003 projects?memberMaria Adamsky11 Dec '09 - 20:05 
You should try. I did not test it in VS2003. If .sln and .vcproj in VS2003 have the similar xml-scheme, it should work with proper reference.
 
There is nothing impossible.

GeneralMy vote of 1memberxComaWhitex6 Nov '09 - 21:11 
Why not just use CMake which does all the work for you. CMake is a cross OS build system
GeneralRe: My vote of 1memberIndivara23 Mar '10 - 16:52 
Can CMake convert a VC++ project to a makefile?
GeneralRe: My vote of 1memberxComaWhitex27 Jul '10 - 19:58 
You make a base layout of CMake. Then you run it from the cmd.exe/bash/terminal for the IDE you use. It will spit it out and you load it in the IDE. If you make a change in the CMakeLists.txt in the IDE. It will update and you don't have to do it anymore.
 
You cannot convert a Visual Studio project to a CMake. But you can do it from CMake to Visual Studio.
GeneralRe: My vote of 1memberIndivara27 Jul '10 - 20:14 
Actually I am aware of what CMake can do. This article tells you how to convert a Visual C++ project to a Linux makefile, and presumably it does what it is supposed to do. Why do you vote it down? Say you have a dozen VC++ projects, would you rewrite all of them in CMake, just to convert them to makefiles?
 
Even if CMake could do the same, this would be another way to skin a cat...

GeneralRe: My vote of 1memberxComaWhitex27 Jul '10 - 20:29 
Well tbh it's not that hard to actually rewrite a project in to CMake. Why don't you make it to where it converts it to a CMake project instead of a makefile? By converting it to a CMake project it's much easier for the end user to convert it to whatever project. And by converting it to a makefile itself would still be limiting tbh.
GeneralRe: My vote of 1memberIndivara27 Jul '10 - 21:50 
Yes, you are right about all that, I'm merely pointing out that it doesn't make this article worthless

GeneralRe: My vote of 1memberxComaWhitex27 Jul '10 - 21:52 
Fine I'll make it a 3. Happy now?
GeneralRe: My vote of 1memberIndivara27 Jul '10 - 22:39 
Thumbs Up | :thumbsup:
 
Peace!

QuestionWhy does it not see the static library included in the solution?memberphantom2220227 Oct '09 - 7:36 
Hi,
 
I am trying to use this translation tool and it will not compile the make file (using cygwin-x). I have a solution file called SandBox.sln and my main project is called SandBox.vcproj (vs 2008). I have a Display project in the solution which is a static library and SandBox.vcproj has it as a dependency. When I run your tool on the solution file, I do a main Makefile and two other .mak files. However I get an error stating that SandBox.cpp (main() function) does not know about the DisplayData class. This looks to be a linking error and I am not sure why this is not working. Any help would be greatly appreciated.
 
Thanks,
Brian
AnswerRe: Why does it not see the static library included in the solution?memberMaria Adamsky27 Oct '09 - 23:27 
1. What command line do you use for tool execution to convert .sln to mak.
2. Try to see if the makefile was created properly, maybe some manual fixes required in makefile itself, i do it sometime by using csh language(grep,sed and etc.)
 
There is nothing impossible.

GeneralRe: Why does it not see the static library included in the solution?memberphantom2220229 Oct '09 - 4:18 
1) I was using "sln2mak c:\SandBox.sln
2) I included the 3 make files below. The Display.mak is the static library and when it tries to link it seems like it does not know about the Display class at all.
 
Thanks.
 
MakeFile:
 
# Makefile - SandBox
 
.PHONY: all
all: \
Display \
SandBox
 

.PHONY: SandBox
SandBox: Display
cd SandBox/ && $(MAKE) -f SandBox.mak
 
.PHONY: Display
Display:
cd Display/ && $(MAKE) -f Display.mak
 
.PHONY: clean
clean:
cd SandBox/ && $(MAKE) -f SandBox.mak clean
cd Display/ && $(MAKE) -f Display.mak clean
 
.PHONY: depends
depends:
cd SandBox/ && $(MAKE) -f SandBox.mak depends
cd Display/ && $(MAKE) -f Display.mak depends

 
SandBox.mak:
# Makefile - SandBox
 
ifndef CFG
CFG=Debug
endif
CC=gcc
CFLAGS=-m32 -fpic
CXX=g++
CXXFLAGS=$(CFLAGS)
ifeq "$(CFG)" "Debug"
CFLAGS+= -W -O0 -fexceptions -g -fno-inline -D_DEBUG -D_CONSOLE -I C:/Data_Files/Projects/SandBox/Display/
LD=$(CXX) $(CXXFLAGS)
LDFLAGS=
LDFLAGS+=
LIBS+=-lstdc++ -lm
ifndef TARGET
TARGET=SandBox.exe
endif
ifeq "$(CFG)" "Release"
CFLAGS+= -W -O2 -fexceptions -g -fno-inline -DNDEBUG -D_CONSOLE
LD=$(CXX) $(CXXFLAGS)
LDFLAGS=
LDFLAGS+=
LIBS+=-lstdc++ -lm
ifndef TARGET
TARGET=SandBox.exe
endif
endif
endif
ifndef TARGET
TARGET=SandBox.exe
endif
.PHONY: all
all: $(TARGET)
 
%.o: %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
 
%.o: %.cc
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
 
%.o: %.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
 
%.o: %.cxx
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
 
%.res: %.rc
$(RC) $(CPPFLAGS) -o $@ -i $<
 
SOURCE_FILES= \
./SandBox.cpp
 
HEADER_FILES= \
./targetver.h
 
RESOURCE_FILES= \
 
SRCS=$(SOURCE_FILES) $(HEADER_FILES) $(RESOURCE_FILES)
 
OBJS=$(patsubst %.rc,%.res,$(patsubst %.cxx,%.o,$(patsubst %.cpp,%.o,$(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(filter %.c %.cc %.cpp %.cxx %.rc,$(SRCS)))))))
 
$(TARGET): $(OBJS)
$(LD) $(LDFLAGS) -o $@ $(OBJS) $(LIBS)
 
.PHONY: clean
clean:
-rm -f -v $(OBJS) $(TARGET) SandBox.dep
 
.PHONY: depends
depends:
-$(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM $(filter %.c %.cc %.cpp %.cxx,$(SRCS)) > SandBox.dep
 
-include SandBox.dep
 

 
Display.mak (Static LIbrary)
# Makefile - Display
 
ifndef CFG
CFG=Debug
endif
CC=gcc
CFLAGS=-m32 -fpic
CXX=g++
CXXFLAGS=$(CFLAGS)
ifeq "$(CFG)" "Debug"
CFLAGS+= -W -O0 -fexceptions -g -fno-inline -D_DEBUG -D_LIB
AR=ar
ARFLAGS=rus
ifndef TARGET
TARGET=libDisplay.a
endif
ifeq "$(CFG)" "Release"
CFLAGS+= -W -O2 -fexceptions -g -fno-inline -DNDEBUG -D_LIB
AR=ar
ARFLAGS=rus
ifndef TARGET
TARGET=libDisplay.a
endif
endif
endif
ifndef TARGET
TARGET=libDisplay.a
endif
.PHONY: all
all: $(TARGET)
 
%.o: %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ -c $<
 
%.o: %.cc
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
 
%.o: %.cpp
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
 
%.o: %.cxx
$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $<
 
%.res: %.rc
$(RC) $(CPPFLAGS) -o $@ -i $<
 
SOURCE_FILES= \
./DisplayData.cpp
 
HEADER_FILES= \
./DisplayData.h
 
RESOURCE_FILES= \
 
SRCS=$(SOURCE_FILES) $(HEADER_FILES) $(RESOURCE_FILES)
 
OBJS=$(patsubst %.rc,%.res,$(patsubst %.cxx,%.o,$(patsubst %.cpp,%.o,$(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(filter %.c %.cc %.cpp %.cxx %.rc,$(SRCS)))))))
 
$(TARGET): $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
 
.PHONY: clean
clean:
-rm -f -v $(OBJS) $(TARGET) Display.dep
 
.PHONY: depends
depends:
-$(CXX) $(CXXFLAGS) $(CPPFLAGS) -MM $(filter %.c %.cc %.cpp %.cxx,$(SRCS)) > Display.dep
 
-include Display.dep
 

GeneralRe: Why does it not see the static library included in the solution?memberMaria Adamsky29 Oct '09 - 9:55 
Your SandBox.mak has a wrong not complete 'LIBS+=-lstdc++ -lm' line.
It should be LIBS+=-lstdc++ -lm -lDisplay.
You should add this additional lib or manually into your generated .mak file, or into additional libraries in your SandBox.vcproj.
I hope i helped you.
 
There is nothing impossible.

GeneralRe: Why does it not see the static library included in the solution?memberphantom2220229 Oct '09 - 5:24 
I discovered that if I manually copy the DisplayData.o file into the directory where the main project file is (SandBox.o), then it compiles and runs. Is there supposed to be some code to copy all object files into a specific directory or is this supposed to be a manual step? DisplayData.o is a statically linked library.
 
Thanks,
Brian
GeneralRe: Why does it not see the static library included in the solution?memberMaria Adamsky29 Oct '09 - 9:59 
See my answer above.
My tool does not copy any object and makefile does not too. Since your additional library was not linked statically compiler/linker did not know where to find the relevant class/object. By default it tries to search it at the same path as main object. Otherwise, you should sign properly static link to additional static library.
 
There is nothing impossible.

GeneralUnhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginemembernoobody27 Oct '09 - 5:03 
c:\>sln2mak.exe test.vcproj
sln2mak.exe - Generates a Makefile from a .sln/.vcproj file .
 c Maria Adamsky (www.EFC.CO.IL)
 

Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualStudio.VCProjectEngine,
 Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the fil
e specified.
File name: 'Microsoft.VisualStudio.VCProjectEngine, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at sln2mak.VcProjInfo..ctor(String vcProjFile, String outFile, String[] projDependencies)
   at sln2mak.Program.Main(String[] args)
 
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberMaria Adamsky7 Oct '09 - 11:31 
If you convert this source code to Visual Studio 2008, please use proper Microsoft.VisualStudio.VCProjectEngine reference version 9.0.0.0 instead of 8.0.0.0.
 
There is nothing impossible.

GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberuepelde26 Oct '09 - 23:07 
I have just the same message but I don't know how I can handle it. Could you please help me? My project version is 9.0 and I want to convert it into a Makefile. Thanks.
GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberMaria Adamsky26 Oct '09 - 23:12 
See my answer above in this thread.
 
There is nothing impossible.

QuestionRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberuepelde27 Oct '09 - 1:27 
I am sorry but I am a little bit new in Visual Studio Environment.
When I open the source you provide the project is not able to find Microsoft.VisualStudio.VCProjectEngine. I try to find VCProjectEngine.dll, but it doesn't exist either.
So, how could I compile the source code?
AnswerRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberMaria Adamsky27 Oct '09 - 3:11 
If you convert this source code to Visual Studio 2008, please use proper Microsoft.VisualStudio.VCProjectEngine reference version 9.0.0.0 instead of 8.0.0.0.
It means, if you trying to compile my sources in VS2008, replace reference with newer one. It should be within Microsoft Visual Studio Components. If your studio does not has one, the installation was not completed, try to search in msdn forums .
 
There is nothing impossible.

GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberuepelde27 Oct '09 - 5:50 
Hello Maria,
I finally compiled the source but I still have one unhandled Exception (System.ArgumentException): The path does not have a valid format.
in System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
in System.IO.Path.NormalizePath(String path, Boolean fullCheck)
in System.IO.Path.GetDirectoryName(String path)
in sln2mak.VcSlnInfo.iPrintTargetRules() en C:\temp\sln2mak\sln2mak\VcSlnInfo
.cs:line 271
in sln2mak.VcSlnInfo.GenerateMakefile(Boolean parseVcproj) en C:\temp\sln2mak
\sln2mak\VcSlnInfo.cs:line 436
in sln2mak.Parser.CreateMakefile(List`1 projectsList, String[] mainProjectDep
endencies) en C:\temp\sln2mak\sln2mak\Parser.cs:line 2
in sln2mak.Program.Main(String[] args) en C:\temp\sln2mak\sln2mak\Program.cs:
line 115
 
Thanks a lot for you help. It's very useful.
GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberMaria Adamsky27 Oct '09 - 23:37 
Can you post here your command line/arguments that you pass to the tool?
 
There is nothing impossible.

GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberuepelde28 Oct '09 - 1:06 
C:\temp\sln2mak\sln2mak\bin\Debug>sln2mak.exe example_xxx.vcproj
sln2mak.exe - Generates a Makefile from a .sln/.vcproj file .
© Maria Adamsky (www.EFC.CO.IL)
 
Going to read project file 'example_xxx.vcproj'
aiming to write result to file 'example_igct.mak'
With no dependencies.
 
Creating file example_xxx.mak...
 
Excepción no controlada: System.ArgumentException: La ruta de acceso no tiene un
formato válido.
en System.IO.Path.NormalizePathFast(String path, Boolean fullCheck)
en System.IO.Path.NormalizePath(String path, Boolean fullCheck)
en System.IO.Path.GetDirectoryName(String path)
en sln2mak.VcSlnInfo.iPrintTargetRules() en C:\temp\sln2mak\sln2mak\VcSlnInfo
.cs:línea 271
en sln2mak.VcSlnInfo.GenerateMakefile(Boolean parseVcproj) en C:\temp\sln2mak
\sln2mak\VcSlnInfo.cs:línea 436
en sln2mak.Parser.CreateMakefile(List`1 projectsList, String[] mainProjectDep
endencies) en C:\temp\sln2mak\sln2mak\Parser.cs:línea 92
en sln2mak.Program.Main(String[] args) en C:\temp\sln2mak\sln2mak\Program.cs:
línea 115
 
Thanks a lot.
GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberMaria Adamsky28 Oct '09 - 1:16 
Does example_xxx.vcproj and all its project placed in C:\temp\sln2mak\sln2mak\bin\Debug?
You should execute it this way:
C:\temp\sln2mak\sln2mak\bin\Debug\sln2mak.exe FULL_PROJECT_PATH\example_xxx.vcproj
 
There is nothing impossible.

GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEngine [modified]memberuepelde28 Oct '09 - 1:42 
Yes, at the beginning I put them there. After reading your post I put the full path and it doesn't work either. But maybe the problem is that the source and the files VS2008 generates (.vcproj and so on) are in separated folders. Doest this make sense to you? Should I place them together?
 
Thank you very much.
 
modified on Wednesday, October 28, 2009 7:56 AM

GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberMaria Adamsky28 Oct '09 - 2:35 
your .vcproj should stay at the same place where VS2008 generated it, because my tool parses all its dependencies and .cpp/.h files pathes from .vcproj itself.
Example:
your .vcproj has info that its original path is C:\MyProject\ and all sources are there.
Now you replace your.vcproj into C:\temp\sln2mak\sln2mak\bin\Debug\
My tool will genereate the path for dependencies by concatenation of two pathes:
C:\temp\sln2mak\sln2mak\bin\Debug\C:\MyProject\
And as you can see it's a wrong path.
 
So, if your project is in:C:\MyProject\
And sln2mak in C:\temp\sln2mak\sln2mak\bin\Debug\
Use command:
C:\temp\sln2mak\sln2mak\bin\Debug\sln2mak.exe C:\MyProject\example_xxx.vcproj
If you still have a problem, try to find me at skype and i'll try to help you online:
maria.adamsky@gmail.com
 
There is nothing impossible.

GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberuepelde28 Oct '09 - 5:11 
I am trying to contact you by Skype but I can't find you.
I still have the same problem, even if I change the paths. The code is not mine, so I don't know where the developer wrote the code.
Do you have any suggestion? Thank you.
Best regards
GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberMaria Adamsky28 Oct '09 - 9:51 
Pardon, my skype acount is: mashka-a@013.net
 
There is nothing impossible.

GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberuepelde29 Oct '09 - 1:01 
I sent a message to you in Skype. Could we talk a little bit please? Thanks.
GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberMaria Adamsky27 Nov '09 - 7:33 
I hope after our long mail story Smile | :) you finally use this tool joyfully?Smile | :)
 
There is nothing impossible.

GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberuepelde10 Dec '09 - 3:05 
Yes!! I used it!! So thank you very much for your help!! Smile | :)
GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberframckyinuk14 Jul '10 - 5:21 
Hello,
 
I am facing the same problem.
Could you (Maria or uepelde) post the solution that yuo have found?
 
Thanks,
Franck.
GeneralRe: Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly Microsoft.VisualStudio.VCProjectEnginememberMaria Adamsky14 Jul '10 - 20:42 
The solution is right usage of tool, i mean right path to project that you provide to sln2mak.exe.
There is nothing impossible.

Question[VS2008] System.IO.IOException unhandledmemberDaniele Barzotti16 Sep '09 - 21:36 
Hi,
 
I run sln2mak on my project but I get an unhandled exception.
My project is composed by many thirdparty libs which, in turn, dependents one each other.
 
MY_PROJECT
 |
 |- MSVC
 |   |- MyProject.sln
 |
 |-- Thirdparty
        |- Lib1
        |   |- Lib1.vcprj
        |- Lib2
        |   |- Lib2.vcprj
 
and so on.
I get the error in VcProjInfo.cs at line 31:
  Console.WriteLine("Going to read project file '{0}'", vcProjFile);
 
where vcProjFile is:
"G:/src/Eurocom/AudioLib_4/projects/MSVC/../../thirdparty/liboggz/win32/VS2008/liboggz/liboggz_static.vcproj"
 
I'm sorry but I'm not an expert in c#
 

The error details is:
 
System.IO.IOException was unhandled
Message="Handle not valid.\r\n"
Source="mscorlib"
StackTrace:
in System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
in System.IO.__ConsoleStream.Write(Byte[] buffer, Int32 offset, Int32 count)
in System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
in System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
in System.IO.TextWriter.WriteLine(String value)
in System.IO.TextWriter.WriteLine(String format, Object arg0)
in System.IO.TextWriter.SyncTextWriter.WriteLine(String format, Object arg0)
in System.Console.WriteLine(String format, Object arg0)
in sln2mak.VcProjInfo..ctor(String vcProjFile, String outFile, String[] projDependencies) in C:\TOOLS\sln2mak\sln2mak\sln2mak\VcProjInfo.cs:riga 31
in sln2mak.VcSlnInfo.iSendToParseVcprojFiles() in C:\TOOLS\sln2mak\sln2mak\sln2mak\VcSlnInfo.cs:riga 404
in sln2mak.VcSlnInfo.GenerateMakefile(Boolean parseVcproj) in C:\TOOLS\sln2mak\sln2mak\sln2mak\VcSlnInfo.cs:riga 442
in sln2mak.VcSlnInfo.GenerateMakefile() in C:\TOOLS\sln2mak\sln2mak\sln2mak\VcSlnInfo.cs:riga 427
in sln2mak.Parser.ParseSln(String projName, String slnFName) in C:\Documents and Settings\daniele.barzotti\Desktop\TOOLS\sln2mak\sln2mak\sln2mak\Parser.cs:riga 108
in sln2mak.Program.Main(String[] args) in C:\TOOLS\sln2mak\sln2mak\sln2mak\Program.cs:riga 63
in System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
in System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
in Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
in System.Threading.ThreadHelper.ThreadStart_Context(Object state)
in System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
in System.Threading.ThreadHelper.ThreadStart()
InnerException:
AnswerRe: [VS2008] System.IO.IOException unhandledmemberMaria Adamsky17 Sep '09 - 3:13 
1. The tree you've mentioned above is file system tree for your project?
2. Where is main .vsproj placed?
3. Your case seems like case 3 for command line describe in article, please show me your command line.
Thanks you.
 
There is nothing impossible.

GeneralRe: [VS2008] System.IO.IOException unhandledmemberDaniele Barzotti17 Sep '09 - 22:18 
Dear Maria,
 
thanks for your reply.
I'm surely that the tool working well but I miss something!
 
My filesystem is someting like this:
Main_Folder
  |- include
  |- projects
  |     |- MSVC
  |     |    |- MyProjectMain.sln
  |     |    |- MyProjectMain.vcproj
  |- src
  |- thirdparty
  |      |- lib1
  |      |   |- lib1.vcproj
  |      |- lib2
  |      |   |- lib2.vcproj
  |      |- lib3
  |      |   |-win32
  |      |   |   |-lib3.vcproj
This is a part of my solution file:

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioLib4", "AudioLib4.vcproj", "{E4A2DF52-7DE1-40BD-BF08-CEA0B73EF743}"
	ProjectSection(ProjectDependencies) = postProject
		{3A214E06-B95E-4D61-A291-1F8DF2EC10FD} = {3A214E06-B95E-4D61-A291-1F8DF2EC10FD}
		{354F890E-4CE8-4550-8796-E47C5FDC2E40} = {354F890E-4CE8-4550-8796-E47C5FDC2E40}
		{92EE813D-F197-4119-A573-9FB9466E4C1B} = {92EE813D-F197-4119-A573-9FB9466E4C1B}
		{B8BD6143-BA5B-47DF-B9BB-991F5F6736A6} = {B8BD6143-BA5B-47DF-B9BB-991F5F6736A6}
		{98C525E8-8F4F-4A6E-A860-0ABFAE03B02F} = {98C525E8-8F4F-4A6E-A860-0ABFAE03B02F}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jthread", "..\..\thirdparty\jthread\jthread.vcproj", "{96A714AE-BE53-4EFF-8569-C3809AD4F3B6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jrtplib", "..\..\thirdparty\jrtplib\jrtplib.vcproj", "{B8BD6143-BA5B-47DF-B9BB-991F5F6736A6}"
	ProjectSection(ProjectDependencies) = postProject
		{96A714AE-BE53-4EFF-8569-C3809AD4F3B6} = {96A714AE-BE53-4EFF-8569-C3809AD4F3B6}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AudioLibTest", "..\..\tests\projects\MSVC\AudioLibTest.vcproj", "{FF4C74C0-7B0E-407E-81FE-812DA056F8B5}"
	ProjectSection(ProjectDependencies) = postProject
		{E4A2DF52-7DE1-40BD-BF08-CEA0B73EF743} = {E4A2DF52-7DE1-40BD-BF08-CEA0B73EF743}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RtAudio", "..\..\thirdparty\rtaudio\projects\win32\VS2008\RtAudio.vcproj", "{354F890E-4CE8-4550-8796-E47C5FDC2E40}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libspeex", "..\..\thirdparty\speex\win32\VS2008\libspeex\libspeex.vcproj", "{E972C52F-9E85-4D65-B19C-031E511E9DB4}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libvorbis_static", "..\..\thirdparty\libvorbis\win32\VS2008\libvorbis\libvorbis_static.vcproj", "{3A214E06-B95E-4D61-A291-1F8DF2EC10FD}"
	ProjectSection(ProjectDependencies) = postProject
		{15CBFEFF-7965-41F5-B4E2-21E8795C9159} = {15CBFEFF-7965-41F5-B4E2-21E8795C9159}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liboggz_static", "..\..\thirdparty\liboggz\win32\VS2005\liboggz\liboggz_static.vcproj", "{92EE813D-F197-4119-A573-9FB9466E4C1B}"
	ProjectSection(ProjectDependencies) = postProject
		{15CBFEFF-7965-41F5-B4E2-21E8795C9159} = {15CBFEFF-7965-41F5-B4E2-21E8795C9159}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libogg_static", "..\..\thirdparty\libogg\win32\VS2008\libogg_static.vcproj", "{15CBFEFF-7965-41F5-B4E2-21E8795C9159}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libfishsound_static", "..\..\thirdparty\libfishsound\win32\libfishsound\libfishsound_static.vcproj", "{98C525E8-8F4F-4A6E-A860-0ABFAE03B02F}"
	ProjectSection(ProjectDependencies) = postProject
		{3A214E06-B95E-4D61-A291-1F8DF2EC10FD} = {3A214E06-B95E-4D61-A291-1F8DF2EC10FD}
		{E972C52F-9E85-4D65-B19C-031E511E9DB4} = {E972C52F-9E85-4D65-B19C-031E511E9DB4}
		{15CBFEFF-7965-41F5-B4E2-21E8795C9159} = {15CBFEFF-7965-41F5-B4E2-21E8795C9159}
	EndProjectSection
EndProject

So I have to pass all project full paths?
 
Thanks a lot for your support and sorry if it is my fault!
Daniele.
 
Free As in Freedom
GeneralRe: [VS2008] System.IO.IOException unhandledmemberMaria Adamsky17 Sep '09 - 22:42 
Hi,
Better you pass all project full path, since relative pass to the main project is not the same as relative path according to sln2mak.exe.
I can't understand if thirdparty libs already compiled libs or also .vcproj?
Please, answer me this question and show you command line you use for sln2mak execution.
BR,
Maria.
 
There is nothing impossible.

GeneralRe: [VS2008] System.IO.IOException unhandledmemberDaniele Barzotti17 Sep '09 - 23:36 
Hi,
 
maybe I misunderstood somethings...
Thirdparty libs are part of the solution and have their .vcproj
The main project depends on these libs.
Also some of these libs depends each others.
 
I try this command (all on one line):
sln2mak G:\src\Eurocom\AudioLib_4\projects\MSVC\Audiolib4.vcproj /
G:\src\Eurocom\AudioLib_4\tests\projects\MSVC\AudioLibTest.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\jthread\jthread.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\jrtplib\jrtplib.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\rtaudio\projects\win32\VS2008\RtAudio.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\speex\win32\VS2008\libspeex\libspeex.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\libvorbis\win32\VS2008\libvorbis\libvorbis_static.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\liboggz\win32\VS2005\liboggz\liboggz_static.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\libogg\win32\VS2008\libogg_static.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\libfishsound\win32\libfishsound\libfishsound_static.vcproj /
-d dsound.lib ws2_32.lib libsndfile-1.lib libfishsound_static.lib RtAudio.lib liboggz_static.lib
this is the output:
sln2mak.exe - Generates a Makefile from a .sln/.vcproj file .
 ¸ Maria Adamsky (www.EFC.CO.IL)
 
Going to read project file 'G:\src\Eurocom\AudioLib_4\projects\MSVC\Audiolib4.vcproj'
aiming to write result to file 'G:\src\Eurocom\AudioLib_4\projects\MSVC\Audiolib4.mak'
With dependencies:
	dsound.lib
	ws2_32.lib
	libsndfile-1.lib
	libfishsound_static.lib
	RtAudio.lib
	liboggz_static.lib
 
Creating file G:\src\Eurocom\AudioLib_4\projects\MSVC\Audiolib4.mak...
Going to read project file 'G:\src\Eurocom\AudioLib_4\tests\projects\MSVC\AudioLibTest.vcproj'
aiming to write result to file 'G:\src\Eurocom\AudioLib_4\tests\projects\MSVC\AudioLibTest.mak'
With no dependencies.
 
Creating file G:\src\Eurocom\AudioLib_4\tests\projects\MSVC\AudioLibTest.mak...
and I get the following error:
System.Runtime.InteropService.COMException (0x80050506):
Cannot access data for the desired tool since it is in a zombie state.
  in Microsoft.VisualStudio.VCProjectEngine.VCLinkerTool.get_AdditionalDependencies()
  in sln2mak.VcProjInfo.iCreateLibs(VCLinkerTool lnkTool)
  in sln2mak.VcProjInfo.ParseVcproj()
  in sln2mak.Program.Main(String[] args)
Thanks again.
Daniele.
GeneralRe: [VS2008] System.IO.IOException unhandledmemberMaria Adamsky18 Sep '09 - 0:34 
-d flag you should use only for additional dependencies, i mean for dependencies on static lib, that have been already compiled.
otherwise, if your lib is part of your overall project you should list it after main .vcproj. Following your example, it seems that your command line should look like this:
 
sln2mak G:\src\Eurocom\AudioLib_4\projects\MSVC\Audiolib4.vcproj /
G:\src\Eurocom\AudioLib_4\tests\projects\MSVC\AudioLibTest.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\jthread\jthread.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\jrtplib\jrtplib.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\rtaudio\projects\win32\VS2008\RtAudio.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\speex\win32\VS2008\libspeex\libspeex.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\libvorbis\win32\VS2008\libvorbis\libvorbis_static.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\liboggz\win32\VS2005\liboggz\liboggz_static.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\libogg\win32\VS2008\libogg_static.vcproj /
G:\src\Eurocom\AudioLib_4\thirdparty\libfishsound\win32\libfishsound\libfishsound_static.vcproj /
-d dsound.lib ws2_32.lib libsndfile-1.lib
 
There is nothing impossible.

GeneralRe: [VS2008] System.IO.IOException unhandledmemberDaniele Barzotti18 Sep '09 - 2:57 
Using your command I get the same error I've posted before.
 
Daniele.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130513.1 | Last Updated 13 Jul 2012
Article Copyright 2008 by Maria Adamsky
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid