x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Cross-Compiling with GCC on Cygwin for HPC Pro 2.11?

Guest1000
Guest1000 Page Icon Posted 2005-03-13 11:21 AM
#
Status:
Dear Folks,

I am trying to get cross-compiles working for HPC Pro development. Please help me. I have re-built gcc 3.4.1 for target sh-hitachi-elf, and rebuilt binutils for the same purpose.

I downloaded the HPC Pro 2.11 SDK from the internet, and used the libraries that are included. However, I am having lots of errors in the linking phase that tells me that it can't find windows related code blocks:

/usr/local/wince/bin/sh-hitachi-elf-ld -out:etcha.exe -mshelf -nodefaultlib -eWinMainCRTStartup -L /usr/local/wince/lib/sh3 /usr/local/wince/lib/sh3/libcorelibc.a /usr/local/wince/lib/sh3/libcoredll.a /usr/local/wince/lib/sh3/libole32.a /usr/local/wince/lib/sh3/liboleaut32.a /usr/local/wince/lib/sh3/libuuid.a \
etcha.o

/usr/local/wince/bin/sh-hitachi-elf-ld: warning: cannot find entry symbol WinMainCRTStartup; defaulting to 0000000000001000

: undefined reference to `GetClientRect'
etcha.o(.text+0x15c): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `BeginPaint'
etcha.o(.text+0x160): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `GetStockObject'
etcha.o(.text+0x164): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `FillRect'
etcha.o(.text+0x168): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `SelectObject'
etcha.o(.text+0x16c): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `SetTextColor'
etcha.o(.text+0x174): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `SetBkColor'
etcha.o(.text+0x178): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `wcslen(wchar_t const*)'
etcha.o(.text+0x17c): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `ExtTextOutW'
etcha.o(.text+0x180): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `EndPaint'
etcha.o(.text+0x188): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `InvalidateRect'
etcha.o(.text+0x18c): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `UpdateWindow'
etcha.o(.text+0x1ec): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `SendMessageW'
etcha.o(.text+0x1f0): In function `WndProcButton(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `DefWindowProcW'
etcha.o(.text+0x35c): In function `WndProc(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `BeginPaint'
etcha.o(.text+0x364): In function `WndProc(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `GetClientRect'
etcha.o(.text+0x368): In function `WndProc(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `GetStockObject'
etcha.o(.text+0x36c): In function `WndProc(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `FillRect'
etcha.o(.text+0x370): In function `WndProc(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `EndPaint'
etcha.o(.text+0x37c): In function `WndProc(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `Polyline'
etcha.o(.text+0x460): In function `WndProc(HWND__*, unsigned int, unsigned int, long)':
: undefined reference to `GetDC'
...

Does anyone here have the ability to decipher why I'm getting this error? I'm pretty sure that there is a compiler or ld flag that I must use, but I'm not which one....

Thanks in advance,

Ed
 Top of the page
Guest1000
Guest1000 Page Icon Posted 2005-03-13 11:30 AM
#
Status:
Dear Folks,

Alright, I sort of fixed the problem. I was calling LD directly, but changing that to a call to g++ directly fixed the problem, sort of . Now I get the following error:

/usr/local/wince/bin/sh-hitachi-elf-g++ -out:etcha.exe --target=sh-hitachi-elf -mshelf -eWinMainCRTStartup -L /usr/local/wince/lib/sh3 /usr/local/wince/lib/sh3/libcorelibc.a /usr/local/wince/lib/sh3/libcoredll.a /usr/local/wince/lib/sh3/libole32.a /usr/local/wince/lib/sh3/liboleaut32.a /usr/local/wince/lib/sh3/libuuid.a \
etcha.o
/usr/local/wince/lib/sh3/libcorelibc.a: could not read symbols: File format is ambiguous
collect2: ld returned 1 exit status
make: *** [etcha.exe] Error 1

Any ideas?

Sincerely,
Ed
 Top of the page
Jump to forum:
Seconds to generate: 0.125 - Cached queries : 58 - Executed queries : 8