|
|
Comments and Discussions
|
|
 |

|
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.
|
|
|
|

|
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
|
|
|
|

|
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 easy 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.
|
|
|
|

|
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); 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
|
|
|
|

|
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...Regards
N. Sharjith
|
|
|
|

|
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
|
|
|
|

|
hi, If possible please let know how did you resolve the above COMException error.
|
|
|
|

|
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
|
|
|
|

|
Would this work for VS 2003 projects?
|
|
|
|

|
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.
|
|
|
|

|
Why not just use CMake which does all the work for you. CMake is a cross OS build system
|
|
|
|

|
Can CMake convert a VC++ project to a makefile?
|
|
|
|

|
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.
|
|
|
|

|
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...
|
|
|
|

|
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.
|
|
|
|

|
Yes, you are right about all that, I'm merely pointing out that it doesn't make this article worthless
|
|
|
|

|
Fine I'll make it a 3. Happy now?
|
|
|
|

|
Peace!
|
|
|
|

|
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
|
|
|
|

|
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.
|
|
|
|

|
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
|
|
|
|

|
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.
|
|
|
|

|
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
|
|
|
|

|
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.
|
|
|
|

|
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].
|
|
|
|

|
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.
|
|
|
|

|
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.
|
|
|
|

|
See my answer above in this thread.
There is nothing impossible.
|
|
|
|

|
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?
|
|
|
|

|
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.
|
|
|
|

|
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.
|
|
|
|

|
Can you post here your command line/arguments that you pass to the tool?
There is nothing impossible.
|
|
|
|

|
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.
|
|
|
|

|
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.
|
|
|
|

|
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
|
|
|
|

|
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.
|
|
|
|

|
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
|
|
|
|

|
Pardon, my skype acount is: mashka-a@013.net
There is nothing impossible.
|
|
|
|

|
I sent a message to you in Skype. Could we talk a little bit please? Thanks.
|
|
|
|

|
I hope after our long mail story you finally use this tool joyfully?
There is nothing impossible.
|
|
|
|

|
Yes!! I used it!! So thank you very much for your help!!
|
|
|
|

|
Hello,
I am facing the same problem.
Could you (Maria or uepelde) post the solution that yuo have found?
Thanks,
Franck.
|
|
|
|

|
The solution is right usage of tool, i mean right path to project that you provide to sln2mak.exe.
There is nothing impossible.
|
|
|
|

|
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:
|
|
|
|

|
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.
|
|
|
|

|
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
|
|
|
|

|
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.
|
|
|
|

|
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.
|
|
|
|

|
-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.
|
|
|
|

|
Using your command I get the same error I've posted before.
Daniele.
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
Convert .sln/.vcproj (VC++2005) to Linux makefile
| Type | Article |
| Licence | CPOL |
| First Posted | 28 Aug 2008 |
| Views | 325,216 |
| Downloads | 4,929 |
| Bookmarked | 139 times |
|
|