Author Topic: Problems when cross compiling in Linux using Uniwin  (Read 3073 times)

arda

  • Guest
Problems when cross compiling in Linux using Uniwin
« on: January 05, 2009, 03:20:58 pm »
Hi all. First of all I would like to explain why I need to use Codeblocks: I have a project written on Windows using VC2005 to be run on both Windows and Linux. There are many static libraries in the solution. Some of them has its own makefile, some of them has not. Codeblocks quickly imports this VC2005 solution to a Codeblocks workspace. Now I need to cross-compile in a Linux box from the Codeblocks IDE running on Windows. I also need to use remote debugging feature of C::B.

Proposed solution is to use Uniwin with Code blocks. I have followed the article written here: http://wiki.codeblocks.org/index.php?title=Installing_Uniwin_remote_compiler 

But I couldn't build my project, then I started to build a quite simple project.

- Uniwin path is C:\Uniwin
- Uniwin ssh and sftp tests are OK. Uniwin runs in background when the project is open.
- Uniwin Dir mapping: C:\tmp\test1 => /home/arda/test1, C:\tmp\test1\src => /home/arda/test1/src

- Project paths and files
    - C:\tmp\test1: test1.cbp, test1.depend, test1.layout
    - C:\tmp\test1\src: main.cpp


I'm trying to build a static library
    - Project Properties/Build Targets/Type: Static Library
    - Project Properties/Build Targets/Output filename: libtest1.a
    - Project Properties/Build Targets/Objects output dir: .

main.cpp
---------
#include <iostream>
using namespace std;

void LibraryFunction()
{
   cout << "Hello world!" << endl;
}

#if 0
int main()
{
    //LibraryFunction();
    return 0;
}
#endif



Rebuild command returns this output:

-------------- Build: Debug in test1 ---------------

Compiling: src\main.cpp
g++: /home/arda/test1/src/main.cpp: No such file or directory
g++: no input files
Linking static library: libtest1.a
internal error.
Process terminated with status 0 (0 minutes, 12 seconds)
0 errors, 0 warnings



Uniwin didn't create /home/arda/test1 or /home/arda/test1/src directory on linux, didn't upload main.cpp.



If I enable main function with '#if 1' and change the project type as 'Console Application', an output binary named test1.exe is created, nothing happens on Linux machine.

Rebuild command returns this output:

-------------- Build: Debug in test1 ---------------

Compiling: src\main.cpp
g++: /home/arda/test1/src/main.cpp: No such file or directory
g++: no input files
Linking console executable: test1.exe
g++: ./src/main.o: No such file or directory
g++: no input files
Output size is 40.00 KB
Process terminated with status 0 (0 minutes, 0 seconds)
0 errors, 0 warnings



I need your help. What is wrong here?

Thanks in advance.
Arda

arda

  • Guest
Re: Problems when cross compiling in Linux using Uniwin
« Reply #1 on: January 12, 2009, 03:27:16 pm »
I couldn't get Codeblocks work with Uniwin yet. Anyone who has experience in this issue I need your help.

Regards