компоновка программы - не видит собственных функций (собирается нормально.)

Модератор: Модераторы разделов

Аватара пользователя
SilentMan
Сообщения: 228
Статус: %_%
ОС: Arch Linux

компоновка программы - не видит собственных функций

Сообщение SilentMan »

Собственно, пытаюсь портировать zCPU emulator под линукс, с использованием winelib. Сборка проходит без ошибок, а вот ld не видит фунуций самой программы, которые находятся в других файлах.
Собственно, до чего дошел: http://silentman.org.ua/build.tar.bz2
честно прогуглил полчаса :)

Код: Выделить всё

[sm@home-sm /usr/src/zcpusuite/Emulator/zcpu_emu_build 12:41] ./build.sh
+ wineg++ -I. -lwine -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf -L. -L/usr/lib -L/usr/lib/wine -lm -lfreetype -pie -o zc Modem.o SCSI.o stdafx.o video.o zBIOS.o zcpu_emu.o
SCSI.o: In function `InitSCSI()':
SCSI.cpp:(.text+0xe1): undefined reference to `con_write(char const*, ...)'
SCSI.cpp:(.text+0x198): undefined reference to `con_write(char const*, ...)'
SCSI.cpp:(.text+0x22a): undefined reference to `con_endl()'
SCSI.cpp:(.text+0x238): undefined reference to `con_write(char const*, ...)'
SCSI.cpp:(.text+0x23d): undefined reference to `con_endl()'
zBIOS.o: In function `DiskIO()':
zBIOS.cpp:(.text+0x11c): undefined reference to `WriteToSCSI(int, int, int)'
zBIOS.cpp:(.text+0x13c): undefined reference to `WriteToSCSI(int, int, int)'
zBIOS.cpp:(.text+0x15d): undefined reference to `WriteToSCSI(int, int, int)'
zBIOS.cpp:(.text+0x162): undefined reference to `ReadFromSCSI()'
zBIOS.cpp:(.text+0x194): undefined reference to `WriteToSCSI(int, int, int)'
zBIOS.cpp:(.text+0x199): undefined reference to `ReadFromSCSI()'
zcpu_emu.o: In function `putch(int)':
zcpu_emu.cpp:(.text+0x20c): undefined reference to `_putch'
zcpu_emu.o: In function `kbhit()':
zcpu_emu.cpp:(.text+0x229): undefined reference to `_kbhit'
zcpu_emu.o: In function `getch()':
zcpu_emu.cpp:(.text+0x246): undefined reference to `_getch'
zcpu_emu.o: In function `RunLoop(void*)':
zcpu_emu.cpp:(.text+0x6ad): undefined reference to `video_event_loop()'
zcpu_emu.o: In function `PokeVideoDriver(int&, int&)':
zcpu_emu.cpp:(.text._Z15PokeVideoDriverRiS_[PokeVideoDriver(int&, int&)]+0x58): undefined reference to `con_putch(int)'
zcpu_emu.cpp:(.text._Z15PokeVideoDriverRiS_[PokeVideoDriver(int&, int&)]+0xef): undefined reference to `video_draw_rectangle(int, int, int, int, unsigned char, unsigned char, unsigned char)'
zcpu_emu.o: In function `ScratchPort(int, int)':
zcpu_emu.cpp:(.text._Z11ScratchPortii[ScratchPort(int, int)]+0x39): undefined reference to `WriteToSCSI(int, int, int)'
zcpu_emu.o: In function `GetPort(int&)':
zcpu_emu.cpp:(.text._Z7GetPortRi[GetPort(int&)]+0x1d): undefined reference to `ReadFromSCSI()'
/usr/lib/wine/libwinecrt0.a(exe_main.o): In function `main':
exe_main.c:(.text+0x9d): undefined reference to `WinMain'
collect2: выполнение ld завершилось с кодом возврата 1
winegcc: g++ failed
Registered Linux user #451481
Спасибо сказали: