 |
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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].
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
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?
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
 |
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:
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
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
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |